/**
 * This or That Activity Styles
 *
 * @package Crowdaa_Challenges_Calendar
 * @since   4.12.96
 */

/* Container principal */
.this-or-that-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

/* Section Question */
.tot-question-section {
    text-align: center;
    margin-bottom: 30px;
}

.tot-question-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-radius: 16px;
    margin-bottom: 16px;
    color: white;
}

.tot-question {
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.tot-stats {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f3f4f6;
    padding: 8px 16px;
    border-radius: 20px;
}

.tot-stat-value {
    font-weight: 700;
    color: #ef4444;
    font-size: 16px;
}

.tot-stat-label {
    color: #6b7280;
    font-size: 14px;
}

/* Battle Zone - Options */
.tot-battle {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: stretch;
    margin-bottom: 20px;
}

.tot-option {
    background: white;
    border: 3px solid #e5e7eb;
    border-radius: 20px;
    padding: 30px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.tot-option:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.tot-option-a {
    border-color: #3b82f6;
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
}

.tot-option-a:hover {
    border-color: #2563eb;
    background: linear-gradient(180deg, #dbeafe 0%, #bfdbfe 100%);
}

.tot-option-b {
    border-color: #ec4899;
    background: linear-gradient(180deg, #fdf2f8 0%, #fce7f3 100%);
}

.tot-option-b:hover {
    border-color: #db2777;
    background: linear-gradient(180deg, #fce7f3 0%, #fbcfe8 100%);
}

.tot-option.selected {
    transform: scale(1.05);
}

.tot-option-a.selected {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.3);
}

.tot-option-b.selected {
    border-color: #db2777;
    box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.3);
}

.tot-option.success {
    animation: successPulse 0.5s ease;
}

@keyframes successPulse {
    0%, 100% { transform: scale(1.05); }
    50% { transform: scale(1.1); }
}

.tot-option.loading {
    opacity: 0.7;
    pointer-events: none;
}

.tot-emoji {
    font-size: 48px;
    line-height: 1;
}

.tot-label {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    text-align: center;
}

.tot-preview-percent {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    background: rgba(255, 255, 255, 0.8);
    padding: 4px 12px;
    border-radius: 12px;
}

/* VS Badge */
.tot-vs {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tot-vs span {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    animation: vsPulse 2s infinite;
}

@keyframes vsPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.tot-hint {
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
    margin: 0;
}

/* Résultats */
.tot-results {
    text-align: center;
}

.tot-voted-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #16a34a;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    margin-bottom: 24px;
}

.tot-battle-results {
    gap: 12px;
}

.tot-result-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.tot-result-card.user-choice {
    border-color: #22c55e;
    background: linear-gradient(180deg, #f0fdf4 0%, #dcfce7 100%);
}

.tot-result-card.winner {
    box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.3);
}

/* Couronne gagnant - Icône SVG Lucide sur cercle doré */
.tot-result-card.winner .tot-crown {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.tot-result-card.winner .tot-crown svg {
    width: 16px;
    height: 16px;
    stroke: white;
    stroke-width: 2.5;
}

.tot-result-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    position: relative;
}

.tot-result-header .tot-emoji {
    font-size: 36px;
}

.tot-result-header .tot-label {
    font-size: 16px;
}

.tot-your-vote {
    background: #22c55e;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 10px;
}

.tot-result-bar-container {
    background: #f3f4f6;
    border-radius: 10px;
    height: 32px;
    overflow: hidden;
    margin-bottom: 12px;
}

.tot-result-bar {
    height: 100%;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 12px;
    min-width: 50px;
    transition: width 0.5s ease;
}

.tot-bar-a {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
}

.tot-bar-b {
    background: linear-gradient(90deg, #ec4899, #db2777);
}

.tot-percent {
    color: white;
    font-weight: 700;
    font-size: 14px;
}

.tot-votes-count {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.tot-count {
    font-weight: 700;
    color: #1f2937;
    font-size: 18px;
}

.tot-count-label {
    color: #6b7280;
    font-size: 14px;
}

.tot-vs-results span {
    background: #9ca3af;
    width: 40px;
    height: 40px;
    font-size: 12px;
    animation: none;
}

/* Bouton actualiser */
.tot-refresh-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f3f4f6;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    color: #4b5563;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 20px;
}

.tot-refresh-btn:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.tot-refresh-btn.loading svg {
    animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 480px) {
    .this-or-that-container {
        padding: 15px 10px;
    }

    .tot-question {
        font-size: 18px;
    }

    .tot-battle {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .tot-option {
        padding: 20px 15px;
        flex-direction: row;
        justify-content: flex-start;
        gap: 16px;
    }

    .tot-emoji {
        font-size: 36px;
    }

    .tot-label {
        font-size: 16px;
        text-align: left;
    }

    .tot-vs {
        order: -1;
    }

    .tot-vs span {
        width: 40px;
        height: 40px;
        font-size: 12px;
    }

    .tot-battle-results {
        grid-template-columns: 1fr;
    }

    .tot-vs-results {
        display: none;
    }
}

/* Désactivation hover sur tactile */
@media (hover: none), (pointer: coarse) {
    .tot-option:hover {
        transform: none;
        box-shadow: none;
    }

    .tot-option:active {
        transform: scale(0.98);
    }
}
