/* Player Odds Page - On-Brand Redesign */

/* ===== IMPORTS ===== */
@import url('colors.css');
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

/* ===== DESIGN TOKENS ===== */
:root {
    --font-display: 'Sora', -apple-system, sans-serif;
    --font-mono: 'IBM Plex Mono', 'SF Mono', monospace;
    --glow-primary: rgba(30, 251, 151, 0.4);
    --glow-subtle: rgba(30, 251, 151, 0.15);

    /* Sticky column widths */
    --col-line-width: 100px;
    --col-sb-width: 95px;
}

/* ===== NO ODDS MESSAGE ===== */
.no-odds-message {
    max-width: 1400px;
    margin: 0 auto;
    padding: 48px 24px;
    animation: fadeUp 0.5s ease-out 0.2s both;
}

.no-odds-content {
    background: var(--color-gray-900);
    border: 1px solid var(--color-border-light);
    border-radius: 16px;
    padding: 48px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.no-odds-content h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0 0 16px;
}

.no-odds-content p {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin: 16px 0;
}

.no-odds-content ul {
    text-align: left;
    margin: 24px 0;
    padding-left: 0;
    list-style: none;
}

.no-odds-content li {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin: 8px 0;
    padding-left: 20px;
    position: relative;
}

.no-odds-content li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-size: 0.8rem;
}

.no-odds-content .btn {
    margin-top: 24px;
    background: var(--color-primary);
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-gray-950);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(30, 251, 151, 0.3);
}

.no-odds-content .btn:hover {
    background: rgba(30, 251, 151, 0.9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 251, 151, 0.4);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes rowSlide {
    from {
        opacity: 0;
        transform: translateX(-8px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ===== PAGE CONTAINER ===== */
.player-page {
    min-height: 100vh;
    background: var(--color-gray-950);
    padding-bottom: 80px;
}

/* ===== PLAYER HEADER ===== */
.player-header {
    max-width: 1400px;
    margin: 0 auto;
    padding: 48px 24px 32px;
    animation: fadeUp 0.5s ease-out;
}

.player-name {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--color-white);
    margin: 0 0 12px;
    line-height: 1.1;
}

.player-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.meta-badge {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.meta-badge.team {
    background: var(--color-gray-700);
    color: var(--color-text-tertiary);
}

.meta-badge.position {
    background: rgba(30, 251, 151, 0.12);
    color: var(--color-primary);
}

.meta-badge.date {
    color: var(--color-text-tertiary);
    background: transparent;
    border: 1px solid var(--color-border-light);
}

/* ===== FILTER BAR ===== */
.odds-filters {
    position: sticky;
    top: 72px;
    z-index: 100;
    background: rgba(3, 7, 18, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--color-border-light);
    border-bottom: 1px solid var(--color-border-light);
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    animation: fadeUp 0.5s ease-out 0.1s both;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-tertiary);
}

/* ===== CUSTOM DROPDOWN ===== */
.custom-dropdown {
    position: relative;
    min-width: 180px;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    background: var(--color-gray-800);
    border: 1px solid var(--color-border-light);
    border-radius: 10px;
    padding: 10px 14px;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.dropdown-toggle:hover {
    border-color: var(--color-primary);
}

.dropdown-toggle.open {
    border-color: var(--color-primary);
}

.dropdown-arrow {
    width: 10px;
    height: 6px;
    transition: transform 0.2s ease;
}

.dropdown-toggle.open .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--color-gray-800);
    border: 1px solid var(--color-border-light);
    border-radius: 10px;
    max-height: 240px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    animation: dropdownFade 0.15s ease-out;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.dropdown-menu.open {
    display: block;
}

.dropdown-option {
    padding: 10px 14px;
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.1s ease;
    border-bottom: 1px solid var(--color-border-light);
}

.dropdown-option:last-child {
    border-bottom: none;
}

.dropdown-option:hover {
    background: var(--color-gray-700);
    color: var(--color-text-primary);
}

.dropdown-option.selected {
    color: var(--color-primary);
    background: rgba(30, 251, 151, 0.08);
}

/* Scrollbar for dropdowns */
.dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.dropdown-menu::-webkit-scrollbar-track {
    background: var(--color-gray-800);
}

.dropdown-menu::-webkit-scrollbar-thumb {
    background: var(--color-gray-600);
    border-radius: 3px;
}

/* ===== PROP TABLES CONTAINER ===== */
.prop-tables-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    animation: fadeUp 0.5s ease-out 0.15s both;
}

/* ===== PROP TABLE SECTION ===== */
.prop-table-section {
    animation: fadeUp 0.4s ease-out both;
}

.prop-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 0 8px;
}

.prop-table-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0;
    letter-spacing: -0.02em;
}

.line-filter-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.line-filter-container::before {
    content: "Line:";
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===== TABLE CONTAINER ===== */
.odds-table-container {
    width: 100%;
}

.odds-table-scroll {
    overflow-x: auto;
    overflow-y: visible;
    border-radius: 16px;
    border: 1px solid var(--color-border-light);
    background: var(--color-gray-900);
    position: relative;
}

/* ===== THE TABLE ===== */
.odds-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

/* Table Header */
.odds-table thead {
    background: var(--color-gray-800);
}

.odds-table thead th {
    padding: 16px 8px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-tertiary);
    border-bottom: 2px solid var(--color-border-light);
    white-space: nowrap;
    background: var(--color-gray-800);
}

/* Mobile-style table headers */
.odds-table.mobile-style thead th {
    padding: 12px 16px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-tertiary);
    border-bottom: 2px solid var(--color-border-light);
}

.sportsbook-header {
    text-align: center !important;
    width: 80px;
    min-width: 80px;
}

.over-header,
.under-header {
    color: var(--color-text-secondary) !important;
    width: 100px;
    min-width: 100px;
}

.vig-header {
    width: 80px;
    min-width: 80px;
}

/* iOS-Style Sportsbook Logo */
.sb-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
}

.sb-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.sb-logo-text {
    font-size: 0.6rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.1;
    padding: 2px;
}

.sb-dk {
    background: linear-gradient(135deg, #53d337 0%, #3ba526 100%);
}

.sb-fd {
    background: linear-gradient(135deg, #1493ff 0%, #0b6fcc 100%);
}

.sb-mgm {
    background: linear-gradient(135deg, #d4a04d 0%, #a67c3d 100%);
}

.sb-czr {
    background: linear-gradient(135deg, #1a472a 0%, #0f2b1a 100%);
    color: #e6b800;
}

.sb-br {
    background: linear-gradient(135deg, #ff5733 0%, #c44125 100%);
}

.sb-pb {
    background: linear-gradient(135deg, #000 0%, #222 100%);
    color: #ff4d00;
}

.sb-espn {
    background: linear-gradient(135deg, #d00 0%, #a00 100%);
}

.sb-novig {
    background: linear-gradient(135deg, #1a1a1a 0%, #000 100%);
    color: #ff6b35;
}

.sb-generic {
    background: linear-gradient(135deg, #555 0%, #333 100%);
}

/* Table Body */
.odds-table tbody tr {
    transition: all 0.15s ease;
    animation: rowSlide 0.3s ease-out both;
}

.odds-table tbody tr:hover {
    background: rgba(30, 251, 151, 0.04);
}

.odds-table tbody td {
    padding: 14px 8px;
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    border-bottom: 1px solid var(--color-border-light);
    vertical-align: middle;
    text-align: center;
    background: var(--color-gray-900);
}

/* First column - Line (Sticky) */
.odds-table tbody td:first-child {
    text-align: left;
    padding-left: 16px;
    position: sticky;
    left: 0;
    z-index: 10;
    background: var(--color-gray-900);
    border-right: 1px solid var(--color-border-light);
}

/* Line cell styling */
.line-cell {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--color-primary);
    font-size: 0.9rem;
}

/* Line header with dropdown */
.line-header {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-start;
}

/* Line filter dropdown */
.line-filter-dropdown {
    position: relative;
    min-width: 120px;
}

.line-filter-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: var(--color-primary);
    border: 2px solid var(--color-primary);
    border-radius: 8px;
    padding: 8px 12px;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-gray-900);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(30, 251, 151, 0.3);
}

.line-filter-toggle:hover {
    background: rgba(30, 251, 151, 0.9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 251, 151, 0.4);
}

.line-filter-toggle.open {
    background: rgba(30, 251, 151, 0.9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 251, 151, 0.4);
}

.line-filter-toggle .dropdown-arrow {
    width: 10px;
    height: 6px;
    transition: transform 0.2s ease;
}

.line-filter-toggle.open .dropdown-arrow {
    transform: rotate(180deg);
}

.line-filter-toggle .dropdown-arrow path {
    stroke: var(--color-gray-900) !important;
    stroke-width: 2;
}

.line-filter-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--color-gray-800);
    border: 2px solid var(--color-primary);
    border-radius: 10px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    animation: dropdownFade 0.2s ease-out;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(30, 251, 151, 0.2);
    min-width: 120px;
}

.line-filter-menu.open {
    display: block;
}

.line-filter-option {
    padding: 10px 16px;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    border-bottom: 1px solid var(--color-border-light);
}

.line-filter-option:last-child {
    border-bottom: none;
}

.line-filter-option:hover {
    background: var(--color-gray-700);
    color: var(--color-text-primary);
}

.line-filter-option.selected {
    color: var(--color-primary);
    background: rgba(30, 251, 151, 0.15);
    font-weight: 700;
}

/* Hover state for sticky column */
.odds-table tbody tr:hover td:first-child {
    background: #0d1117;
}

/* ===== MOBILE-STYLE TABLE LAYOUT ===== */

/* Mobile-style table rows */
.sportsbook-row {
    transition: all 0.15s ease;
    animation: rowSlide 0.3s ease-out both;
}

.sportsbook-row:hover {
    background: rgba(30, 251, 151, 0.04);
}

/* Line separator */
.line-separator {
    background: var(--color-gray-800);
}

.line-separator-cell {
    padding: 8px 16px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-primary);
    text-align: center;
    border-top: 1px solid var(--color-border-light);
    border-bottom: 1px solid var(--color-border-light);
}

/* Sportsbook info cell */
.sportsbook-cell {
    padding: 12px 8px;
    text-align: center;
    width: 80px;
}

.sb-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.sb-name {
    display: none; /* Hide text names to keep icons aligned */
}

/* Odds cells */
.odds-cell {
    padding: 12px 16px;
    text-align: center;
}

.odds-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 8px;
    background: var(--color-gray-800);
    border: 1px solid var(--color-border-light);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 70px;
}

.odds-button:hover {
    background: var(--color-gray-700);
    border-color: var(--color-primary);
    transform: translateY(-1px);
}

/* Removed over/under color differentiation for cleaner look */

/* Consensus odds styling for Novig */
.consensus-odds {
    border: 2px solid var(--color-primary) !important;
    background: rgba(30, 251, 151, 0.1) !important;
}

.consensus-odds:hover {
    background: rgba(30, 251, 151, 0.2) !important;
    box-shadow: 0 0 12px rgba(30, 251, 151, 0.3);
}

.consensus-odds .odds-value {
    color: var(--color-primary) !important;
    font-weight: 700;
}

/* Consensus row styling for Novig */
.consensus-row {
    background: rgba(30, 251, 151, 0.05) !important;
    border-left: 3px solid var(--color-primary);
}

.consensus-row:hover {
    background: rgba(30, 251, 151, 0.08) !important;
}

.no-odds {
    color: var(--color-gray-600);
    font-size: 0.9rem;
}

/* Vig cell */
.vig-cell {
    padding: 12px 16px;
    text-align: center;
}

.vig-value {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--color-text-tertiary);
}


/* Odds Data Cell */
.cell-odds {
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 8px 4px;
}

.cell-odds-inner {
    display: flex;
    flex-direction: row;
    gap: 6px;
    align-items: center;
    justify-content: center;
}

.odds-over,
.odds-under {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 8px;
    border-radius: 6px;
    background: var(--color-gray-800);
    border: 1px solid var(--color-border-light);
    min-width: 50px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
}

.odds-over:hover,
.odds-under:hover {
    background: var(--color-gray-700);
    border-color: var(--color-primary);
}

.odds-label {
    font-size: 0.6rem;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    display: none; /* Hide O/U labels for cleaner look */
}

.odds-value {
    font-weight: 600;
    color: var(--color-text-primary);
    font-size: 0.85rem;
}

/* Style the over/under containers differently */
.odds-over {
    border-left: 3px solid var(--color-primary);
}

.odds-under {
    border-right: 3px solid var(--color-text-tertiary);
}

/* Empty Cell */
.cell-empty {
    color: var(--color-gray-600);
}

/* ===== SCROLLBAR ===== */
.odds-table-scroll::-webkit-scrollbar {
    height: 10px;
}

.odds-table-scroll::-webkit-scrollbar-track {
    background: var(--color-gray-900);
}

.odds-table-scroll::-webkit-scrollbar-thumb {
    background: var(--color-gray-700);
    border-radius: 5px;
}

.odds-table-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--color-gray-600);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .player-header {
        padding: 32px 16px 24px;
    }

    .player-name {
        font-size: 1.75rem;
    }

    .odds-filters {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 12px 16px;
    }

    .custom-dropdown {
        width: 100%;
    }

    .prop-tables-container {
        padding: 16px 8px;
        gap: 24px;
    }

    .prop-table-title {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }

    :root {
        --col-line-width: 80px;
        --col-sb-width: 80px;
    }

    .sb-logo {
        width: 32px;
        height: 32px;
        font-size: 0.6rem;
    }

    .sb-logo-text {
        font-size: 0.55rem;
    }

    .line-filter-toggle {
        font-size: 0.8rem;
        padding: 6px 10px;
        min-width: 100px;
    }

    .line-filter-option {
        font-size: 0.8rem;
        padding: 8px 12px;
    }

    .line-filter-container::before {
        font-size: 0.7rem;
    }

    .prop-table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .sportsbook-header {
        width: 60px !important;
        min-width: 60px !important;
    }

    .over-header, .under-header {
        width: 80px !important;
        min-width: 80px !important;
    }

    .vig-header {
        width: 60px !important;
        min-width: 60px !important;
    }

    .sportsbook-cell {
        padding: 8px 4px;
        width: 60px;
    }

    .odds-button {
        padding: 6px 12px;
        min-width: 60px;
    }
}
