/**
 * Contest Voting Styles
 * Sistema di votazione "Aderire per Vincere"
 */

/* Sezione votazione */
.contest-vote-section {
    padding: 60px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    margin-top: 40px;
}

/* Container principale */
.contest-vote-container {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

/* Contatore voti */
.contest-vote-count {
    margin-bottom: 30px;
}

.contest-vote-count .vote-number {
    display: block;
    font-size: 64px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1;
}

.contest-vote-count .vote-label {
    display: block;
    font-size: 18px;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 8px;
}

/* Pulsante voto principale */
.contest-vote-btn {
    display: inline-block;
    padding: 18px 50px;
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.contest-vote-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.5);
    background: linear-gradient(135deg, #2980b9 0%, #1a5276 100%);
}

.contest-vote-btn:active:not(:disabled) {
    transform: translateY(-1px);
}

/* Stato: richiede login */
.contest-vote-btn.requires-login {
    background: linear-gradient(135deg, #ff0019 0%, #b60315 100%);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
}

.contest-vote-btn.requires-login:hover {
    background: linear-gradient(135deg, #b60315 0%, #b60315 100%);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.5);
}

/* Stato: già votato questo progetto */
.contest-vote-btn.already-voted-this {
    background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
    cursor: default;
}

/* Stato: già votato altro progetto */
.contest-vote-btn.already-voted-other {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    box-shadow: none;
    cursor: not-allowed;
}

/* Stato: contest terminato */
.contest-vote-btn.contest-ended {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    box-shadow: none;
    cursor: not-allowed;
}

/* Stato: loading */
.contest-vote-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.contest-vote-btn.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Messaggio info */
.contest-vote-message {
    margin-top: 20px;
    padding: 12px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #495057;
    font-size: 14px;
}

.contest-vote-message a {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
}

.contest-vote-message a:hover {
    text-decoration: underline;
}

/* Feedback dopo il voto */
.contest-vote-feedback {
    margin-top: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
}

.contest-vote-feedback.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.contest-vote-feedback.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Scadenza */
.contest-deadline {
    margin-top: 25px;
    font-size: 13px;
    color: #95a5a6;
}

/* Animazione successo */
@keyframes celebrate {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.contest-vote-container.vote-success {
    animation: celebrate 0.5s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .contest-vote-section {
        padding: 40px 15px;
    }

    .contest-vote-container {
        padding: 30px 20px;
    }

    .contest-vote-count .vote-number {
        font-size: 48px;
    }

    .contest-vote-btn {
        padding: 15px 35px;
        font-size: 16px;
    }
}
