/* ================================
   Bills Schedule Widget Styles
   Premium Liquid Frost Design
   ================================ */

.bufwtf-schedule-widget {
    background: var(--glass-bg);
    backdrop-filter: blur(calc(var(--glass-blur) * 1.5));
    -webkit-backdrop-filter: blur(calc(var(--glass-blur) * 1.5));
    border: 1.5px solid var(--glass-border);
    border-radius: var(--rounded-xl);
    padding: 2rem;
    box-shadow:
        0 24px 48px var(--glass-shadow),
        inset 0 1px 0 var(--glass-highlight),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

/* Subtle gradient overlay */
.bufwtf-schedule-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: radial-gradient(ellipse at top, rgba(0, 51, 141, 0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.bufwtf-schedule-widget > * {
    position: relative;
    z-index: 1;
}

.bufwtf-schedule-widget .widget-title {
    font-family: var(--font-headline);
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-container) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: -0.02em;
}

.bufwtf-schedule-widget .widget-title::before {
    content: '🏈';
    font-size: 1.5rem;
    -webkit-text-fill-color: initial;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.bills-schedule {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.schedule-game {
    background: linear-gradient(135deg, var(--surface-container-lowest) 0%, var(--surface-container-low) 100%);
    border: 1px solid var(--outline-variant);
    border-radius: var(--rounded-xl);
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Subtle shine effect on hover */
.schedule-game::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.schedule-game:hover::after {
    left: 100%;
}

.schedule-game:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow:
        0 8px 24px var(--glass-shadow),
        0 0 0 1px var(--primary),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.schedule-game.live {
    border-color: var(--secondary);
    border-width: 2px;
    background: linear-gradient(135deg, var(--surface-container-low) 0%, var(--secondary-container) 5%, var(--surface-container-low) 100%);
    animation: pulse-border 2.5s ease-in-out infinite;
}

@keyframes pulse-border {
    0%, 100% {
        border-color: var(--secondary);
        box-shadow:
            0 0 0 0 rgba(186, 0, 42, 0.5),
            0 4px 12px var(--glass-shadow);
    }
    50% {
        border-color: var(--secondary-container);
        box-shadow:
            0 0 0 6px rgba(186, 0, 42, 0.15),
            0 8px 24px var(--glass-shadow);
    }
}

.schedule-game.completed {
    opacity: 0.7;
    filter: saturate(0.8);
}

.game-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.4rem 0.9rem;
    border-radius: var(--rounded-full);
    background: var(--surface-container-high);
    color: var(--on-surface-variant);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(8px);
}

.game-status.live-badge {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-container) 100%);
    color: var(--on-secondary);
    animation: pulse-glow 2s ease-in-out infinite;
    box-shadow:
        0 2px 12px rgba(186, 0, 42, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow:
            0 2px 12px rgba(186, 0, 42, 0.4),
            0 0 20px rgba(186, 0, 42, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow:
            0 2px 16px rgba(186, 0, 42, 0.6),
            0 0 30px rgba(186, 0, 42, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}

.game-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-right: 4.5rem;
}

.game-opponent {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-body);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--on-surface);
    line-height: 1.3;
}

.vs-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: var(--surface-container-high);
    padding: 0.25rem 0.5rem;
    border-radius: var(--rounded);
    flex-shrink: 0;
}

.opponent-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: var(--rounded);
    background: var(--surface-container-lowest);
    padding: 4px;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.opponent-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-date {
    font-family: var(--font-mono);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--on-surface-variant);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.game-date::before {
    content: '📅';
    font-size: 1rem;
    opacity: 0.8;
}

.game-score {
    font-family: var(--font-headline);
    font-size: 1.75rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: -0.02em;
}

.game-score.won {
    animation: score-won 0.5s ease-out;
}

@keyframes score-won {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.game-score.won .score-bills {
    color: var(--primary);
    text-shadow: 0 2px 8px rgba(0, 51, 141, 0.3);
}

.game-score.lost .score-bills {
    color: var(--on-surface-variant);
    opacity: 0.7;
}

.score-bills {
    color: var(--primary);
    font-weight: 900;
}

.score-opponent {
    color: var(--on-surface-variant);
    font-weight: 700;
}

.game-score::after {
    content: attr(data-result);
    position: absolute;
    bottom: 0.5rem;
    right: 1rem;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.5;
}

.schedule-error {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--on-surface-variant);
    text-align: center;
    padding: 2rem 1rem;
    background: var(--surface-container-low);
    border-radius: var(--rounded-lg);
    border: 1px dashed var(--outline-variant);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .bufwtf-schedule-widget {
        padding: 1.5rem;
    }

    .bufwtf-schedule-widget .widget-title {
        font-size: 1.5rem;
    }

    .schedule-game {
        padding: 1.25rem;
    }

    .game-opponent {
        font-size: 1rem;
    }

    .opponent-logo {
        width: 36px;
        height: 36px;
    }

    .game-score {
        font-size: 1.5rem;
    }

    .game-info {
        padding-right: 3.5rem;
    }

    .game-status {
        font-size: 0.65rem;
        padding: 0.35rem 0.7rem;
    }
}

/* Sidebar widget specific */
.widget-area .bufwtf-schedule-widget {
    margin-bottom: 2.5rem;
}

/* Floating widget variant (Premium placement) */
.schedule-floating {
    position: fixed;
    top: 140px;
    right: 2rem;
    width: 360px;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
    z-index: 80;
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    animation: float-in 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes float-in {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.schedule-floating::-webkit-scrollbar {
    width: 8px;
}

.schedule-floating::-webkit-scrollbar-track {
    background: var(--surface-container-low);
    border-radius: var(--rounded);
}

.schedule-floating::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-container) 100%);
    border-radius: var(--rounded);
    border: 2px solid var(--surface-container-low);
}

.schedule-floating::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

@media (max-width: 1500px) {
    .schedule-floating {
        width: 320px;
        right: 1.5rem;
    }
}

@media (max-width: 1400px) {
    .schedule-floating {
        display: none;
    }
}

/* Footer widget area */
.footer .bufwtf-schedule-widget {
    background: var(--surface-container-low);
    border-color: var(--outline-variant);
}

.footer .bufwtf-schedule-widget .widget-title {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
