/**
 * Guess Who (Qui suis-je ?) Activity Styles
 *
 * @package Crowdaa_Challenges_Calendar
 * @since   4.12.102
 */

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

/* Header */
.gw-header {
    text-align: center;
    margin-bottom: 24px;
}

.gw-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-radius: 20px;
    margin-bottom: 16px;
    color: white;
}

.gw-title {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.gw-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

/* Barre de progression */
.gw-progress {
    margin-bottom: 24px;
}

.gw-progress-bar {
    background: #e5e7eb;
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 8px;
}

.gw-progress-fill {
    background: linear-gradient(90deg, #22c55e, #16a34a);
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
}

.gw-progress-text {
    text-align: center;
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

/* Zone des indices */
.gw-clues-zone {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.gw-clue-card {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: white;
    border-radius: 16px;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
}

.gw-clue-card.revealed {
    border-color: #22c55e;
    background: linear-gradient(180deg, #f0fdf4 0%, #dcfce7 100%);
}

.gw-clue-card.locked {
    cursor: pointer;
    border-color: #d1d5db;
    background: #f9fafb;
}

.gw-clue-card.locked:hover {
    border-color: #9ca3af;
    transform: translateX(4px);
}

.gw-clue-card.locked.next-available {
    border-color: #fbbf24;
    background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(251, 191, 36, 0); }
}

/* Numéro et multiplicateur */
.gw-clue-number {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 50px;
}

.gw-clue-badge {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.gw-clue-card.locked .gw-clue-badge {
    background: linear-gradient(135deg, #9ca3af, #6b7280);
}

.gw-clue-card.locked.next-available .gw-clue-badge {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.gw-clue-multiplier {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 8px;
}

.gw-clue-multiplier.high {
    background: #dcfce7;
    color: #16a34a;
}

.gw-clue-multiplier.medium {
    background: #dbeafe;
    color: #2563eb;
}

.gw-clue-multiplier.low {
    background: #fef3c7;
    color: #d97706;
}

.gw-clue-multiplier.minimal {
    background: #fee2e2;
    color: #dc2626;
}

/* Contenu de l'indice */
.gw-clue-content {
    flex: 1;
    display: flex;
    align-items: center;
}

.gw-clue-text {
    margin: 0;
    font-size: 15px;
    color: #1f2937;
    line-height: 1.5;
}

.gw-clue-text.hidden {
    display: none;
}

.gw-clue-locked {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #9ca3af;
    font-size: 14px;
}

.gw-clue-card.locked.next-available .gw-clue-locked {
    color: #d97706;
}

/* Points potentiels */
.gw-potential-points {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    padding: 12px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    color: #92400e;
    font-size: 14px;
}

.gw-potential-points strong {
    font-size: 18px;
    color: #d97706;
}

/* Zone de réponse */
.gw-answer-zone {
    margin-bottom: 20px;
}

.gw-input-wrapper {
    display: flex;
    gap: 12px;
}

.gw-answer-input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid #d1d5db;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.2s ease;
}

.gw-answer-input:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.gw-submit-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gw-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

.gw-submit-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.gw-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 12px 0 0 0;
    font-size: 13px;
    color: #6b7280;
}

/* Message de feedback (au-dessus de l'input) */
.gw-message {
    display: none;
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    font-weight: 500;
    margin-bottom: 16px;
}

.gw-message.error {
    display: block;
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #dc2626;
    border: 1px solid #fca5a5;
}

.gw-message.success {
    display: block;
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #16a34a;
    border: 1px solid #86efac;
}

.gw-message.info {
    display: block;
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #2563eb;
    border: 1px solid #93c5fd;
}

/* === RÉSULTATS (déjà complété) === */
/* Spécificité maximale pour écraser .crowdaa-modal .results-icon et .quiz-completed-results .results-icon */
.guess-who-container.gw-completed .results-header {
    margin-bottom: 24px;
    text-align: center;
}

.guess-who-container.gw-completed .results-header h3 {
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

/* Triple sélecteur pour écraser tous les contextes (page, modal, quiz) */
.guess-who-container .results-icon,
.guess-who-container .gw-results-icon,
.crowdaa-modal .guess-who-container .results-icon,
.crowdaa-modal .guess-who-container .gw-results-icon,
.quiz-completed-results .guess-who-container .results-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-radius: 50%;
    margin-bottom: 16px;
    color: white;
    font-size: 0; /* Cache le texte, seul le SVG sera visible */
    animation: none;
}

/* SVG dans l'icône de résultat */
.guess-who-container .results-icon svg,
.guess-who-container .gw-results-icon svg,
.crowdaa-modal .guess-who-container .results-icon svg {
    width: 48px;
    height: 48px;
    stroke: white;
}

/* Image de révélation */
.gw-reveal-image {
    margin-bottom: 24px;
    text-align: center;
}

.gw-reveal-image img {
    max-width: 280px;
    max-height: 280px;
    border-radius: 16px;
    border: 4px solid #22c55e;
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.3);
    object-fit: cover;
}

/* Réponse révélée */
.gw-answer-reveal {
    text-align: center;
    margin-bottom: 24px;
}

.gw-answer-label {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 12px 0;
}

.gw-answer-box {
    display: inline-block;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    padding: 16px 32px;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.3);
}

.gw-answer-text {
    color: white;
    font-size: 24px;
    font-weight: 700;
}

/* Stats résultats */
.guess-who-container .results-stats,
.guess-who-container .gw-results-stats,
.crowdaa-modal .guess-who-container .results-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.guess-who-container .result-card,
.crowdaa-modal .guess-who-container .result-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    border: 1px solid #e5e7eb;
}

.guess-who-container .result-card .result-icon,
.crowdaa-modal .guess-who-container .result-card .result-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0; /* Cache le texte, seul le SVG sera visible */
    margin-bottom: 12px;
    color: #22c55e;
}

/* SVG dans les icônes de cartes */
.guess-who-container .result-card .result-icon svg,
.crowdaa-modal .guess-who-container .result-card .result-icon svg {
    width: 32px;
    height: 32px;
    stroke: #22c55e;
}

.guess-who-container .result-card .result-value,
.crowdaa-modal .guess-who-container .result-card .result-value {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
}

.guess-who-container .result-card .result-label,
.crowdaa-modal .guess-who-container .result-card .result-label {
    font-size: 13px;
    color: #6b7280;
}

.guess-who-container .completion-message,
.crowdaa-modal .guess-who-container .completion-message {
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}

.guess-who-container .completion-message p,
.crowdaa-modal .guess-who-container .completion-message p {
    margin: 0;
}

/* Animation de révélation */
@keyframes revealClue {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.gw-clue-card.revealing {
    animation: revealClue 0.5s ease forwards;
}

/* Animation de succès */
@keyframes successBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.gw-answer-zone.success {
    animation: successBounce 0.5s ease;
}

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

    .gw-title {
        font-size: 20px;
    }

    .gw-clue-card {
        padding: 12px;
        gap: 12px;
    }

    .gw-input-wrapper {
        flex-direction: column;
    }

    .gw-submit-btn {
        justify-content: center;
    }

    .gw-answer-text {
        font-size: 20px;
    }

    .gw-reveal-image img {
        max-width: 200px;
        max-height: 200px;
    }
}

/* Désactivation hover sur tactile */
@media (hover: none), (pointer: coarse) {
    .gw-clue-card.locked:hover {
        transform: none;
    }

    .gw-submit-btn:hover {
        transform: none;
        box-shadow: none;
    }

    .gw-clue-card.locked:active {
        transform: scale(0.98);
    }

    .gw-submit-btn:active {
        transform: scale(0.98);
    }
}
