/**
 * FootyChat Pro Components CSS
 *
 * Professional-grade styles for prognostics and live matches.
 * Includes skeleton loaders, animations, enhanced filtering UX.
 *
 * @package FootyChat
 * @since   4.0.0
 */

/* ==========================================================================
   CSS Variables - Component-specific tokens
   ========================================================================== */

:root {
    /* Live badge colors */
    --fc-live-pulse: #ef4444;
    --fc-live-bg: rgba(239, 68, 68, 0.1);

    /* Confidence colors */
    --fc-conf-high: #22c55e;
    --fc-conf-high-bg: rgba(34, 197, 94, 0.1);
    --fc-conf-medium: #f59e0b;
    --fc-conf-medium-bg: rgba(245, 158, 11, 0.1);
    --fc-conf-low: #ef4444;
    --fc-conf-low-bg: rgba(239, 68, 68, 0.1);

    /* Probability bar */
    --fc-bar-home: var(--fc-primary-500);
    --fc-bar-draw: var(--fc-slate-400);
    --fc-bar-away: var(--fc-accent-500);

    /* Skeleton */
    --fc-skeleton-base: var(--fc-slate-200);
    --fc-skeleton-shine: var(--fc-slate-100);

    /* Search */
    --fc-search-bg: var(--fc-slate-100);
    --fc-search-focus: var(--fc-primary-500);
}

.dark {
    --fc-skeleton-base: var(--fc-slate-700);
    --fc-skeleton-shine: var(--fc-slate-600);
    --fc-search-bg: var(--fc-slate-800);
}

/* ==========================================================================
   Toolbar Enhancement
   ========================================================================== */

.fc-toolbar {
    position: sticky;
    top: 64px; /* Below header */
    z-index: 90;
    background: white;
    border-bottom: 1px solid var(--fc-slate-200);
    transition: box-shadow var(--fc-transition-base);
}

.dark .fc-toolbar {
    background: var(--fc-slate-900);
    border-color: var(--fc-slate-700);
}

.fc-toolbar.is-scrolled {
    box-shadow: var(--fc-shadow-md);
}

.fc-toolbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--fc-spacing-4);
    height: 56px;
}

/* Back button and title */
.fc-toolbar__left {
    display: flex;
    align-items: center;
    gap: var(--fc-spacing-3);
    min-width: 0;
}

.fc-toolbar__back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--fc-radius-lg);
    color: var(--fc-slate-600);
    transition: background var(--fc-transition-fast), color var(--fc-transition-fast);
}

.fc-toolbar__back:hover {
    background: var(--fc-slate-100);
    color: var(--fc-slate-900);
}

.dark .fc-toolbar__back:hover {
    background: var(--fc-slate-800);
    color: white;
}

.fc-toolbar__title {
    display: flex;
    align-items: baseline;
    gap: var(--fc-spacing-2);
    margin: 0;
    font-size: var(--fc-font-size-lg);
    font-weight: 600;
    color: var(--fc-slate-900);
    white-space: nowrap;
}

.dark .fc-toolbar__title {
    color: white;
}

.fc-toolbar__count {
    font-size: var(--fc-font-size-sm);
    font-weight: 500;
    color: var(--fc-slate-500);
    background: var(--fc-slate-100);
    padding: 2px 8px;
    border-radius: var(--fc-radius-full);
}

.dark .fc-toolbar__count {
    background: var(--fc-slate-800);
    color: var(--fc-slate-400);
}

/* Date navigation */
.fc-toolbar__dates {
    display: flex;
    align-items: center;
    gap: var(--fc-spacing-2);
}

.fc-toolbar__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--fc-slate-500);
    border-radius: var(--fc-radius-md);
    cursor: pointer;
    transition: background var(--fc-transition-fast), color var(--fc-transition-fast);
}

.fc-toolbar__arrow:hover:not(:disabled) {
    background: var(--fc-slate-100);
    color: var(--fc-slate-900);
}

.fc-toolbar__arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.dark .fc-toolbar__arrow:hover:not(:disabled) {
    background: var(--fc-slate-800);
    color: white;
}

.fc-toolbar__date-track {
    display: flex;
    gap: var(--fc-spacing-1);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
    max-width: 320px;
}

.fc-toolbar__date-track::-webkit-scrollbar {
    display: none;
}

.fc-toolbar__date {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: var(--fc-spacing-2) var(--fc-spacing-3);
    border-radius: var(--fc-radius-lg);
    text-decoration: none;
    color: var(--fc-slate-600);
    font-size: var(--fc-font-size-xs);
    transition: background var(--fc-transition-fast), color var(--fc-transition-fast);
    scroll-snap-align: center;
    position: relative;
    min-width: 44px;
}

.fc-toolbar__date:hover {
    background: var(--fc-slate-100);
    color: var(--fc-slate-900);
}

.fc-toolbar__date.is-active {
    background: var(--fc-primary-500);
    color: white;
}

.fc-toolbar__date.is-today:not(.is-active) {
    color: var(--fc-primary-600);
}

.fc-toolbar__date-weekday {
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.fc-toolbar__date-num {
    font-size: var(--fc-font-size-base);
    font-weight: 600;
}

.fc-toolbar__date-dot {
    position: absolute;
    bottom: 4px;
    width: 4px;
    height: 4px;
    background: var(--fc-primary-500);
    border-radius: 50%;
}

.fc-toolbar__date.is-active .fc-toolbar__date-dot {
    background: white;
}

.dark .fc-toolbar__date {
    color: var(--fc-slate-400);
}

.dark .fc-toolbar__date:hover {
    background: var(--fc-slate-800);
    color: white;
}

.dark .fc-toolbar__date.is-today:not(.is-active) {
    color: var(--fc-primary-400);
}

/* Today pill button */
.fc-toolbar__today-pill {
    padding: var(--fc-spacing-1) var(--fc-spacing-3);
    font-size: var(--fc-font-size-xs);
    font-weight: 600;
    color: var(--fc-primary-600);
    background: var(--fc-primary-100);
    border-radius: var(--fc-radius-full);
    text-decoration: none;
    white-space: nowrap;
    transition: background var(--fc-transition-fast);
}

.fc-toolbar__today-pill:hover {
    background: var(--fc-primary-200);
    color: var(--fc-primary-700);
}

.dark .fc-toolbar__today-pill {
    background: rgba(34, 197, 94, 0.15);
    color: var(--fc-primary-400);
}

/* Calendar picker */
.fc-toolbar__cal {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--fc-radius-md);
    color: var(--fc-slate-500);
    cursor: pointer;
    position: relative;
    transition: background var(--fc-transition-fast), color var(--fc-transition-fast);
}

.fc-toolbar__cal:hover {
    background: var(--fc-slate-100);
    color: var(--fc-slate-900);
}

.fc-toolbar__cal-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    font-size: 16px; /* Prevent iOS zoom */
}

/* Center section - search and dates */
.fc-toolbar__center {
    display: flex;
    align-items: center;
    gap: var(--fc-spacing-3);
    flex: 1;
    min-width: 0;
    justify-content: center;
}

/* Right section - filters */
.fc-toolbar__right {
    display: none;
}

.fc-filters__group {
    display: flex;
    align-items: center;
}

.fc-filters__select {
    appearance: none;
    background: var(--fc-slate-100);
    border: 1px solid var(--fc-slate-200);
    border-radius: var(--fc-radius-md);
    padding: var(--fc-spacing-2) var(--fc-spacing-8) var(--fc-spacing-2) var(--fc-spacing-3);
    font-size: var(--fc-font-size-sm);
    font-weight: 500;
    color: var(--fc-slate-700);
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M3 4.5l3 3 3-3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    transition: border-color var(--fc-transition-fast), background-color var(--fc-transition-fast);
}

.fc-filters__select:hover {
    border-color: var(--fc-slate-300);
}

.fc-filters__select:focus {
    outline: none;
    border-color: var(--fc-primary-500);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.dark .fc-filters__select {
    background-color: var(--fc-slate-800);
    border-color: var(--fc-slate-700);
    color: var(--fc-slate-200);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M3 4.5l3 3 3-3'/%3E%3C/svg%3E");
}

/* ─── Responsive Toolbar Layout ─────────────────────────────────────────── */

/* Mobile: Stack vertically */
@media (max-width: 639px) {
    .fc-toolbar__inner {
        flex-wrap: wrap;
        height: auto;
        padding: var(--fc-spacing-3) 0;
        gap: var(--fc-spacing-3);
    }

    .fc-toolbar__left {
        order: 1;
        flex: 1;
    }

    .fc-toolbar__center {
        order: 3;
        width: 100%;
        flex-direction: column;
        gap: var(--fc-spacing-3);
    }

    .fc-toolbar__dates {
        width: 100%;
        justify-content: center;
    }

    .fc-toolbar__date-track {
        max-width: none;
        flex: 1;
        justify-content: center;
    }

    .fc-search-bar {
        max-width: none;
        width: 100%;
    }

    .fc-toolbar__right {
        order: 2;
        display: flex;
        gap: var(--fc-spacing-2);
    }
}

/* Tablet: Show filters, optimize spacing */
@media (min-width: 640px) and (max-width: 1023px) {
    .fc-toolbar__inner {
        gap: var(--fc-spacing-3);
    }

    .fc-toolbar__center {
        flex-direction: row;
        gap: var(--fc-spacing-3);
    }

    .fc-toolbar__right {
        display: flex;
        align-items: center;
        gap: var(--fc-spacing-2);
    }

    .fc-search-bar {
        max-width: 200px;
    }

    .fc-toolbar__date-track {
        max-width: 280px;
    }
}

/* Desktop: Full layout */
@media (min-width: 1024px) {
    .fc-toolbar__right {
        display: flex;
        align-items: center;
        gap: var(--fc-spacing-4);
    }

    .fc-search-bar {
        max-width: 280px;
    }

    .fc-toolbar__date-track {
        max-width: 360px;
    }
}

.fc-toolbar__summary {
    font-size: var(--fc-font-size-sm);
    color: var(--fc-slate-500);
}

/* ==========================================================================
   Search Bar
   ========================================================================== */

.fc-search-bar {
    position: relative;
    flex: 1;
    max-width: 280px;
}

.fc-search-bar__input {
    width: 100%;
    height: 40px;
    padding: 0 var(--fc-spacing-4) 0 40px;
    font-size: var(--fc-font-size-sm);
    border: 1px solid var(--fc-slate-200);
    border-radius: var(--fc-radius-lg);
    background: var(--fc-slate-50);
    color: var(--fc-slate-900);
    transition: border-color var(--fc-transition-fast), box-shadow var(--fc-transition-fast), background var(--fc-transition-fast);
}

.fc-search-bar__input:focus {
    outline: none;
    border-color: var(--fc-primary-500);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
    background: white;
}

.fc-search-bar__input::placeholder {
    color: var(--fc-slate-400);
}

.dark .fc-search-bar__input {
    background: var(--fc-slate-800);
    border-color: var(--fc-slate-700);
    color: white;
}

.dark .fc-search-bar__input:focus {
    background: var(--fc-slate-800);
    border-color: var(--fc-primary-500);
}

.fc-search-bar__icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--fc-slate-400);
    pointer-events: none;
}

.fc-search-bar__clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--fc-slate-400);
    cursor: pointer;
    border-radius: var(--fc-radius-sm);
    opacity: 0;
    transition: opacity var(--fc-transition-fast);
}

.fc-search-bar__input:not(:placeholder-shown) + .fc-search-bar__icon + .fc-search-bar__clear,
.fc-search-bar:focus-within .fc-search-bar__clear {
    opacity: 1;
}

.fc-search-bar__clear:hover {
    background: var(--fc-slate-100);
    color: var(--fc-slate-600);
}

/* Keyboard shortcut hint */
.fc-search-bar__hint {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    font-weight: 500;
    color: var(--fc-slate-400);
    background: var(--fc-slate-100);
    padding: 2px 6px;
    border-radius: var(--fc-radius-sm);
    pointer-events: none;
}

.fc-search-bar__input:focus ~ .fc-search-bar__hint,
.fc-search-bar__input:not(:placeholder-shown) ~ .fc-search-bar__hint {
    display: none;
}

.dark .fc-search-bar__hint {
    background: var(--fc-slate-700);
}

/* ==========================================================================
   League Pills (Competition Filter)
   ========================================================================== */

.fc-toolbar__leagues {
    border-top: 1px solid var(--fc-slate-100);
    padding: var(--fc-spacing-2) 0;
}

.dark .fc-toolbar__leagues {
    border-color: var(--fc-slate-800);
}

.fc-toolbar__league-track {
    display: flex;
    gap: var(--fc-spacing-2);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: var(--fc-spacing-1) 0;
}

.fc-toolbar__league-track::-webkit-scrollbar {
    display: none;
}

.fc-league-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--fc-spacing-2);
    padding: var(--fc-spacing-2) var(--fc-spacing-3);
    font-size: var(--fc-font-size-sm);
    font-weight: 500;
    color: var(--fc-slate-600);
    background: var(--fc-slate-100);
    border-radius: var(--fc-radius-full);
    text-decoration: none;
    white-space: nowrap;
    transition: background var(--fc-transition-fast), color var(--fc-transition-fast), transform var(--fc-transition-fast);
}

.fc-league-pill:hover {
    background: var(--fc-slate-200);
    color: var(--fc-slate-900);
    transform: translateY(-1px);
}

.fc-league-pill.is-active {
    background: var(--fc-primary-500);
    color: white;
}

.fc-league-pill.is-active:hover {
    background: var(--fc-primary-600);
}

.fc-league-pill__n {
    font-size: var(--fc-font-size-xs);
    font-weight: 600;
    padding: 1px 6px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: var(--fc-radius-full);
}

.fc-league-pill.is-active .fc-league-pill__n {
    background: rgba(255, 255, 255, 0.2);
}

.dark .fc-league-pill {
    background: var(--fc-slate-800);
    color: var(--fc-slate-300);
}

.dark .fc-league-pill:hover {
    background: var(--fc-slate-700);
    color: white;
}

/* ==========================================================================
   Filter Controls Row
   ========================================================================== */

.fc-filters {
    display: flex;
    align-items: center;
    gap: var(--fc-spacing-3);
    padding: var(--fc-spacing-3) 0;
    border-bottom: 1px solid var(--fc-slate-100);
}

.dark .fc-filters {
    border-color: var(--fc-slate-800);
}

.fc-filters__group {
    display: flex;
    align-items: center;
    gap: var(--fc-spacing-2);
}

.fc-filters__label {
    font-size: var(--fc-font-size-xs);
    font-weight: 500;
    color: var(--fc-slate-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.fc-filters__select {
    height: 32px;
    padding: 0 var(--fc-spacing-8) 0 var(--fc-spacing-3);
    font-size: var(--fc-font-size-sm);
    font-weight: 500;
    color: var(--fc-slate-700);
    background: white;
    border: 1px solid var(--fc-slate-200);
    border-radius: var(--fc-radius-md);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b'%3E%3Cpath d='M3 5l3 3 3-3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

.fc-filters__select:focus {
    outline: none;
    border-color: var(--fc-primary-500);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.dark .fc-filters__select {
    background-color: var(--fc-slate-800);
    border-color: var(--fc-slate-700);
    color: white;
}

/* ==========================================================================
   Prognostic Grid & Cards
   ========================================================================== */

.fc-prog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--fc-spacing-4);
}

@media (min-width: 640px) {
    .fc-prog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .fc-prog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1280px) {
    .fc-prog-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.fc-prog-grid__item {
    opacity: 0;
    transform: translateY(10px);
}

.fc-prog-grid__item.is-visible {
    animation: fc-fade-in 0.3s ease forwards;
}

@keyframes fc-fade-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card styles (enhanced) */
.fc-card {
    display: flex;
    flex-direction: column;
    gap: var(--fc-spacing-3);
    padding: var(--fc-spacing-4);
    background: white;
    border-radius: var(--fc-radius-xl);
    border: 1px solid var(--fc-slate-200);
    text-decoration: none;
    color: inherit;
    transition: box-shadow var(--fc-transition-base), transform var(--fc-transition-base), border-color var(--fc-transition-base);
}

.fc-card:hover {
    box-shadow: var(--fc-shadow-lg);
    transform: translateY(-2px);
    border-color: var(--fc-primary-300);
}

.dark .fc-card {
    background: var(--fc-slate-800);
    border-color: var(--fc-slate-700);
}

.dark .fc-card:hover {
    border-color: var(--fc-primary-500);
}

/* Confidence indicator strip */
.fc-card[data-confidence="green"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 16px;
    right: 16px;
    height: 3px;
    background: var(--fc-conf-high);
    border-radius: 0 0 var(--fc-radius-sm) var(--fc-radius-sm);
}

.fc-card[data-confidence="amber"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 16px;
    right: 16px;
    height: 3px;
    background: var(--fc-conf-medium);
    border-radius: 0 0 var(--fc-radius-sm) var(--fc-radius-sm);
}

.fc-card[data-confidence="red"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 16px;
    right: 16px;
    height: 3px;
    background: var(--fc-conf-low);
    border-radius: 0 0 var(--fc-radius-sm) var(--fc-radius-sm);
}

.fc-card {
    position: relative;
    padding-top: calc(var(--fc-spacing-4) + 3px);
}

/* Card meta row */
.fc-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--fc-spacing-2);
}

.fc-card__comp {
    font-size: var(--fc-font-size-xs);
    font-weight: 600;
    color: var(--fc-slate-500);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fc-card__time {
    font-size: var(--fc-font-size-xs);
    font-weight: 600;
    color: var(--fc-primary-600);
}

/* Card matchup */
.fc-card__matchup {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--fc-spacing-2);
}

.fc-card__team {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.fc-card__team--away {
    text-align: right;
    align-items: flex-end;
}

.fc-card__name {
    font-size: var(--fc-font-size-sm);
    font-weight: 600;
    color: var(--fc-slate-900);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dark .fc-card__name {
    color: white;
}

.fc-card__team.is-fav .fc-card__name {
    color: var(--fc-primary-600);
}

.dark .fc-card__team.is-fav .fc-card__name {
    color: var(--fc-primary-400);
}

.fc-card__pct {
    font-size: var(--fc-font-size-xs);
    font-weight: 700;
    color: var(--fc-slate-500);
}

.fc-card__team.is-fav .fc-card__pct {
    color: var(--fc-primary-600);
}

/* Score column */
.fc-card__score-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    width: 64px;
}

.fc-card__score {
    font-size: var(--fc-font-size-lg);
    font-weight: 700;
    color: var(--fc-slate-900);
}

.dark .fc-card__score {
    color: white;
}

.fc-card__vs {
    font-size: var(--fc-font-size-sm);
    font-weight: 500;
    color: var(--fc-slate-400);
}

.fc-card__draw-pct {
    font-size: 10px;
    font-weight: 600;
    color: var(--fc-slate-400);
}

/* Probability bar */
.fc-card__bar {
    display: flex;
    height: 4px;
    border-radius: var(--fc-radius-full);
    overflow: hidden;
    background: var(--fc-slate-200);
}

.dark .fc-card__bar {
    background: var(--fc-slate-700);
}

.fc-card__bar-seg {
    transition: width var(--fc-transition-slow);
}

.fc-card__bar-seg--home {
    background: var(--fc-bar-home);
}

.fc-card__bar-seg--draw {
    background: var(--fc-bar-draw);
}

.fc-card__bar-seg--away {
    background: var(--fc-bar-away);
}

/* Pills row */
.fc-card__pills {
    display: flex;
    align-items: center;
    gap: var(--fc-spacing-2);
    flex-wrap: wrap;
}

.fc-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-radius: var(--fc-radius-sm);
    background: var(--fc-slate-100);
    color: var(--fc-slate-600);
}

.dark .fc-pill {
    background: var(--fc-slate-700);
    color: var(--fc-slate-300);
}

.fc-pill--over {
    background: var(--fc-conf-high-bg);
    color: var(--fc-conf-high);
}

.fc-pill--under {
    background: var(--fc-conf-low-bg);
    color: var(--fc-conf-low);
}

.fc-pill--btts-yes {
    background: var(--fc-conf-high-bg);
    color: var(--fc-conf-high);
}

.fc-pill--btts-no {
    background: var(--fc-slate-100);
    color: var(--fc-slate-500);
}

.fc-pill--conf-green {
    background: var(--fc-conf-high-bg);
    color: var(--fc-conf-high);
}

.fc-pill--conf-amber {
    background: var(--fc-conf-medium-bg);
    color: var(--fc-conf-medium);
}

.fc-pill--conf-red {
    background: var(--fc-conf-low-bg);
    color: var(--fc-conf-low);
}

.fc-card__arrow {
    margin-left: auto;
    color: var(--fc-slate-400);
    font-size: var(--fc-font-size-lg);
    transition: transform var(--fc-transition-fast), color var(--fc-transition-fast);
}

.fc-card:hover .fc-card__arrow {
    transform: translateX(4px);
    color: var(--fc-primary-500);
}

/* ==========================================================================
   Skeleton Loaders
   ========================================================================== */

@keyframes fc-skeleton-shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

.fc-prog-skeleton {
    display: flex;
    flex-direction: column;
    gap: var(--fc-spacing-3);
    padding: var(--fc-spacing-4);
    background: white;
    border-radius: var(--fc-radius-xl);
    border: 1px solid var(--fc-slate-200);
}

.dark .fc-prog-skeleton {
    background: var(--fc-slate-800);
    border-color: var(--fc-slate-700);
}

.fc-prog-skeleton__header,
.fc-prog-skeleton__team,
.fc-prog-skeleton__score,
.fc-prog-skeleton__bar,
.fc-prog-skeleton__pills {
    background: linear-gradient(
        90deg,
        var(--fc-skeleton-base) 0%,
        var(--fc-skeleton-shine) 50%,
        var(--fc-skeleton-base) 100%
    );
    background-size: 200px 100%;
    animation: fc-skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: var(--fc-radius-sm);
}

.fc-prog-skeleton__header {
    height: 12px;
    width: 40%;
}

.fc-prog-skeleton__matchup {
    display: flex;
    align-items: center;
    gap: var(--fc-spacing-2);
}

.fc-prog-skeleton__team {
    flex: 1;
    height: 32px;
}

.fc-prog-skeleton__score {
    width: 64px;
    height: 24px;
    flex-shrink: 0;
}

.fc-prog-skeleton__bar {
    height: 4px;
    width: 100%;
}

.fc-prog-skeleton__pills {
    height: 20px;
    width: 60%;
}

/* ==========================================================================
   Empty & Error States
   ========================================================================== */

.fc-prog-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--fc-spacing-16) var(--fc-spacing-4);
    grid-column: 1 / -1;
}

.fc-prog-empty--inline {
    padding: var(--fc-spacing-8) var(--fc-spacing-4);
}

.fc-prog-empty__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    margin-bottom: var(--fc-spacing-4);
    background: var(--fc-slate-100);
    border-radius: 50%;
    color: var(--fc-slate-400);
}

.dark .fc-prog-empty__icon {
    background: var(--fc-slate-800);
}

.fc-prog-empty__title {
    margin: 0 0 var(--fc-spacing-2);
    font-size: var(--fc-font-size-lg);
    font-weight: 600;
    color: var(--fc-slate-900);
}

.dark .fc-prog-empty__title {
    color: white;
}

.fc-prog-empty__text {
    margin: 0 0 var(--fc-spacing-6);
    font-size: var(--fc-font-size-sm);
    color: var(--fc-slate-500);
    max-width: 320px;
}

.fc-prog-empty__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--fc-spacing-2);
    justify-content: center;
}

/* ==========================================================================
   Load More Button
   ========================================================================== */

.fc-load-more {
    display: flex;
    justify-content: center;
    padding: var(--fc-spacing-8) 0;
}

.fc-load-more__btn {
    display: inline-flex;
    align-items: center;
    gap: var(--fc-spacing-2);
    padding: var(--fc-spacing-3) var(--fc-spacing-6);
    font-size: var(--fc-font-size-sm);
    font-weight: 600;
    color: var(--fc-primary-600);
    background: transparent;
    border: 2px solid var(--fc-primary-500);
    border-radius: var(--fc-radius-lg);
    cursor: pointer;
    transition: background var(--fc-transition-fast), color var(--fc-transition-fast);
}

.fc-load-more__btn:hover:not(:disabled) {
    background: var(--fc-primary-500);
    color: white;
}

.fc-load-more__btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.fc-load-more__btn.is-loading {
    pointer-events: none;
}

.fc-load-more__btn.is-loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: fc-spin 0.6s linear infinite;
}

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

/* ==========================================================================
   Live Matches Section (Enhanced)
   ========================================================================== */

.fc-live-section {
    padding: var(--fc-spacing-6) 0;
    background: var(--fc-slate-50);
    border-top: 1px solid var(--fc-slate-200);
    border-bottom: 1px solid var(--fc-slate-200);
}

.dark .fc-live-section {
    background: var(--fc-slate-900);
    border-color: var(--fc-slate-800);
}

.fc-live-section--active {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.03), rgba(34, 197, 94, 0.03));
}

.dark .fc-live-section--active {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05), rgba(34, 197, 94, 0.05));
}

.fc-live__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--fc-spacing-4);
}

.fc-live__title {
    display: flex;
    align-items: center;
    gap: var(--fc-spacing-2);
    margin: 0;
    font-size: var(--fc-font-size-lg);
    font-weight: 700;
    color: var(--fc-slate-900);
}

.dark .fc-live__title {
    color: white;
}

.fc-live__pulse {
    width: 8px;
    height: 8px;
    background: var(--fc-live-pulse);
    border-radius: 50%;
    animation: fc-pulse 1.5s ease-in-out infinite;
}

@keyframes fc-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.fc-live__count {
    font-size: var(--fc-font-size-base);
    font-weight: 500;
    color: var(--fc-slate-500);
}

.fc-live__date {
    font-size: var(--fc-font-size-xs);
    color: var(--fc-slate-500);
}

.fc-live__view-all {
    font-size: var(--fc-font-size-sm);
    font-weight: 600;
    color: var(--fc-primary-600);
    text-decoration: none;
    white-space: nowrap;
}

.fc-live__view-all:hover {
    text-decoration: underline;
}

/* Scroll container */
.fc-live__scroll {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin: 0 calc(var(--fc-spacing-4) * -1);
    padding: 0 var(--fc-spacing-4);
    scroll-snap-type: x mandatory;
}

.fc-live__scroll::-webkit-scrollbar {
    display: none;
}

.fc-live__track {
    display: flex;
    gap: var(--fc-spacing-3);
    padding: var(--fc-spacing-2) 0;
}

/* Live match card */
.fc-live__card {
    flex-shrink: 0;
    width: 240px;
    padding: var(--fc-spacing-4);
    background: white;
    border-radius: var(--fc-radius-xl);
    border: 1px solid var(--fc-slate-200);
    text-decoration: none;
    color: inherit;
    scroll-snap-align: start;
    transition: box-shadow var(--fc-transition-base), transform var(--fc-transition-base), border-color var(--fc-transition-base);
}

.fc-live__card:hover {
    box-shadow: var(--fc-shadow-md);
    transform: translateY(-2px);
}

.dark .fc-live__card {
    background: var(--fc-slate-800);
    border-color: var(--fc-slate-700);
}

.fc-live__card--live {
    border-color: var(--fc-live-pulse);
    background: linear-gradient(135deg, white, rgba(239, 68, 68, 0.02));
}

.dark .fc-live__card--live {
    background: linear-gradient(135deg, var(--fc-slate-800), rgba(239, 68, 68, 0.05));
    border-color: var(--fc-live-pulse);
}

.fc-live__card--finished {
    opacity: 0.7;
}

.fc-live__card--finished:hover {
    opacity: 1;
}

.fc-live__comp {
    display: flex;
    align-items: center;
    gap: var(--fc-spacing-2);
    font-size: var(--fc-font-size-xs);
    font-weight: 600;
    color: var(--fc-slate-500);
    margin-bottom: var(--fc-spacing-3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fc-live__round {
    font-weight: 400;
    color: var(--fc-slate-400);
}

.fc-live__matchup {
    display: flex;
    flex-direction: column;
    gap: var(--fc-spacing-2);
}

.fc-live__team {
    display: flex;
    align-items: center;
    gap: var(--fc-spacing-2);
}

.fc-live__team img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.fc-live__team-name {
    flex: 1;
    font-size: var(--fc-font-size-sm);
    font-weight: 600;
    color: var(--fc-slate-900);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dark .fc-live__team-name {
    color: white;
}

.fc-live__center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: var(--fc-spacing-2) 0;
}

.fc-live__badge-live {
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: white;
    background: var(--fc-live-pulse);
    border-radius: var(--fc-radius-sm);
    animation: fc-pulse 1.5s ease-in-out infinite;
}

.fc-live__score {
    font-size: var(--fc-font-size-xl);
    font-weight: 700;
    color: var(--fc-slate-900);
}

.dark .fc-live__score {
    color: white;
}

.fc-live__score--live {
    color: var(--fc-live-pulse);
}

.fc-live__score--flash {
    animation: fc-score-flash 0.5s ease 3;
}

@keyframes fc-score-flash {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); color: var(--fc-primary-500); }
}

.fc-live__status-ft {
    font-size: var(--fc-font-size-xs);
    font-weight: 600;
    color: var(--fc-slate-400);
}

/* Navigation buttons */
.fc-live__nav {
    display: none;
    justify-content: center;
    gap: var(--fc-spacing-2);
    margin-top: var(--fc-spacing-4);
}

@media (min-width: 768px) {
    .fc-live__nav {
        display: flex;
    }
}

.fc-live__nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--fc-slate-200);
    border-radius: var(--fc-radius-lg);
    background: white;
    color: var(--fc-slate-600);
    cursor: pointer;
    transition: background var(--fc-transition-fast), color var(--fc-transition-fast), border-color var(--fc-transition-fast);
}

.fc-live__nav-btn:hover:not(:disabled) {
    background: var(--fc-slate-50);
    border-color: var(--fc-slate-300);
    color: var(--fc-slate-900);
}

.fc-live__nav-btn:disabled,
.fc-live__nav-btn.is-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.dark .fc-live__nav-btn {
    background: var(--fc-slate-800);
    border-color: var(--fc-slate-700);
    color: var(--fc-slate-400);
}

.dark .fc-live__nav-btn:hover:not(:disabled) {
    background: var(--fc-slate-700);
    color: white;
}

/* ==========================================================================
   Mobile Optimizations
   ========================================================================== */

@media (max-width: 767px) {
    .fc-toolbar__inner {
        flex-wrap: wrap;
        height: auto;
        padding: var(--fc-spacing-3) 0;
        gap: var(--fc-spacing-3);
    }

    .fc-toolbar__left {
        flex: 0 0 auto;
    }

    .fc-toolbar__dates {
        flex: 1 1 100%;
        order: 3;
        justify-content: center;
    }

    .fc-toolbar__date-track {
        max-width: 100%;
    }

    .fc-search-bar {
        flex: 1 1 100%;
        max-width: none;
        order: 4;
        margin-top: var(--fc-spacing-2);
    }

    .fc-filters {
        flex-wrap: wrap;
    }

    .fc-prog-grid {
        gap: var(--fc-spacing-3);
    }

    .fc-live__card {
        width: 200px;
    }
}

/* Touch-friendly tap targets */
@media (hover: none) and (pointer: coarse) {
    .fc-toolbar__date,
    .fc-league-pill,
    .fc-live__nav-btn {
        min-height: 44px;
        min-width: 44px;
    }

    .fc-card {
        padding: var(--fc-spacing-5);
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .fc-toolbar,
    .fc-filters,
    .fc-live__nav,
    .fc-load-more {
        display: none !important;
    }

    .fc-prog-grid {
        display: block;
    }

    .fc-prog-grid__item {
        page-break-inside: avoid;
        margin-bottom: 1rem;
    }

    .fc-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .fc-prog-grid__item {
        opacity: 1;
        transform: none;
    }

    .fc-live__pulse {
        animation: none;
    }

    .fc-load-more__btn.is-loading::after {
        animation: none;
    }
}
