/* NFL Touchdowns Dashboard Styles */
@import 'common.css';

/* Touchdowns.live Specific Styles */

/* NFL Theme Variables - Non-conflicting sport-specific colors only */
:root {
    --heading-font: 'Anton', Impact, 'Arial Black', sans-serif;
    
    /* NFL Brand Colors - Use nfl- prefix to avoid conflicts with dynamic theming */
    --nfl-muted: #646464;
    --nfl-primary: #6801a7;
    --nfl-primary-foreground: #ffffff;
    --nfl-secondary: #8B5CF6;
    --nfl-accent: #A855F7;
    --nfl-light: #C084FC;
    --nfl-dark: #581C87;
    
    /* NFL Gradients - Use dynamic primary color set by JavaScript */
    --nfl-gradient: linear-gradient(135deg, hsl(var(--primary)) 0%, var(--nfl-secondary) 100%);
    --nfl-gradient-full: linear-gradient(135deg, hsl(var(--primary)) 0%, var(--nfl-secondary) 50%, var(--nfl-accent) 100%);
}

/* Dark mode color adjustments for NFL-specific colors */
.dark {
    --nfl-primary: #8B5CF6;
    --nfl-secondary: #A855F7;
    --nfl-accent: #C084FC;
      /* NFL Gradients - Use dynamic primary color set by JavaScript */
      --nfl-gradient: linear-gradient(135deg, hsl(var(--primary)) 0%, var(--nfl-secondary) 100%);
      --nfl-gradient-full: linear-gradient(135deg, hsl(var(--primary)) 0%, var(--nfl-secondary) 50%, var(--nfl-accent) 100%);
}

/* Core Styles */
.first-touchdown {
    position: relative;
}

.first-touchdown::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: #10B981; /* green-500 */
}

/* UI Elements */
.update-notification {
    transition: opacity 0.3s ease-in-out;
}

/* Loading States */
#loading-indicator {
    transition: opacity 0.2s ease-in-out;
}

/* Animations */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Interactive Elements */
.touchdown-card {
    transition: transform 0.2s ease-in-out;
}

.touchdown-card:hover {
    transform: translateX(4px);
}

/* Range Slider Styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: #e5e7eb;
    border-radius: 5px;
    background-image: linear-gradient(#6801A7, #6801A7);
    background-repeat: no-repeat;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #6801A7;
    cursor: pointer;
    box-shadow: 0 0 2px 0 #555;
    transition: background .3s ease-in-out;
}

#bread nav {
    z-index: 1;
}

/* Pattern Background */
.bg-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='3'/%3E%3Ccircle cx='13' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E");
}

/* Season Tabs */
.season-tab {
    border-bottom: 2px solid transparent;
    color: #6b7280;
    transition: all 0.2s ease-in-out;
}

.season-tab:hover {
    color: #6801A7;
    border-bottom-color: #d1d5db;
}

.season-tab.active-tab {
    color: #6801A7;
    border-bottom-color: #6801A7;
}

.season-content {
    transition: opacity 0.3s ease-in-out;
}

.season-content.hidden {
    display: none;
}

/* Parallax Background */
.parallax {
    background-image: url("https://sheet.today/static/sports/nfl/background.jpg");
    background-attachment: fixed;
    background-position: center top;
    background-repeat: no-repeat;
    background-size: contain;
    position: relative;
    overflow: hidden;
}

/* Fallback for iOS Safari */
@media (max-width: 768px) {
    .parallax {
        background-attachment: scroll;
        background-size: cover;
        /* Alternative parallax effect using transform */
        transform: translateZ(0);
    }
}

.bg-hero-image {
    /* Optional overlay for better text visibility */
    background: rgba(25, 0, 50, 0.7); /* Adjust opacity and color as needed */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Ensure the header has enough height to display the image */
.touchdown-header {
    height: 400px; /* Adjust as needed */
    position: relative;
    z-index: 2;
}

/* Adjust z-index to ensure content stays above the background */
.parallax {
    z-index: 0;
    padding-top: 135px; 
    margin-top: -135px; 
}

.touchdown-header .container {
    position: relative;
    z-index: 10;
}

/* Additional Enhancements for Mobile */
@media (max-width: 768px) {
    .touchdown-header {
        height: 300px; /* Reduced height for smaller screens */
        padding: 40px 0; 
        margin: 0; 
    }

    .title-page-header {
        font-size: 3em !important; 
    }

    #bread {
        display: none; 
    }

    .bg-hero-image {
        background: rgba(25, 0, 50, 0.6); /* Adjust opacity for mobile */
    }
}


/* NFL gradient text (like WNBA) */
.nfl-gradient {
    background: var(--nfl-gradient);
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    display: inline-block;
}


/* Typography - New Heading Hierarchy */
h1, .h1 {
    font-family: var(--heading-font);
    font-size: 4.5rem; /* 72px */
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    font-weight: 400; /* Anton only comes in 400 weight */
    margin-bottom: 0.5em;
}

/* Table of Contents Styles */
.hero-area {
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.dark .hero-area {
    background: linear-gradient(145deg, #1f2020, #0d0e0f);
    border-color: #6b7280;
}

.game-header {
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border-color: #dee2e6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.dark .game-header {
    background: linear-gradient(145deg, #1f2020, #000000);
    border-color: #6b7280;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.toc-divider {
    margin-bottom: 16px;
    border-bottom: 2px solid #6801A7;
    padding-bottom: 8px;
}

.toc-timeslot {
    margin-bottom: 12px;
    flex: 1 1 14%; /* More flexible for up to 7 time slots */
    min-width: 140px; /* Reduced min-width to fit more slots */
    max-width: 280px; /* Slightly reduced max-width */
}

.toc-timeslot-title {
    font-weight: 600;
    color: #4b5563;
    font-size: 0.9rem;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dark .toc-timeslot-title {
    color: #d1d5db;
}

.toc-content {
    display: flex;
    flex-wrap: wrap;
    gap: 8px; /* Reduced gap to allow more room for time slots */
}

.toc-games {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 6px;
    align-content: flex-start;
    max-height: 400px; /* Allow up to ~3 columns by limiting height */
}

.toc-game-link {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.toc-game-link:hover {
    text-decoration: none;
}

.toc-game-link.inactive:hover {
    transform: none;
    box-shadow: none;
}

.dark .toc-game-link.inactive {
    background: #374151;
    color: #6b7280;
    border-color: #4b5563;
}

@media (max-width: 768px) {
    h1, .h1 {
        font-size: 3rem !important;
    }

    h2, .h2 {
        font-size: 1.75rem !important;
    }

    .toc-content {
        flex-direction: column; /* Stack time slots vertically on mobile */
    }

    .toc-container {
        margin-bottom: 20px;
    }
    
    .toc-timeslot {
        flex: 1 1 100%; /* Full width on mobile */
        max-width: none;
        margin-bottom: 20px;
    }
    
    .toc-games {
        gap: 6px;
        flex-direction: row; /* Row layout on mobile to fill width first */
        flex-wrap: wrap; /* Allow wrapping to new rows */
        max-height: none; /* Remove height constraint on mobile */
    }
    
    .toc-game-link {
        padding: 3px 8px;
        font-size: 0.75rem;
    }
}

/* Touchdown-specific components from nfl.css */
.touchdown-tracker {
    border-left: 4px solid hsl(var(--primary));
    background: linear-gradient(90deg, hsl(var(--primary) / 0.1) 0%, transparent 100%);
    transition: all 0.3s ease;
}

.touchdown-tracker:hover {
    background: linear-gradient(90deg, hsl(var(--primary) / 0.15) 0%, transparent 100%);
    transform: translateX(2px);
}

.dark .touchdown-tracker {
    background: linear-gradient(90deg, hsl(var(--primary) / 0.1) 0%, transparent 100%);
}

.dark .touchdown-tracker:hover {
    background: linear-gradient(90deg, hsl(var(--primary) / 0.15) 0%, transparent 100%);
}

/* Touchdown celebration animation */
@keyframes touchdown {
    0% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(5deg); }
    50% { transform: scale(1.2) rotate(-5deg); }
    75% { transform: scale(1.1) rotate(3deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.touchdown-celebration {
    animation: touchdown 0.6s ease-in-out;
}

/* Touchdown notifications */
.td-notification {
    animation: slideInRight 0.5s ease-out;
    border-left: 4px solid hsl(var(--primary));
    background: linear-gradient(90deg, hsl(var(--primary) / 0.1) 0%, transparent 100%);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .touchdown-tracker,
    .touchdown-card,
    .touchdown-celebration {
        transition: none;
    }
    
    .td-notification {
        animation: none;
    }
    
    .touchdown-celebration {
        animation: none;
    }
}

/* Comprehensive Table of Contents Styles */
.toc-game-link {
    display: block;
    padding: 6px 10px;
    margin-bottom: 2px;
    border-radius: 4px;
    transition: all 0.2s ease;
    position: relative;
    font-size: 0.875rem;
}

.gme-td-active, .dark .game-td-active {
    background-color: #ececec;
    color: #1e40af;
    border-color: #3b82f6;
    cursor: pointer;
}

.game-td-active:hover, .dark .game-td-active:hover {
    background-color: #ececec;
    color: #000;
    border-color: #3b82f6;
}

.toc-game-link.live-no-tds {
    background-color: #fef3c7;
    color: #92400e;
    border-color: #f59e0b;
    border-style: dashed;
}

.completed {
    background-color: #ececec;
    color: #1e40af;
    border-color: #3b82f6;
    cursor: pointer;
}

.upcoming {
    background-color: #ececec;
    border-color: #6b7280;
    color: #d1d5db;
    border-style: dotted;
}

.toc-game-time {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-top: 1px;
}

.toc-game-title {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-top: 1px;
}

.game-td-active .toc-game-time, .game-td-active .toc-game-title {
    color: #000000;
}

.game-td-active .dark .toc-game-time, .game-td-active .dark .toc-game-title {
    color: #ffffff;
}

.upcoming .toc-game-time, .upcoming .toc-game-title {
    color: #000000;
}

.upcoming .dark .toc-game-time, .upcoming .dark .toc-game-title {
    color: #a3a3a3;
}

.toc-status-icon {
    font-size: 0.875rem;
    flex-shrink: 0;
}

.toc-timeslot {
    margin-bottom: 1.5rem;
}

.toc-timeslot:last-child {
    margin-bottom: 0;
}

.dark .toc-game-link.live-no-tds {
    background-color: #451a03;
    color: #fbbf24;
}

.dark .toc-game-link.completed {
    background-color: #374151;
    color: #9ca3af;
}

/* NFL Dashboard Live Touchdown Mobile Responsiveness */
@media (max-width: 640px) {
    /* Ensure game containers don't overflow on mobile */
    #nfl-td-container .bg-card {
        width: 100%;
        min-width: 0;
        overflow-x: hidden;
    }
    
    /* Responsive game headers */
    #nfl-td-container [class*="bg-muted"] {
        padding: 12px 16px;
    }
    
    /* Responsive touchdown cards */
    #nfl-td-container [data-touchdown-id] {
        padding: 12px 16px;
        overflow-x: hidden;
    }
    
    /* Ensure player names don't overflow */
    #nfl-td-container h4 {
        word-break: break-word;
        overflow-wrap: break-word;
    }
    
    /* Responsive team names */
    #nfl-td-container .font-medium {
        max-width: 120px;
    }
}

.dark .toc-game-link.upcoming {
    background-color: #6d6d6d;
}

/* Auto-refresh status indicator */
.refresh-status {
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
    background-color: rgba(0, 0, 0, 0.05);
    white-space: nowrap;
}

.refresh-status.text-green-600 {
    background-color: rgba(16, 185, 129, 0.1);
}

.refresh-status.text-yellow-600 {
    background-color: rgba(245, 158, 11, 0.1);
}

.refresh-status.text-gray-500 {
    background-color: rgba(107, 114, 128, 0.1);
}
