/* ============================================
   Odds Chart Page Styles
   ============================================ */

.odds-chart-page {
    min-height: 100vh;
}

.odds-chart-header-top h1 {
    font-size: 1.75rem;
    margin-bottom: 4px;
}

.odds-chart-header-top h1 small {
    font-size: 1.2rem;
    margin-left: 6px;
}

.odds-chart-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.odds-chart-subtitle a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
}

.odds-chart-subtitle a:hover {
    text-decoration: underline;
}

/* ============================================
   Container
   ============================================ */
.odds-chart-container {
    padding: 24px 20px 60px;
}

/* ============================================
   Card Style
   ============================================ */
.game-card {
    margin-bottom: 1.5rem;
}


/* ============================================
   Chart Controls / Toggles
   ============================================ */
.odds-chart-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.chart-toggle-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.chart-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 6px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    user-select: none;
}

.chart-toggle:hover {
    background: var(--bg-card-hover);
    border-color: var(--text-muted);
}

.chart-toggle input[type="checkbox"] {
    display: none;
}

.toggle-indicator {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
    transition: var(--transition-fast);
}

.chart-toggle input[type="checkbox"]:not(:checked) + .toggle-indicator {
    opacity: 0.3;
    filter: grayscale(1);
}

.toggle-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.chart-toggle input[type="checkbox"]:not(:checked) ~ .toggle-label {
    opacity: 0.5;
    text-decoration: line-through;
}

/* ============================================
   Legend
   ============================================ */
.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.legend-item:hover {
    background: var(--bg-secondary);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
}

.legend-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.legend-item.hidden {
    opacity: 0.4;
}

/* ============================================
   Chart Wrapper
   ============================================ */
.chart-wrapper {
    position: relative;
    width: 100%;
    height: 500px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
}

.chart-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
}

/* ============================================
   Data Table
   ============================================ */
.odds-data-table {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    overflow: hidden;
}

.odds-data-table h3 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.odds-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.odds-table thead th {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 14px;
    text-align: left;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.odds-table thead th.cell-odds {
    text-align: center;
}

.odds-table tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    white-space: nowrap;
}

.odds-table tbody tr:hover {
    background: var(--bg-card-hover);
}

.odds-table tbody tr:last-child td {
    border-bottom: none;
}

.cell-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.cell-odds {
    width: 12%;
    font-weight: 600;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', monospace;
    font-size: 0.9rem;
    text-align: center;
}

/* Color coding for odds values */
.cell-odds.away-odds {
    color: #e53935;
}

.cell-odds.home-odds {
    color: #2196F3;
}

.cell-odds.over-odds {
    color: #4CAF50;
}

.cell-odds.under-odds {
    color: #FF9800;
}

.cell-odds.away-spread {
    color: #9C27B0;
}

.cell-odds.home-spread {
    color: #00BCD4;
}

/* ============================================
   Empty State
   ============================================ */
.odds-chart-empty {
    text-align: center;
    padding: 80px 20px;
}

.odds-chart-empty .empty-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.odds-chart-empty h3 {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.odds-chart-empty p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .odds-chart-header-top h1 {
        font-size: 1.3rem;
    }

    .odds-chart-container {
        padding: 16px 0 40px;
    }

    .odds-chart-controls {
        padding: 16px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .chart-toggle-group {
        gap: 8px;
    }

    .chart-toggle {
        padding: 4px 10px;
        font-size: 0.8rem;
    }

    .chart-legend {
        gap: 10px;
    }

    .chart-wrapper {
        height: 350px;
        padding: 12px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .odds-data-table {
        padding: 16px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .odds-table thead th,
    .odds-table tbody td {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .chart-wrapper {
        height: 280px;
    }

    .chart-toggle-group {
        gap: 6px;
    }

    .chart-toggle {
        padding: 3px 8px;
        font-size: 0.75rem;
    }

    .toggle-indicator {
        width: 10px;
        height: 10px;
    }
}
