/* music-queue.css — right-side .ms-queue panel, queue
   rows, drag-to-reorder hover affordances. */

/* ===================== Queue panel ===================== */
/* Mirrors the site-drawer geometry from site.css: pinned to the right
   edge, full viewport height (top: 0 → bottom: 0), 300 × 85vw
   max-width, z-index 110 so it sits ABOVE the site header + player
   chrome + everything else. Slides in via transform: translateX(0)
   and pairs with the shared `.overlay` scrim (toggled via the body's
   `data-queue-open` attribute — see the rule in site.css under the
   `.overlay` block) so the rest of the page dims + blurs the same
   way it does when the drawer is open. */
.ms-queue {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 300px;
    max-width: 85vw;
    background: var(--bg);
    border-left: 1px solid var(--rule);
    z-index: 110;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    /* IMPORTANT: box-shadow lives in the [data-open="true"] selector
       below, not here — same reason as `.site-drawer` in site.css.
       A negative-x box-shadow on an off-screen-right element casts
       back INTO the viewport from the right edge as a faint haze on
       every /musiced route. Apply the shadow only when the panel is
       on-screen. */
    transition: transform var(--dur-med) var(--ease-smooth),
                background var(--dur-fast) var(--ease-smooth),
                border-color var(--dur-fast) var(--ease-smooth),
                box-shadow var(--dur-med) var(--ease-smooth);
}
.ms-queue[data-open="true"] {
    transform: translateX(0);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.4);
}
/* Padding + border copy `.site-drawer-head` (site.css) verbatim so
   the queue head has the SAME height as the site header — the head's
   bottom border lands at exactly the same Y as the site header's
   bottom border, giving one continuous horizontal line across the
   viewport when the queue is open. `max(0.3rem, env(safe-area-inset
   -top))` keeps iOS safe-area parity with the site header. */
.ms-queue-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding:
        max(0.3rem, env(safe-area-inset-top))
        max(0.6rem, env(safe-area-inset-right))
        0.3rem
        max(0.6rem, env(safe-area-inset-left));
    border-bottom: 1px solid var(--rule);
    gap: 0.5rem;
}
html.ios .ms-queue-head {
    padding-top: max(0.5rem, env(safe-area-inset-top));
    padding-bottom: 0.5rem;
}
.ms-queue-head h2 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--fg);
    /* Match `.site-drawer-head .brand` horizontal nudge so the title
       text starts at the same inset as the drawer brand. */
    padding-left: 0.3rem;
}

/* Close X — sized + styled to match the site drawer's `.drawer-close`
   (site.css). The default `.ms-icon-btn` is 26 × 26, which read as
   visibly smaller / tighter than the drawer's 36 × 36 X. Same border-
   radius (6 px) and hover treatment (color → accent, background →
   `var(--row-hover)`) so the two close buttons look identical. */
.ms-queue-head #ms-queue-close {
    width: 36px;
    height: 36px;
    border-radius: 6px;
}
.ms-queue-head #ms-queue-close .icon {
    width: 18px;
    height: 18px;
}

/* Vestigial. Used to surface shuffle + repeat as a tiny-mobile
   (≤ 380 px) fallback when the player chrome couldn't fit all
   five transport buttons. The controls-only redesign made the
   chrome fit on iPhone SE flush, so this surface is permanently
   hidden via `display: none`. Markup + handler binding stay so
   the music-page.js wiring is a no-op rather than a binding
   error. Remove on a future cleanup pass if no contender for the
   spot emerges. */
.ms-queue-head-modifiers { display: none; gap: 0.25rem; }
.ms-queue-head-modifiers .ms-icon-btn[aria-pressed="true"] { color: var(--accent); }
.ms-queue-list {
    list-style: none;
    margin: 0;
    padding: 0.5rem 0.5rem 1rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}
.ms-queue-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.5rem;
    border-radius: 4px;
    cursor: grab;
    color: var(--fg-muted);
    transition: background var(--dur-fast) var(--ease-smooth), color var(--dur-fast) var(--ease-smooth);
}
.ms-queue-item:hover { background: var(--row-hover); color: var(--fg); }
.ms-queue-item.dragging { opacity: 0.4; }
.ms-queue-item.now-playing { color: var(--accent); }
.ms-queue-item img,
.ms-queue-item svg.cover {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 3px;
    flex-shrink: 0;
}
.ms-queue-item-text {
    min-width: 0;
    flex: 1;
    overflow: hidden;
}
/* ⋮ button on a queue row — hidden until hover/focus, opens the queue
   context menu (Remove from queue / Delete from library). Hover
   state mirrors `.ms-tile-more` + `.ms-row-more` (cyan circle, bg-
   color icon) so the ⋮ surface reads as one consistent primitive
   across the three places it appears. */
.ms-queue-more {
    opacity: 0;
    flex-shrink: 0;
    border-radius: 50%;
    transition: opacity var(--dur-fast) var(--ease-smooth), color var(--dur-fast) var(--ease-smooth), background var(--dur-fast) var(--ease-smooth);
}
.ms-queue-item:hover .ms-queue-more,
.ms-queue-item:focus-within .ms-queue-more,
.ms-queue-more:focus-visible { opacity: 1; }
.ms-queue-more:hover,
.ms-queue-more:focus-visible {
    background: var(--accent);
    color: var(--bg);
}
.ms-queue-item-title,
.ms-queue-item-artist {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ms-queue-item-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--fg);
    line-height: 1.25;
}
.ms-queue-item-artist {
    font-size: var(--text-xs);
    font-weight: 400;
    color: var(--fg-dim);
    letter-spacing: 0.02em;
    line-height: 1.2;
}


