/* ==============================================
   COUNTRY DETAIL PAGE
=============================================== */

.cd-page {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── Country Header ── */
.cd-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--border-color);
}

.cd-flag {
    width: 52px;
    height: 36px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

.cd-flag-placeholder {
    width: 52px;
    height: 36px;
    background: var(--bg-secondary);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 22px;
    flex-shrink: 0;
}

.cd-header-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cd-country-name {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cd-round-badge {
    display: inline-flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    width: fit-content;
}

/* ── Tab Navigation ── */
.cd-tabs {
    display: flex;
    gap: 8px;
    padding: 14px 20px 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0;
}

.cd-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
    transition: color 0.18s, border-color 0.18s;
    white-space: nowrap;
}

.cd-tab:hover {
    color: var(--text-primary);
}

.cd-tab.active {
    color: var(--accent-green);
    border-bottom-color: var(--accent-green);
}

.cd-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    min-width: 18px;
}

.cd-tab.active .cd-tab-count {
    background: rgba(34, 197, 94, 0.12);
    color: var(--accent-green);
}

/* ── Content Panels ── */
.cd-panel {
    display: none;
    padding: 16px 20px 20px;
}

.cd-panel.active {
    display: block;
}

/* ── League Accordion Block ── */
.cd-league-block {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
    background: var(--bg-primary, white);
}

/* ── League Accordion Header ── */
.cd-league-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    background: var(--bg-secondary);
    border: none;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid var(--border-color);
}

.cd-league-header:hover {
    background: var(--bg-tertiary, #f1f5f9);
}

.cd-league-left {
    display: flex;
    align-items: center;
    gap: 9px;
}

.cd-league-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}

.cd-league-name {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    transition: color 0.15s;
}

a.cd-league-name:hover {
    color: var(--accent-green, #22c55e);
    text-decoration: underline;
}

.cd-league-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cd-league-count {
    font-size: 11px;
    color: var(--text-tertiary);
    font-weight: 600;
}

.cd-chevron {
    font-size: 11px;
    color: var(--text-tertiary);
    transition: transform 0.25s ease;
}

/* Collapsed state */
.cd-league-block.collapsed .cd-chevron {
    transform: rotate(-90deg);
}

.cd-league-block.collapsed .cd-league-content {
    display: none;
}

/* ── League Content ── */
.cd-league-content {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Override prediction card margin inside country page */
.cd-league-content .prediction-card {
    max-width: 100%;
    margin-bottom: 4px;
    box-shadow: none;
    border: 1px solid var(--border-color);
}

/* ── Empty State ── */
.cd-empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-tertiary);
}

.cd-empty-state i {
    font-size: 32px;
    margin-bottom: 10px;
    display: block;
    opacity: 0.35;
}

.cd-empty-state p {
    font-size: 13px;
    margin: 0;
}

.cd-loading {
    padding: 24px;
    text-align: center;
    color: var(--text-muted, #94a3b8);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cd-loading .fa-spinner {
    font-size: 1rem;
}


/* ── SKELETON LOADER (country detail) ───────────────────────────────── */

.cd-league-content .skeleton-loader {
    padding: 8px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cd-league-content .skeleton-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--bg-primary);
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    gap: 12px;
    overflow: hidden;
}

.cd-league-content .skeleton-line,
.cd-league-content .skeleton-circle {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: 6px;
    flex-shrink: 0;
}

.cd-league-content .skeleton-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.cd-league-content .skeleton-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
}

.cd-league-content .skeleton-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.cd-league-content .skeleton-name {
    height: 12px;
    width: 80%;
    border-radius: 4px;
}

.cd-league-content .skeleton-odds {
    height: 10px;
    width: 50%;
    border-radius: 4px;
}