/**
 * AFCON 2027 fan trophy prediction card.
 */

.afcon-fan-prediction {
    margin: 0 0 20px;
    padding: 22px 24px 24px;
    background: #fff;
    border-radius: 18px;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 8px 24px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.afcon-fan-prediction__header {
    margin-bottom: 18px;
}

.afcon-fan-prediction__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #1a7a45;
    text-transform: uppercase;
}

.afcon-fan-prediction__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1a7a45;
    flex-shrink: 0;
}

.afcon-fan-prediction__title {
    margin: 0;
    font-size: clamp(1.25rem, 2.4vw, 1.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #111827;
    line-height: 1.25;
}

.afcon-fan-prediction__loading,
.afcon-fan-prediction__error {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
}

.afcon-fan-prediction__error {
    color: #b91c1c;
}

.afcon-fan-prediction__choices {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    padding-bottom: 6px;
    scrollbar-width: thin;
    scrollbar-color: rgba(17, 24, 39, 0.22) transparent;
}

.afcon-fan-prediction__choices::-webkit-scrollbar {
    height: 6px;
}

.afcon-fan-prediction__choices::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.18);
}

.afcon-fan-prediction__choice {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    scroll-snap-align: start;
    min-height: 44px;
    padding: 8px 16px 8px 12px;
    border: 1px solid #e8e8e6;
    border-radius: 12px;
    background: #f7f7f5;
    color: #111827;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.12s ease;
}

.afcon-fan-prediction__choice:hover:not(:disabled) {
    background: #f0f0ed;
    border-color: #d4d4d0;
}

.afcon-fan-prediction__choice:focus-visible {
    outline: 2px solid #1a7a45;
    outline-offset: 2px;
}

.afcon-fan-prediction__choice:disabled {
    cursor: default;
    opacity: 0.92;
}

.afcon-fan-prediction__choice--selected {
    background: #ecfdf3;
    border-color: #1a7a45;
    box-shadow: 0 0 0 1px rgba(26, 122, 69, 0.12);
}

.afcon-fan-prediction__flag {
    width: 28px;
    height: 20px;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.afcon-fan-prediction[data-image-style="crest"] .afcon-fan-prediction__flag {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: none;
    background: #fff;
}

.afcon-fan-prediction[data-image-style="crest"] .afcon-fan-prediction__choice {
    max-width: 220px;
}

.afcon-fan-prediction[data-image-style="crest"] .afcon-fan-prediction__label {
    white-space: normal;
    text-align: left;
    line-height: 1.25;
}

.afcon-fan-prediction__label {
    white-space: nowrap;
}

.afcon-fan-prediction__pct {
    margin-left: 4px;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.08);
    font-size: 12px;
    font-weight: 700;
    color: #374151;
}

.afcon-fan-prediction__choice--selected .afcon-fan-prediction__pct {
    background: rgba(26, 122, 69, 0.14);
    color: #166534;
}

.afcon-fan-prediction__meta {
    margin: 14px 0 0;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
}

.afcon-fan-prediction .sports-match-prediction__reason {
    margin-top: 16px;
}

@media (max-width: 640px) {
    .afcon-fan-prediction {
        padding: 18px 16px 20px;
    }

    .afcon-fan-prediction__choices {
        gap: 8px;
    }
}
