/* GT Racing Calendar - Custom Styles */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a2e;
}

::-webkit-scrollbar-thumb {
    background: #3a3a5e;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4a4a7e;
}

/* Racing stripe animation */
@keyframes racing-stripe {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.racing-stripe {
    position: relative;
    overflow: hidden;
}

.racing-stripe::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #E10600, transparent);
    animation: racing-stripe 2s ease-in-out infinite;
}

/* Race card hover effects */
.race-card {
    transition: all 0.2s ease;
    position: relative;
}

.race-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--category-color, #3b82f6);
    border-radius: 3px 0 0 3px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.race-card:hover {
    transform: translateX(4px);
    background-color: rgba(255, 255, 255, 0.03);
}

.race-card:hover::before {
    opacity: 1;
}

/* Category colors */
.race-card[data-category="gt3"] {
    --category-color: #3b82f6;
}

.race-card[data-category="gt4"] {
    --category-color: #22c55e;
}

.race-card[data-category="hypercar"] {
    --category-color: #E10600;
}

.race-card[data-category="endurance"] {
    --category-color: #ffd700;
}

/* Series badge colors */
.series-badge {
    font-size: 0.65rem;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.series-badge.wec {
    background: linear-gradient(135deg, #E10600, #8B0000);
    color: white;
}

.series-badge.imsa {
    background: linear-gradient(135deg, #1e40af, #1e3a8a);
    color: white;
}

.series-badge.gtwc-eu {
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
}

.series-badge.gtwc-am {
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    color: white;
}

.series-badge.gtwc-asia {
    background: linear-gradient(135deg, #d97706, #b45309);
    color: white;
}

.series-badge.supergt {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
}

.series-badge.elms {
    background: linear-gradient(135deg, #0891b2, #0e7490);
    color: white;
}

.series-badge.alms {
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    color: white;
}

.series-badge.britishgt {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    color: white;
}

.series-badge.igtc {
    background: linear-gradient(135deg, #ffd700, #b8860b);
    color: #1a1a2e;
}

/* Duration badge */
.duration-badge {
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-weight: 500;
}

.duration-badge.sprint {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.duration-badge.medium {
    background: rgba(234, 179, 8, 0.2);
    color: #fbbf24;
}

.duration-badge.long {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.duration-badge.endurance {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
}

/* Urgency badges */
.urgency-badge {
    display: inline-block;
    font-size: 0.6rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.urgency-live {
    background: #E10600;
    color: white;
    animation: pulse-live 1.5s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(225, 6, 0, 0.5);
}

.urgency-completed {
    background: rgba(107, 114, 128, 0.3);
    color: #9ca3af;
}

.urgency-today {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.4);
}

.urgency-tomorrow {
    background: linear-gradient(135deg, #ea580c, #c2410c);
    color: white;
}

.urgency-weekend {
    background: linear-gradient(135deg, #eab308, #ca8a04);
    color: #1a1a2e;
}

/* Calendar day cells */
.calendar-day {
    min-height: 100px;
    border-right: 1px solid rgba(75, 85, 99, 0.3);
    border-bottom: 1px solid rgba(75, 85, 99, 0.3);
    transition: background-color 0.2s ease;
}

.calendar-day:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.calendar-day.today {
    background-color: rgba(0, 212, 255, 0.1);
}

.calendar-day.other-month {
    opacity: 0.4;
}

.calendar-day .race-indicator {
    font-size: 0.6rem;
    padding: 2px 4px;
    border-radius: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.calendar-day .race-indicator:hover {
    transform: scale(1.02);
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, #2a2a4e 25%, #3a3a5e 50%, #2a2a4e 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Pulse animation for live indicator */
@keyframes pulse-live {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.live-indicator {
    animation: pulse-live 1.5s ease-in-out infinite;
}

/* Filter checkbox custom style */
input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    cursor: pointer;
}

/* Modal animation */
#race-modal > div,
#timezone-modal > div {
    animation: modal-in 0.2s ease-out;
}

@keyframes modal-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Quick filter active state */
.quick-filter.active {
    background-color: #E10600 !important;
    color: white !important;
}

/* View toggle active state */
.view-toggle.active {
    background-color: #00d4ff !important;
    color: #1a1a2e !important;
}

/* Session time row */
.session-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(75, 85, 99, 0.3);
}

.session-row:last-child {
    border-bottom: none;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .calendar-day {
        min-height: 70px;
        padding: 0.25rem;
    }

    .calendar-day .race-indicator {
        font-size: 0.5rem;
        padding: 1px 3px;
    }

    .race-card {
        padding: 0.75rem;
    }
}

/* Print styles */
@media print {
    body {
        background: white;
        color: black;
    }

    header, footer, aside {
        display: none;
    }

    .race-card {
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
}
