/* mobile-nav.css — bottom tab bar visible only on mobile. Five slots
   with an elevated central listen button. Tight spacing, black icons,
   orange listen circle, clean glass background. Ripples + breathing
   only appear when .is-playing is set by the reconcile observer. */

:root { --mnav-h: 60px; }

.mnav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    display: none;
    justify-content: space-around;
    align-items: flex-start;
    height: calc(var(--mnav-h) + env(safe-area-inset-bottom));
    box-sizing: border-box;
    background: rgba(255,255,255,0.97);
    -webkit-backdrop-filter: blur(8px);
            backdrop-filter: blur(8px);
    box-shadow: 0 -6px 20px rgba(0,0,0,0.06);
    border-top: 1px solid rgba(0,0,0,0.05);
    padding: 4px 2px env(safe-area-inset-bottom);
    font-family: "Lato", "Inter", "Helvetica Neue", Arial, sans-serif;
    overflow: visible;
}

@media (max-width: 768px) {
    .mnav { display: flex; }
    body { padding-bottom: calc(var(--mnav-h) + env(safe-area-inset-bottom)); }
}

.mnav-item,
.mnav-listen {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 2px 0 0;
    border: 0;
    background: transparent;
    color: #111;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}

.mnav-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fff;
    color: #111;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    transition: transform .18s cubic-bezier(.4,0,.2,1),
                background .15s ease, color .15s ease, box-shadow .2s ease;
}

.mnav-icon svg { width: 18px; height: 18px; display: block; }

.mnav-item:active .mnav-icon { transform: scale(0.9); }

.mnav-item.is-active .mnav-icon {
    background: #fff1eb;
    color: #EF7D00;
    box-shadow: 0 3px 8px rgba(239,125,0,0.22);
}
.mnav-item.is-active .mnav-label { color: #EF7D00; }

.mnav-label {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #111;
    line-height: 1;
    margin-top: 3px;
    white-space: nowrap;
}

/* ---------- Elevated listen button ----------------------------------- */
.mnav-listen { position: relative; }

.mnav-listen-inner {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-top: -20px;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #EF7D00;
    box-shadow: 0 2px 8px rgba(239,125,0,0.35);
    transition: transform .18s cubic-bezier(.34,1.56,.64,1),
                background .18s ease;
    z-index: 2;
}

.mnav-listen:active .mnav-listen-inner { transform: scale(0.94); }
.mnav-listen:hover  .mnav-listen-inner { background: #f68f22; }
.mnav-listen.is-bump .mnav-listen-inner { animation: mnav-bump .4s cubic-bezier(.34,1.56,.64,1); }
@keyframes mnav-bump {
    0%   { transform: scale(1);    box-shadow: 0 2px 8px  rgba(239,125,0,0.35); }
    40%  { transform: scale(1.14); box-shadow: 0 8px 22px rgba(239,125,0,0.55); }
    70%  { transform: scale(0.95); }
    100% { transform: scale(1);    box-shadow: 0 2px 8px  rgba(239,125,0,0.35); }
}

.mnav-listen-play,
.mnav-listen-pause {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .15s ease;
}
.mnav-listen-play svg,
.mnav-listen-pause svg { width: 20px; height: 20px; }
.mnav-listen-play  { transform: translateX(1px); }
.mnav-listen-pause { opacity: 0; }

/* While the mobile player is on screen, drop the elevated listen button
   down inside the bar, shrink it, and swap the play glyph for a pause
   glyph — the elevated "go play" affordance is no longer needed since
   playback state is visible in the player strip above. */
body.njp-state-playing .mnav-listen-inner,
body.njp-state-loading .mnav-listen-inner,
body.njp-state-reconnecting .mnav-listen-inner {
    margin-top: 0;
    width: 34px;
    height: 34px;
    box-shadow: 0 1px 4px rgba(239,125,0,0.25);
}
body.njp-state-playing .mnav-listen,
body.njp-state-loading .mnav-listen,
body.njp-state-reconnecting .mnav-listen {
    gap: 0;
}
body.njp-state-playing .mnav-listen .mnav-label,
body.njp-state-loading .mnav-listen .mnav-label,
body.njp-state-reconnecting .mnav-listen .mnav-label {
    margin-top: 3px;
}
body.njp-state-playing .mnav-listen .mnav-listen-play { opacity: 0; }
body.njp-state-playing .mnav-listen .mnav-listen-pause { opacity: 1; }

/* ---------- Bottom sheet for "още" ----------------------------------- */
.mnav-sheet {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    pointer-events: none;
}
.mnav-sheet.is-open { pointer-events: auto; }

.mnav-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10,8,18,0.45);
    opacity: 0;
    transition: opacity .28s ease;
}
.mnav-sheet.is-open .mnav-sheet-backdrop { opacity: 1; }

.mnav-sheet-panel {
    position: relative;
    width: 100%;
    max-height: 72vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 20px 20px 0 0;
    padding: 12px 16px calc(20px + env(safe-area-inset-bottom));
    transform: translateY(100%);
    transition: transform .32s cubic-bezier(.2,0.85,.25,1);
    box-shadow: 0 -10px 30px rgba(0,0,0,0.2);
    -webkit-overflow-scrolling: touch;
}
.mnav-sheet.is-open .mnav-sheet-panel { transform: translateY(0); }

.mnav-sheet-handle {
    width: 42px;
    height: 4px;
    background: #d7d7de;
    border-radius: 4px;
    margin: 0 auto 12px;
    cursor: grab;
}

.mnav-sheet-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px 8px;
}

.mnav-sheet-link {
    display: block;
    padding: 13px 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #111;
    text-decoration: none;
    background: #faf7f4;
    text-align: center;
    transition: background .15s ease, color .15s ease, transform .15s ease;
}
.mnav-sheet-link:active {
    background: #ffe9dd;
    color: #EF7D00;
    transform: scale(0.98);
}

@media (prefers-reduced-motion: reduce) {
    .mnav-listen.is-playing .mnav-listen-inner,
    .mnav-listen.is-playing .mnav-listen-ripple,
    .mnav-listen-bars span,
    .mnav-sheet-backdrop,
    .mnav-sheet-panel { animation: none; transition: none; }
}
