/* ============================================================
   bb-header.css  –  Canonical BenchBalancer Header
   ONE file, ALL basketball pages. Do not duplicate.
   ============================================================ */

/* ---------- Header Shell ---------- */
.bb-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #000000;
    border-bottom: 3px solid #01c1ce;
    padding: 8px 16px 12px 16px;
    display: flex;
    flex-direction: column;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* ---------- Row 1: DASHBOARD (left) + Sign In (right) ---------- */
.bb-header-top {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 8px;
    gap: 8px;
}

/* When DASHBOARD btn is present, switch to space-between */
.bb-header-top:has(.bb-header-dashboard-btn) {
    justify-content: space-between;
}

.bb-header-auth {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #01c1ce;
    border: none;
    border-radius: 6px;
    color: #000000;
    font-family: 'Russo One', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.bb-header-auth:hover {
    background: #00e6d0;
}

/* When signed in, show user name with same cyan style */
.bb-header-auth.signed-in {
    background: #01c1ce;
    color: #000000;
}

/* ---------- Row 2: UPGRADE | benchbalancer | ? ⚙ ---------- */
.bb-header-main {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
}

.bb-header-left {
    grid-column: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bb-header-center {
    grid-column: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    min-width: 0;
}

.bb-header-right {
    grid-column: 3;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ---------- Logo ---------- */
.bb-header-logo {
    font-family: 'Russo One', sans-serif;
    font-size: clamp(20px, 3vw, 38px);
    color: #ffffff;
    letter-spacing: 0.02em;
    white-space: nowrap;
    line-height: 1;
    text-decoration: none;
}

/* ---------- DASHBOARD Button ---------- */
.bb-header-dashboard-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #1f2a38;
    border: 2px solid #01c1ce;
    border-radius: 8px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.bb-header-dashboard-btn:hover {
    background: #2a3a4e;
    box-shadow: 0 0 15px rgba(1, 193, 206, 0.4);
}

/* ---------- UPGRADE Button ---------- */
.bb-header-upgrade-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #2d3748;
    border: 2px solid #01c1ce;
    border-radius: 8px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.bb-header-upgrade-btn:hover {
    background: #3a4a5e;
    box-shadow: 0 0 15px rgba(1, 193, 206, 0.4);
}

.bb-header-upgrade-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ---------- Icon Buttons (Help / Settings) ---------- */
.bb-header-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid #01c1ce;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s;
    color: #ffffff;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.bb-header-icon-btn:hover {
    background: rgba(1, 193, 206, 0.15);
}

.bb-header-icon-btn img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.bb-header-icon-btn .icon-question {
    font-size: 16px;
    font-weight: 700;
    color: #01c1ce;
}

/* ---------- Mobile: <=768px ---------- */
@media (max-width: 768px) {
    .bb-header {
        padding: 6px 12px 10px 12px;
    }

    .bb-header-top {
        margin-bottom: 6px;
    }

    .bb-header-auth {
        font-size: 11px;
        padding: 5px 12px;
    }

    .bb-header-logo {
        font-size: clamp(16px, 5.5vw, 28px);
    }

    .bb-header-dashboard-btn,
    .bb-header-upgrade-btn {
        font-size: 11px;
        padding: 6px 10px;
    }

    .bb-header-icon-btn {
        width: clamp(30px, 8vw, 36px);
        height: clamp(30px, 8vw, 36px);
    }

    .bb-header-icon-btn img {
        width: 16px;
        height: 16px;
    }

    .bb-header-main {
        gap: 6px;
    }
}

/* ---------- Very Small Screens: <=380px ---------- */
@media (max-width: 380px) {
    .bb-header-logo {
        font-size: 14px;
    }

    .bb-header-dashboard-btn,
    .bb-header-upgrade-btn {
        font-size: 10px;
        padding: 5px 8px;
        gap: 4px;
    }

    .bb-header-icon-btn {
        width: 28px;
        height: 28px;
    }

    .bb-header-icon-btn img {
        width: 14px;
        height: 14px;
    }
}

/* ---------- Light Mode Overrides ---------- */
:root[data-theme="light"] .bb-header {
    background: rgba(255, 255, 255, 0.95);
    border-bottom-color: #00897b;
}

:root[data-theme="light"] .bb-header-logo {
    color: #1a202c;
}

:root[data-theme="light"] .bb-header-auth {
    background: #00897b;
    color: #ffffff;
}

:root[data-theme="light"] .bb-header-auth:hover {
    background: #00695c;
}

:root[data-theme="light"] .bb-header-dashboard-btn {
    background: #e2e8f0;
    border-color: #00897b;
    color: #1a202c;
}

:root[data-theme="light"] .bb-header-upgrade-btn {
    background: #e2e8f0;
    border-color: #00897b;
    color: #1a202c;
}

:root[data-theme="light"] .bb-header-icon-btn {
    border-color: #00897b;
}

:root[data-theme="light"] .bb-header-icon-btn:hover {
    background: rgba(0, 137, 123, 0.1);
}
