/* ═══════════════════════════════════════════════════
   DISPATCH HEADER — header.css
   ═══════════════════════════════════════════════════ */

/* ── Shell ── */
.dh {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    background: rgba(8,8,8,.96);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--panel-border);
}
.dh__inner {
    max-width: 1400px; margin: 0 auto;
    padding: 0 1.5rem;
    height: var(--header-h);
    display: flex; align-items: center; gap: 1.5rem;
}
.dh__accent {
    height: 2px;
    background: linear-gradient(90deg, var(--orange), rgba(255,106,42,.2), transparent);
}

/* ── Logo ── */
.dh__logo {
    display: flex; align-items: center; gap: .6rem;
    text-decoration: none; flex-shrink: 0;
}
.dh__logo-badge {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 6px;
    background: linear-gradient(145deg, #ff8b59, var(--orange));
    color: var(--charcoal);
    font-family: var(--font-heading); font-size: .8rem; font-weight: 700;
    box-shadow: 0 0 14px rgba(255,106,42,.35);
    flex-shrink: 0;
}
.dh__logo-text { display: flex; flex-direction: column; line-height: 1; }
.dh__logo-name {
    font-family: var(--font-heading); font-size: .9rem; font-weight: 700;
    letter-spacing: .1em; text-transform: uppercase; color: var(--white);
}
.dh__logo-sub {
    font-family: var(--font-mono); font-size: .55rem;
    letter-spacing: .2em; text-transform: uppercase;
    color: var(--orange); opacity: .8;
}

/* ── Clock ── */
.dh__clock {
    display: flex; flex-direction: column; align-items: center;
    flex-shrink: 0; line-height: 1;
}
.dh__clock-time {
    font-family: var(--font-mono); font-size: .95rem;
    color: var(--orange); letter-spacing: .08em;
    text-shadow: 0 0 10px rgba(255,106,42,.4);
}
.dh__clock-label {
    font-family: var(--font-mono); font-size: .48rem;
    letter-spacing: .2em; text-transform: uppercase;
    color: var(--dim); margin-top: 2px;
}

/* ── Nav ── */
.dh__nav {
    display: flex; align-items: center; gap: .25rem;
    flex: 1;
}
.dh__link {
    display: flex; align-items: center; gap: .2rem;
    padding: .4rem .7rem; border-radius: 5px;
    font-family: var(--font-heading); font-size: .8rem;
    letter-spacing: .07em; text-transform: uppercase;
    color: rgba(242,242,242,.6);
    transition: color .2s, background .2s;
    white-space: nowrap;
}
.dh__link:hover, .dh__link--active {
    color: var(--orange);
    background: rgba(255,106,42,.07);
}
.dh__prefix {
    font-family: var(--font-mono); font-size: .7rem;
    color: var(--orange); opacity: .5; margin-right: 1px;
}
.dh__link--active .dh__prefix { opacity: 1; }

/* ── Dropdown group ── */
.dh__group { position: relative; }
.dh__group-toggle {
    display: flex; align-items: center; gap: .2rem;
    padding: .4rem .7rem; border-radius: 5px; border: none;
    background: none; cursor: pointer;
    font-family: var(--font-heading); font-size: .8rem;
    letter-spacing: .07em; text-transform: uppercase;
    color: rgba(242,242,242,.6);
    transition: color .2s, background .2s;
    white-space: nowrap;
}
.dh__group-toggle:hover,
.dh__group--open > .dh__group-toggle {
    color: var(--orange); background: rgba(255,106,42,.07);
}
.dh__chevron {
    font-size: .55rem; opacity: .5; margin-left: 1px;
    transition: transform .2s;
}
.dh__group--open > .dh__group-toggle .dh__chevron { transform: rotate(180deg); opacity: 1; }

.dh__dropdown {
    display: none;
    position: absolute; top: calc(100% + 8px); left: 0;
    min-width: 180px;
    background: rgba(10,10,10,.97);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    padding: .4rem 0;
    box-shadow: 0 12px 40px rgba(0,0,0,.5);
    backdrop-filter: blur(14px);
    z-index: 1002;
}
.dh__dropdown--right { left: auto; right: 0; }
.dh__group--open > .dh__dropdown { display: block; }

.dh__drop-link {
    display: flex; align-items: center; gap: .5rem;
    padding: .55rem 1rem;
    font-family: var(--font-heading); font-size: .78rem;
    letter-spacing: .05em; text-transform: uppercase;
    color: rgba(242,242,242,.65);
    transition: color .15s, background .15s;
    white-space: nowrap;
}
.dh__drop-link:hover { color: var(--orange); background: rgba(255,106,42,.07); }
.dh__drop-link--danger:hover { color: var(--offline); background: rgba(248,113,113,.07); }
.dh__drop-arrow { font-size: .8rem; color: var(--orange); opacity: .5; }
.dh__drop-link:hover .dh__drop-arrow { opacity: 1; }

/* ── Controls ── */
.dh__controls {
    display: flex; align-items: center; gap: .5rem;
    flex-shrink: 0; margin-left: auto;
}

/* ── Sign in ── */
.dh__signin {
    display: flex; align-items: center; gap: .2rem;
    padding: .4rem .8rem; border-radius: 5px;
    border: 1px solid rgba(255,106,42,.35);
    font-family: var(--font-heading); font-size: .78rem;
    letter-spacing: .08em; text-transform: uppercase;
    color: var(--orange);
    transition: background .2s, border-color .2s;
}
.dh__signin:hover { background: rgba(255,106,42,.1); border-color: var(--orange); }

/* ── Driver button ── */
.dh__driver-btn {
    display: flex; align-items: center; gap: .45rem;
    padding: .35rem .7rem; border-radius: 5px; border: none;
    background: rgba(255,106,42,.06);
    border: 1px solid rgba(255,106,42,.18);
    cursor: pointer;
    font-family: var(--font-heading); font-size: .78rem;
    letter-spacing: .06em; text-transform: uppercase;
    color: var(--white);
    transition: background .2s, border-color .2s;
    max-width: 160px;
}
.dh__driver-btn:hover { background: rgba(255,106,42,.12); border-color: rgba(255,106,42,.4); }
.dh__driver-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dh__avatar {
    width: 22px; height: 22px; border-radius: 50%;
    object-fit: cover; border: 1px solid var(--orange); flex-shrink: 0;
}
.dh__avatar-fallback {
    width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,106,42,.2); color: var(--orange);
    font-size: .6rem; font-weight: 700;
}
.dh__driver-dot { margin-right: 1px; }

/* ── Notifications ── */
.dh__notif { position: relative; }
.dh__notif-btn {
    position: relative; width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    border: none; background: none; cursor: pointer;
    color: rgba(242,242,242,.55);
    border-radius: 5px;
    transition: color .2s, background .2s;
}
.dh__notif-btn:hover { color: var(--orange); background: rgba(255,106,42,.07); }
.dh__notif-badge {
    position: absolute; top: 2px; right: 2px;
    min-width: 14px; height: 14px; padding: 0 3px;
    border-radius: 99px;
    background: var(--red); color: var(--white);
    font-size: .48rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.dh__notif-panel {
    position: absolute; top: calc(100% + 8px); right: 0;
    width: 300px; max-height: 380px; overflow-y: auto;
    background: rgba(10,10,10,.97);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    box-shadow: 0 12px 40px rgba(0,0,0,.5);
    backdrop-filter: blur(14px);
    z-index: 1002;
}
.dh__notif-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: .6rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.dh__notif-title {
    font-family: var(--font-mono); font-size: .65rem;
    letter-spacing: .14em; color: var(--orange);
}
.dh__notif-clear {
    border: none; background: none; cursor: pointer;
    font-family: var(--font-mono); font-size: .6rem;
    letter-spacing: .1em; color: var(--dim);
    transition: color .2s;
}
.dh__notif-clear:hover { color: var(--orange); }
.dh__notif-item {
    position: relative;
    border-bottom: 1px solid rgba(255,255,255,.04);
}
.dh__notif-item--read { opacity: .5; }
.dh__notif-link {
    display: block; padding: .6rem 2rem .6rem 1rem;
    font-size: .8rem; line-height: 1.45; color: var(--white);
}
.dh__notif-link:hover { background: rgba(255,255,255,.03); }
.dh__notif-time { display: block; font-size: .65rem; opacity: .4; margin-top: .2rem; }
.dh__notif-dismiss {
    position: absolute; top: .5rem; right: .5rem;
    border: none; background: none; cursor: pointer;
    color: var(--offline); font-size: 1rem; opacity: .6;
    transition: opacity .2s;
}
.dh__notif-dismiss:hover { opacity: 1; }
.dh__notif-empty { padding: 1rem; font-size: .8rem; opacity: .45; text-align: center; }

/* ── Hamburger ── */
.dh__hamburger {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer;
    padding: .4rem;
}
.dh__hamburger span {
    display: block; width: 22px; height: 2px;
    background: var(--white); border-radius: 2px;
    transition: transform .25s, opacity .25s;
}
.dh__hamburger--open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.dh__hamburger--open span:nth-child(2) { opacity: 0; }
.dh__hamburger--open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Scrim ── */
.dh__scrim {
    display: none; position: fixed; inset: 0; z-index: 999;
    background: rgba(0,0,0,.6);
}
.dh__scrim--show { display: block; }

/* ── Ticker ── */
.dh__ticker {
    position: fixed; top: var(--header-h); left: 0; width: 100%; z-index: 999;
    height: 26px;
    display: flex; align-items: center;
    background: linear-gradient(90deg, rgba(200,16,46,.9), rgba(255,106,42,.85));
    overflow: hidden;
}
.dh__ticker-label {
    flex-shrink: 0; padding: 0 .8rem;
    font-family: var(--font-mono); font-size: .6rem;
    letter-spacing: .14em; color: rgba(255,255,255,.7);
    border-right: 1px solid rgba(255,255,255,.2);
}
.dh__ticker-track {
    display: flex; gap: 3rem;
    animation: tickerScroll 30s linear infinite;
    white-space: nowrap; padding-left: 2rem;
}
.dh__ticker-item {
    font-size: .75rem; color: var(--white);
    font-family: var(--font-body);
}
.dh__ticker-item strong { font-family: var(--font-heading); letter-spacing: .04em; }
@keyframes tickerScroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ── Radio player ── */
.dh__radio {
    position: fixed; bottom: 0; left: 0; width: 100%; z-index: 998;
    height: 56px;
    display: flex; align-items: center; gap: 1rem;
    padding: 0 1.5rem;
    background: rgba(8,8,8,.96);
    border-top: 1px solid var(--panel-border);
    backdrop-filter: blur(14px);
}
.dh__radio-toggle {
    width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
    border: 1px solid rgba(255,106,42,.5); background: transparent;
    color: var(--orange); font-size: 1rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .2s;
}
.dh__radio-toggle:hover { background: rgba(255,106,42,.12); }
.dh__radio-art {
    width: 36px; height: 36px; border-radius: 5px; flex-shrink: 0;
    background: rgba(255,255,255,.06); overflow: hidden; display: none;
}
.dh__radio-art.has-art { display: block; }
.dh__radio-art img { width: 100%; height: 100%; object-fit: cover; }
.dh__radio-info { flex: 1; min-width: 0; }
.dh__radio-label {
    display: block; font-family: var(--font-mono); font-size: .65rem;
    letter-spacing: .12em; text-transform: uppercase; color: var(--orange);
}
.dh__radio-live {
    display: none; margin-left: .4rem; font-size: .6rem; font-weight: 700;
    color: var(--offline); letter-spacing: .08em;
}
.dh__radio-live.on { display: inline; animation: radioLivePulse 1.2s ease-in-out infinite; }
@keyframes radioLivePulse { 0%,100%{opacity:1;} 50%{opacity:.3;} }
.dh__radio-now {
    display: block; font-size: .82rem; opacity: .75;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dh__radio-vol {
    width: 90px; flex-shrink: 0;
    accent-color: var(--orange); cursor: pointer;
}

    /* Hide nav account on desktop - mobile only */
    .dh__nav .dh__nav-account { display: none; }

/* Mobile */
@media (max-width: 900px) {
    .dh__clock { display: none; }
    .dh__hamburger { display: flex; }
    .dh__controls .dh__group#dhg-account { display: none; }
    .dh__controls .dh__signin { display: none; }
    .dh__controls { gap: .25rem; overflow: visible; }
    .dh__notif { display: flex; position: relative; }
    .dh__notif-panel { width: calc(100vw - 2rem); right: 0; left: auto; max-width: 300px; }
    .dh__nav .dh__nav-account { display: block; width: 100%; border-bottom: 2px solid rgba(255,106,42,.2); margin-bottom: .5rem; }
    .dh__nav { position: fixed; top: 0; right: -100%; width: min(300px, 80vw); height: 100vh; flex-direction: column; align-items: flex-start; gap: 0; background: rgba(8,8,8,.99); border-left: 1px solid var(--panel-border); padding: calc(var(--header-h) + 1rem) 0 2rem; overflow-y: auto; transition: right .3s ease; z-index: 1000; }
    .dh__nav--open { right: 0; }
    .dh__link, .dh__group-toggle { width: 100%; padding: .75rem 1.5rem; border-radius: 0; font-size: .9rem; border-bottom: 1px solid rgba(255,255,255,.04); }
    .dh__dropdown { position: static; box-shadow: none; border: none; background: rgba(255,255,255,.03); border-radius: 0; padding: 0; }
    .dh__drop-link { padding: .6rem 1.5rem .6rem 2.5rem; font-size: .82rem; }
    .dh__driver-btn { max-width: none; width: 100%; padding: .75rem 1.5rem; border-radius: 0; border: none; border-bottom: 1px solid rgba(255,255,255,.04); font-size: .9rem; }
}

@media (max-width: 600px) {
    .dh__radio-vol { display: none; }
    .dh__radio-art { display: none !important; }
}
