/* ============================================
   Blue Chip Analytics - Weather Pages Styles
   Styles specific to weather tracking pages
   ============================================ */

/* Page Background */
body.weather-page {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* Weather Page Header */
.weather-header {
    background: #fff;
    max-width: 1400px;
    padding: 0.5rem;
    border-bottom: 1px solid #e5e5e5;
    position: sticky;
    top: 0;
    z-index: 100;
}

.weather-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

/* Controls Bar */
.controls {
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 50%, #3182ce 100%);
    padding: 0.6rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.controls-left {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.controls-right {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.controls label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 0.3rem 0.5rem;
    color: white;
    font-weight: 500;
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

.controls label:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.controls label.checked {
    background: rgba(255, 255, 255, 0.35);
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.controls input[type="checkbox"] {
    margin: 0;
    accent-color: #fff;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 3px;
}

.controls input[type="checkbox"]:checked {
    background: #fff;
    border: 2px solid #fff;
}

.controls select {
    padding: 0.3rem 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-weight: 500;
    font-size: 0.75rem;
    min-width: 120px;
}

/* Week Navigation */
.week-navigation {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    padding: 0.75rem 0;
    overflow-x: auto;
    position: sticky;
    top: 70px;
    z-index: 90;
}

.week-nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 0.5rem;
}

.week-nav-scroll {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 2px;
}

.week-nav-scroll::-webkit-scrollbar {
    display: none;
}

.week-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    text-decoration: none;
    color: #666;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    min-width: 60px;
    transition: all 0.2s ease;
}

.week-link:hover {
    background: #e9ecef;
    color: #333;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.week-link.current {
    background: #007bff;
    color: white;
    border-color: #007bff;
    font-weight: 600;
}

.week-label {
    font-size: 0.7rem;
    margin-bottom: 2px;
    opacity: 0.8;
}

.week-number {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Weather Container */
.weather-container {
    max-width: 1400px;
    margin: 0.5rem auto;
    padding: 1rem;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Desktop Table View */
.table-container {
    background: #fff;
    border-radius: 6px;
    overflow-x: auto;
    border: 1px solid #e5e5e5;
    width: 100%;
    max-width: 100%;
    min-height: 1000px;
}

.weather-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1100px;
    table-layout: fixed;
}

.weather-table th,
.weather-table td {
    padding: 0.25rem;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.8rem;
}

.weather-table th {
    background: linear-gradient(135deg, #f8f9fb 0%, #f1f3f6 100%);
    font-weight: 600;
    color: #2d3748;
    cursor: pointer;
    position: sticky;
    top: 0;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 2px solid #e2e8f0;
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

.weather-table th:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e0 100%);
    transform: translateY(-1px);
}

.weather-table tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.weather-table tbody tr:hover {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    transform: scale(1.005);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.weather-table tbody tr:nth-child(even) {
    background: rgba(247, 250, 252, 0.5);
}

.weather-table tbody tr:nth-child(even):hover {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
}

/* Table Column Widths */
.date-col { width: 85px; min-width: 85px; }
.game-name-col { width: 160px; min-width: 160px; }
.team-col { width: 145px; min-width: 145px; }
.vs-col { width: 25px; }
.stadium-col { width: 160px; min-width: 160px; }
.city-col { width: 80px; min-width: 80px; font-size: 0.85rem; }
.state-col { width: 45px; min-width: 45px; }
.weather-col { 
    width: 130px; 
    min-width: 130px; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    position: relative; 
}
.weather-col:hover { 
    overflow: visible; 
    white-space: normal; 
    z-index: 10; 
    background: white; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); 
    border-radius: 4px; 
    padding: 0.5rem; 
}
.temp-col { width: 55px; }
.wind-col { width: 70px; }
.gust-col { width: 55px; min-width: 55px; text-align: center; }
.precip-col { width: 50px; min-width: 55px; text-align: center; }
.humidity-col { width: 65px; min-width: 70px; text-align: center; }
.elevation-col { width: 80px; min-width: 80px; }
.capacity-col { width: 100px; }
.distance-col { width: 80px; }

/* Table Cell Styles */
.team-cell { font-weight: 600; }
.away-team-cell { color: #333; }
.home-team-cell { color: #666; }

.stadium-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.capacity-cell {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.weather-cell { max-width: 180px; }

.weather-content {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    overflow: hidden;
}

.weather-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.weather-icon {
    width: 20px;
    height: 20px;
}

/* Alert Styles */
.alert-highlight {
    color: #dc2626;
    font-weight: 600;
}

.alert-cell { text-align: center; }

.alert-symbol {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 1px;
}

.weather-alert-symbol { background: #ffc107; }
.travel-alert-symbol { background: #17a2b8; }

.distance-cell { color: #666; }
.distance-highlight { color: #dc3545; font-weight: 600; }
.wind-cell { color: #666; }
.wind-highlight { color: #dc3545; font-weight: 600; }
.precip-cell { color: #666; }
.precip-highlight { color: #dc3545; font-weight: 600; }

/* Mobile Game Cards */
.game-cards {
    display: none;
}

.game-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    margin-bottom: 1rem;
    padding: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.game-card:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
    border-color: rgba(102, 126, 234, 0.2);
}

.game-card .game-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.game-date-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.game-date {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
    flex-shrink: 0;
}

.game-name {
    color: #3182ce;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

/* Alerts in Cards */
.alerts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.alert {
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
    border-radius: 8px;
    font-weight: 600;
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: #dc2626;
    transition: all 0.2s ease;
}

.alert:hover {
    transform: scale(1.05);
}

.temp-alert,
.wind-alert,
.gust-alert,
.precip-alert,
.humidity-alert,
.elevation-alert,
.distance-alert {
    color: #dc2626;
    font-weight: 600;
}

/* Alert Animation */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 152, 0, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(255, 152, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 152, 0, 0); }
}

.alert-indicator {
    font-size: 0.8rem;
    margin-left: 4px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

/* Teams in Cards */
.matchup {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.teams {
    display: flex;
    align-items: center;
    flex: 1;
}

.team {
    font-weight: 600;
    font-size: 0.9rem;
    min-width: 45px;
}

.team-with-rank {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.away-team { color: #333; }
.vs { margin: 0 0.5rem; color: #666; font-size: 0.8rem; }
.home-team { color: #666; }

/* Game Details */
.game-details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.8rem;
    color: #666;
}

.weather-info {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.stadium-info {
    flex: 1;
    min-width: 0;
}

.stadium-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.capacity {
    color: #999;
    font-size: 0.75rem;
}

.combined-stadium {
    font-size: 0.8rem;
    color: #555;
    white-space: normal;
    margin-bottom: 0.5rem;
}

.weather-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.3rem 0.6rem;
    font-size: 0.75rem;
    color: #666;
}

/* ============================================
   Responsive Design
   ============================================ */

/* Controls - Tablet */
@media (max-width: 768px) {
    .controls {
        padding: 0.4rem;
        gap: 0.3rem;
        font-size: 0.7rem;
        margin-bottom: 0.75rem;
        flex-direction: column;
        align-items: stretch;
    }
    
    .controls-left {
        justify-content: flex-start;
    }
    
    .controls-right {
        justify-content: flex-start;
        width: 100%;
    }
    
    .controls label {
        padding: 0.25rem 0.4rem;
        font-size: 0.7rem;
        gap: 0.2rem;
        border-radius: 4px;
    }
    
    .controls input[type="checkbox"] {
        width: 10px;
        height: 10px;
    }
    
    .controls select {
        padding: 0.25rem 0.4rem;
        font-size: 0.7rem;
        min-width: 100px;
        border-radius: 4px;
    }
}

/* Controls - Mobile */
@media (max-width: 480px) {
    .controls {
        padding: 0.3rem;
        gap: 0.25rem;
        font-size: 0.65rem;
        margin-bottom: 0.5rem;
    }
    
    .controls label {
        padding: 0.2rem 0.3rem;
        font-size: 0.65rem;
        gap: 0.15rem;
        border-radius: 3px;
    }
    
    .controls input[type="checkbox"] {
        width: 8px;
        height: 8px;
    }
    
    .controls select {
        padding: 0.2rem 0.3rem;
        font-size: 0.65rem;
        min-width: 80px;
        border-radius: 3px;
    }
}

/* Mobile View Switching */
@media (max-width: 767px) {
    .weather-container {
        padding: 0.5rem;
    }
    
    .weather-header {
        padding: 0.75rem;
    }
    
    .weather-header h1 {
        font-size: 1.2rem;
    }
    
    .week-navigation {
        padding: 0.5rem 0;
        top: 60px;
    }
    
    .week-nav-container {
        padding: 0 0.5rem;
    }
    
    .week-link {
        min-width: 50px;
        padding: 0.4rem 0.6rem;
    }
    
    .game-cards {
        display: block;
    }
    
    .table-container {
        display: none;
    }
    
    .game-card {
        margin-bottom: 0.4rem;
        padding: 0.6rem;
    }
    
    .game-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }
    
    .stadium-info {
        width: 100%;
    }
}

/* Force Table on Desktop */
@media (min-width: 768px) {
    .game-cards {
        display: none;
    }
    
    .table-container {
        display: block;
    }
}

/* Large Tablet Adjustments */
@media (max-width: 1200px) {
    .stadium-col { width: 160px; min-width: 160px; }
    .weather-col { width: 140px; min-width: 140px; }
    .team-col { width: 140px; min-width: 140px; }
}
