/* =============================================================
   HEADER STYLES  –  Nexus Table Tennis Club
   ============================================================= */

/* ── Live Scores Panel (WTT-style) ─────────────────────────── */
.live-scores-panel {
    background: #000;
    color: #fff;
    border-bottom: 2px solid #e8620a;
}

.lsp-inner {
    display: flex;
    align-items: stretch;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 8px;
    gap: 0;
    overflow: hidden;
}

/* End column: × close on top, live indicator below */
.lsp-end-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-left: 1px solid rgba(255,255,255,0.12);
    background: #000;
    padding: 2px 0;
}

.lsp-live-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    text-decoration: none;
    padding: 0 10px 3px;
    transition: opacity 0.15s;
}
.lsp-live-link:hover { opacity: 0.8; }

.lsp-live-top {
    display: flex;
    align-items: center;
    gap: 4px;
}

.lsp-live-count {
    font-size: 10px;
    font-weight: 700;
    color: #e8620a;
    letter-spacing: 0.3px;
}

.lsp-live-text {
    font-size: 7px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
}

.lsp-live-link.inactive .lsp-dot {
    background: #6b7280;
    animation: none;
    box-shadow: none;
}
.lsp-live-link.inactive .lsp-live-count {
    color: #6b7280;
}

.lsp-dot {
    width: 7px;
    height: 7px;
    background: #e8620a;
    border-radius: 50%;
    animation: lsp-blink 1.4s ease-in-out infinite;
}

@keyframes lsp-blink {
    0%,100% { opacity: 1; box-shadow: 0 0 6px #e8620a; }
    50%      { opacity: 0.35; box-shadow: none; }
}

@keyframes lsp-pulse {
    0%,100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.4; transform: scale(0.75); }
}

.lsp-label-text {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #fff;
}

/* Combined orange pill containing dot + LIVE + count */
.lsp-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #f97316, #ef4444);
    padding: 4px 10px;
    border-radius: 999px;
    /* margin-right: 4px; */
}

.lsp-pill .lsp-dot {
    background: rgba(255,255,255,0.9);
    box-shadow: 0 0 4px rgba(255,255,255,0.5);
}

.lsp-count {
    background: #c2410c;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.lsp-scroll-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0 6px;
    flex-shrink: 0;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}

.lsp-scroll-btn:hover { color: #fff; }

.lsp-track-wrap {
    flex: 1;
    overflow: hidden;
    min-width: 0;
}

.lsp-track {
    display: flex;
    gap: 1px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.lsp-track::-webkit-scrollbar { display: none; }

.lsp-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 220px;
    max-width: 260px;
    padding: 8px 14px;
    border-right: 1px solid rgba(255,255,255,0.08);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s;
    flex-shrink: 0;
}

.lsp-card:hover { background: rgba(255,255,255,0.05); }

.lsp-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.lsp-final-badge {
    font-size: 9px;
    font-weight: 700;
    color: #9ca3af;
    background: rgba(255,255,255,0.1);
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lsp-card-event {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.lsp-card-venue {
    font-size: 9px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 5px;
    letter-spacing: 0.3px;
}

.lsp-card-players {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.lsp-player {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lsp-player-name {
    font-size: 12px;
    font-weight: 600;
    color: #f3f4f6;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.lsp-set-scores {
    display: flex;
    align-items: center;
    gap: 3px;
}

.lsp-ss {
    font-size: 10px;
    color: #6b7280;
    min-width: 16px;
    text-align: center;
}

.lsp-ss.won { color: #d1d5db; font-weight: 600; }

.lsp-current-score {
    font-size: 11px;
    color: #9ca3af;
    min-width: 18px;
    text-align: center;
}

.lsp-sets-won {
    font-size: 15px;
    font-weight: 700;
    color: #6b7280;
    min-width: 18px;
    text-align: right;
}

.lsp-sets-won.leading { color: #e8620a; }

.lsp-hide-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.35);
    font-size: 12px;
    cursor: pointer;
    padding: 2px 10px;
    flex-shrink: 0;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.lsp-hide-btn:hover { color: #fff; }

/* ── Live scores pull-tab (orange pill at top when panel collapsed) ── */
.lsp-pull-tab {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: auto;
    background: #000;
    color: #e77204;
    padding: 6px 14px;
    border-radius: 0 0 12px 0;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    cursor: pointer;
    z-index: 1002;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    user-select: none;
    white-space: nowrap;
    border: none;
}

.lsp-pull-tab:hover {
    transform: translateY(1px);
    box-shadow: 0 6px 16px rgba(239,68,68,0.45);
}

/* Mobile: pull tab centered at top */
@media (max-width: 768px) {
    .lsp-pull-tab {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        border-radius: 0 0 12px 12px;
    }
    .lsp-pull-tab:hover {
        transform: translateX(-50%) translateY(1px);
    }
    .lsp-pull-tab.lsp-pull-tab-desktop { display: none !important; }
}

/* Desktop: pull tab flush at top, inline in menu row */
@media (min-width: 769px) {
    .lsp-pull-tab.lsp-pull-tab-desktop {
        position: static;
        border-radius: 0 0 12px 12px;
        z-index: auto;
        flex-shrink: 0;
    }
    .lsp-pull-tab.lsp-pull-tab-desktop:hover {
        transform: translateY(1px);
    }
    .lsp-pull-tab.lsp-pull-tab-mobile { display: none !important; }
}

.lsp-pull-tab .live-dot {
    width: 7px;
    height: 7px;
    background: #ef4444;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    animation: pulse-dot 2s ease-in-out infinite;
}

.lsp-pull-tab .live-count,
.lsp-pull-tab .live-text {
    font-size: 11px;
    color: #e77204;
}

.lsp-pull-tab.no-live .live-dot {
    animation: none;
}

.lsp-pull-tab.no-live .live-count,
.lsp-pull-tab.no-live .live-text {
    color: #9ca3af;
}

/* ── Main Header ────────────────────────────────────────────── */
body .header {
    background-color: #fff !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07) !important;
    border-bottom: 2px solid #e8620a !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    padding: 0 !important;
}

/* ── Header container / layout ──────────────────────────────── */
.header-container {
    display: flex !important;
    align-items: stretch !important;
    padding: 0 20px !important;
    min-height: 70px;
}

/* ── Logo ───────────────────────────────────────────────────── */
.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    padding: 10px 24px 10px 0;
}

.logo-container {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-image {
    height: 52px;
    width: auto;
}

/* ── Navigation Wrapper ─────────────────────────────────────── */
.navigation-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: relative;
    overflow: visible;
}

/* ── Row 1: Leagues + Live pill + User ──────────────────────── */
.secondary-menu-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    gap: 2px;
    padding: 5px 0px;
    /* border-bottom: 1px solid #efefef; */
    flex: 1;
}

/* ── Leagues Menu ───────────────────────────────────────────── */
.leagues-menu-list {
    display: flex;
    align-items: stretch;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
    flex-wrap: nowrap;
}

.leagues-menu-item {
    position: relative;
    display: flex;
    align-items: stretch;
}

.scorekeep-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 12px;
    font-size: 0.68rem;
    font-weight: 700;
    color: #fff !important;
    background: #e8620a;
    border-radius: 999px;
    text-decoration: none !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    transition: background 0.18s, transform 0.12s;
    line-height: 1.4;
}
.scorekeep-pill:hover {
    background: #d1570a;
    transform: scale(1.04);
}

.leagues-menu-link {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 7px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #374151;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    transition: color 0.18s;
    position: relative;
}

.leagues-menu-link:hover,
.leagues-menu-link.active {
    color: #e8620a;
}

.leagues-menu-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 7px;
    right: 7px;
    height: 2px;
    background: #e8620a;
    border-radius: 2px 2px 0 0;
}

.league-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 1px;
}

.submenu-icon {
    font-size: 7px !important;
    opacity: 0.6;
    margin-left: 1px;
}

/* ── Leagues Dropdown ───────────────────────────────────────── */
.leagues-submenu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: none;
    border-top: 3px solid #e8620a;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.06);
    /* min-width: 200px; */
    z-index: 2000;
    list-style: none;
    margin: 0;
    padding: 6px 0;
}

.leagues-menu-item:hover > .leagues-submenu { display: block; }

.leagues-submenu li a {
    display: block;
    padding: 9px 20px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.12s, color 0.12s;
}

.leagues-submenu li a:hover {
    background: #fff8f5;
    color: #e8620a;
    padding-left: 24px;
}

/* ── Row 2: Main Nav (Marketplace, Tournaments, Fantasy) ─────── */
.nav {
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
}

.nav-menu {
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: stretch;
}

.nav-link {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    padding: 0 7px !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    color: #374151 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    transition: color 0.18s !important;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #e8620a !important;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 7px;
    right: 7px;
    height: 2px;
    background: #e8620a;
    border-radius: 2px 2px 0 0;
}

/* ── Row 2 Submenus ─────────────────────────────────────────── */
.submenu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    background: #fff;
    border: none;
    border-top: 3px solid #e8620a;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.06);
    min-width: 150px;
    z-index: 2000;
    list-style: none;
    margin: 0;
    padding: 6px 0;
}

.nav-item:hover > .submenu,
.has-submenu:hover > .submenu { display: block; }

.submenu-item { list-style: none; }

.submenu-link {
    display: block !important;
    padding: 9px 20px !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    color: #374151 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    transition: background 0.12s, color 0.12s, padding-left 0.12s !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

.submenu-link:hover,
.submenu-link.active {
    background: #fff8f5 !important;
    color: #e8620a !important;
    padding-left: 24px !important;
}

/* ── Right-align user-dropdown ──────────────────────────────── */
.secondary-menu-list .has-submenu > .submenu,
.leagues-menu-list li:last-child .leagues-submenu { right: 0; left: auto; }

/* ── Row 3: Site links (HOME / NEWS / ABOUT …) ──────────────── */
.secondary-menu-list {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    list-style: none;
    margin: 5px 0px 10px 0px;
    /* padding: 4px 0; */
    background: #f8f8f8;
    /* border-top: 1px solid #efefef; */
    gap: 0;
    /* width: 430px; */
    align-self: flex-end;
    height: 20px;
    border-radius: 5px;
}

.secondary-menu-item {
    position: relative;
}

.secondary-menu-link {
    display: inline-block;
    padding: 4px 11px;
    color: #6b7280;
    text-decoration: none;
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    transition: color 0.15s;
    white-space: nowrap;
}

.secondary-menu-link:hover,
.secondary-menu-link.active {
    color: #e8620a;
}

/* ── Mobile Secondary Items (hidden on desktop) ─────────────── */
.mobile-secondary { display: none; }

/* ── Mobile Header Actions ──────────────────────────────────── */
.mobile-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ── Navigation Toggle (burger) ─────────────────────────────── */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: #374151;
    padding: 6px 4px;
    line-height: 1;
    transition: color 0.15s;
}

.nav-toggle:hover { color: #e8620a; }

/* ── Live Badge Pill ─────────────────────────────────────────── */
.live-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    flex-shrink: 0;
}

.live-badge-pill.active {
    background: linear-gradient(135deg, #f97316, #ef4444);
    box-shadow: 0 3px 8px rgba(239,68,68,0.28);
    color: #fff;
}

.live-badge-pill.active:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 12px rgba(239,68,68,0.38);
}

.live-badge-pill.inactive {
    background: #e5e7eb;
    color: #9ca3af;
}

.live-dot {
    width: 7px;
    height: 7px;
    background: rgba(255,255,255,0.85);
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.live-badge-pill.inactive .live-dot { background: #9ca3af; }

.live-badge-pill.active .live-dot::after {
    content: '';
    position: absolute;
    top: -4px; left: -4px;
    width: 15px; height: 15px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.45);
    animation: pulse-dot 2s ease-in-out infinite;
}

.live-count, .live-text { font-size: 11px; }

@keyframes pulse-dot {
    0%   { transform: scale(0.8); opacity: 0.8; }
    70%  { transform: scale(1);   opacity: 0;   }
    100% { opacity: 0; }
}

/* ── Responsive – tablet ─────────────────────────────────────── */
@media (max-width: 992px) {
    .leagues-menu-link { padding: 0 9px; font-size: 0.68rem; }
    .nav-link          { padding: 0 10px !important; font-size: 0.68rem !important; }
    .scorekeep-pill    { padding: 2px 9px; font-size: 0.62rem; }
}

/* ── Responsive – mobile ─────────────────────────────────────── */
@media (max-width: 768px) {

    .header-container {
        align-items: center !important;
        min-height: 58px;
        padding: 0 14px !important;
    }

    .logo {
        border-right: none;
        padding: 8px 0;
        margin-right: 0;
    }

    .logo-image { height: 44px !important; }

    /* Show burger in normal flow */
    .nav-toggle {
        display: block !important;
        z-index: 1002;
        position: static !important;
        top: auto !important;
        right: auto !important;
        transform: none !important;
    }

    /* Hide desktop-only rows */
    .leagues-menu-list  { display: none !important; }
    .secondary-menu-row { display: none !important; }
    .secondary-menu-list{ display: none !important; }
    .nav-live-badge-desktop { display: none !important; }

    /* Mobile slide-out nav */
    .nav-menu {
        position: fixed !important;
        top: 0;
        right: 0;
        width: 290px;
        height: 100vh;
        background: #fff;
        display: flex !important;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: 70px 0 30px;
        box-shadow: -3px 0 20px rgba(0,0,0,0.14);
        transform: translateX(100%);
        visibility: hidden;
        transition: transform 0.28s cubic-bezier(0.4,0,0.2,1), visibility 0s linear 0.28s;
        z-index: 1001;
        overflow-y: auto;
        gap: 0 !important;
    }

    .nav-menu.active {
        transform: translateX(0);
        visibility: visible;
        transition: transform 0.28s cubic-bezier(0.4,0,0.2,1), visibility 0s linear 0s;
    }

    .nav-item {
        margin: 0;
        border-bottom: 1px solid #f3f4f6;
    }

    .nav-link {
        display: flex !important;
        align-items: center !important;
        padding: 14px 22px !important;
        font-size: 0.82rem !important;
        font-weight: 600 !important;
        color: #1f2937 !important;
        letter-spacing: 0.3px !important;
        text-transform: uppercase !important;
        transition: background 0.15s, color 0.15s !important;
    }

    .nav-link.active {
        background: #fff8f5;
        color: #e8620a !important;
    }
    @media (hover: hover) {
        .nav-link:hover {
            background: #fff8f5;
            color: #e8620a !important;
        }
    }

    .nav-link.active::after { display: none; }

    /* Mobile submenus */
    .submenu, .leagues-submenu {
        position: static !important;
        display: none;
        background: #fafafa;
        border-top: none !important;
        box-shadow: none;
        border-radius: 0;
        padding: 0;
    }

    .has-submenu.active .submenu,
    .has-submenu.active .leagues-submenu { display: block; }

    .submenu-link {
        padding: 11px 22px 11px 36px !important;
        font-size: 0.8rem !important;
        color: #6b7280 !important;
        border-bottom: 1px solid #f0f0f0;
    }

    @media (hover: hover) {
        .submenu-link:hover {
            background: #fff5ed !important;
            color: #e8620a !important;
            padding-left: 40px !important;
        }
    }

    /* Mobile secondary items – site links (HOME/NEWS/etc.) */
    .mobile-secondary {
        display: flex !important;
        align-items: stretch;
    }

    .mobile-secondary .nav-link {
        font-size: 0.75rem !important;
        color: #9ca3af !important;
        font-weight: 500 !important;
        padding: 12px 22px !important;
    }

    /* League items in mobile menu – same dark style as top nav items */
    .mobile-secondary.mobile-league .nav-link {
        font-size: 0.82rem !important;
        color: #1f2937 !important;
        font-weight: 700 !important;
        padding: 14px 22px !important;
    }

    /* Overlay */
    .nav-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.42);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.28s ease, visibility 0.28s ease;
    }

    .nav-overlay.active { opacity: 1; visibility: visible; }

    /* Mobile header pill – pushed to far right */
    .mobile-header-actions {
        align-items: center;
        gap: 10px;
        margin-left: auto;
    }

    .live-badge-pill {
        font-size: 10px;
        padding: 4px 10px;
    }

    .live-dot { width: 7px; height: 7px; }
}

@media (min-width: 769px) {
    .mobile-header-actions { display: none; }
}

/* ── Tiny screens ────────────────────────────────────────────── */
@media (max-width: 400px) {
    .logo-image { height: 38px !important; }
    .nav-menu {
        width: 100%;
    }
}