/* Sky Suite — floating upload panel (shared shell chrome).
   Markup: templates/shared/_upload_panel.html (one data-turbo-permanent
   region); behaviour: sky-upload-panel.js. Colours come only from theme
   variables every pack sets per mode (Classic = vercel/linear and the new
   themes, light and dark), with dark fallbacks. Sits above the podcast
   mini-bar when that is open. */
.sup {
    --sup-bg: var(--sky-surface, #151924);
    --sup-line: var(--sky-border, #2a3040);
    --sup-ink: var(--sky-text, #e7ecf5);
    --sup-muted: var(--sky-text-muted, #94a3b8);
    --sup-accent: var(--sky-primary, #0dcaf0);
    --sup-ok: var(--theme-success, #22c55e);
    --sup-warn: var(--theme-warning-fg, #f59e0b);
    --sup-bad: var(--theme-danger, #ef4444);
    --sup-track: rgba(127, 127, 127, .22);
    position: fixed;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 1210;
    width: 340px;
    max-width: calc(100vw - 32px);
    color: var(--sup-ink);
    font-size: .8125rem;
    line-height: 1.4;
}
.sup[hidden] { display: none !important; }
body:has(#skp-bar:not([hidden])) .sup { bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }

.sup-card {
    background: var(--sup-bg);
    border: 1px solid var(--sup-line);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .28);
    overflow: hidden;
}
.sup-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 8px 8px 14px;
    border-bottom: 1px solid var(--sup-line);
    font-weight: 600;
}
.sup-head > .bi { color: var(--sup-accent); font-size: 1rem; }
.sup-head > .sky-loader { width: 44px; }
.sup-title { flex: 1; }
.sup-icon-btn {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--sup-muted);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex: 0 0 auto;
    padding: 0;
}
.sup-icon-btn:hover { background: var(--sup-track); color: var(--sup-ink); }
.sup-icon-btn:focus-visible, .sup-pill:focus-visible, .sup-btn:focus-visible,
.sup a:focus-visible { outline: 2px solid var(--sup-accent); outline-offset: 2px; }

.sup-list { list-style: none; margin: 0; padding: 0; max-height: 46vh; overflow-y: auto; }
.sup-row { padding: 10px 14px; border-bottom: 1px solid var(--sup-line); }
.sup-row:last-child { border-bottom: 0; }
.sup-row-top { display: flex; align-items: center; gap: 6px; min-height: 24px; }
.sup-name {
    flex: 1;
    min-width: 0;
    font-weight: 600;
    color: var(--sup-ink);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sup-name:hover { text-decoration: underline; }
.sup-dismiss { width: 28px; height: 28px; font-size: .75rem; }
.sup-headline { margin-top: 2px; }
.sup-tone-ok .sup-headline { color: var(--sup-ok); font-weight: 600; }
.sup-tone-warn .sup-headline { color: var(--sup-warn); font-weight: 600; }
.sup-tone-bad .sup-headline { color: var(--sup-bad); font-weight: 600; }
.sup-bar {
    height: 6px;
    margin: 6px 0 4px;
    border-radius: 99px;
    background: var(--sup-track);
    overflow: hidden;
}
.sup-bar-fill {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: var(--sup-accent);
    transition: width .4s ease;
}
.sup-tone-ok .sup-bar-fill { background: var(--sup-ok); }
.sup-tone-warn .sup-bar-fill { background: var(--sup-warn); }
.sup-tone-bad .sup-bar-fill { background: var(--sup-bad); }
.sup-detail, .sup-sub { color: var(--sup-muted); font-size: .75rem; }
.sup-detail:empty, .sup-sub:empty { display: none; }
.sup-link {
    display: inline-block;
    margin-top: 6px;
    color: var(--sup-accent);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    padding: 2px 0;
}
.sup-note {
    margin: 0;
    padding: 8px 14px 10px;
    color: var(--sup-muted);
    font-size: .75rem;
    border-top: 1px solid var(--sup-line);
}

.sup-confirm {
    padding: 10px 14px;
    border-bottom: 1px solid var(--sup-line);
    background: var(--sup-track);
}
.sup-confirm-text { margin: 0 0 8px; font-weight: 600; }
.sup-confirm-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.sup-btn {
    appearance: none;
    border: 1px solid var(--sup-line);
    background: transparent;
    color: var(--sup-ink);
    border-radius: 8px;
    padding: 6px 10px;
    min-height: 32px;
    font-size: .75rem;
    font-weight: 600;
    cursor: pointer;
}
.sup-btn:hover { background: var(--sup-track); }
.sup-btn-primary { background: var(--sup-accent); border-color: var(--sup-accent); color: var(--sky-on-primary, #fff); }
.sup-btn-primary:hover { background: var(--sup-accent); filter: brightness(1.08); }
.sup-btn-danger { color: var(--sup-bad); border-color: var(--sup-bad); }

/* Minimized: one pill. */
.sup[data-state="min"] { width: auto; }
.sup-pill {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    float: right;
    min-height: 40px;
    padding: 8px 14px;
    border-radius: 99px;
    border: 1px solid var(--sup-line);
    background: var(--sup-bg);
    color: var(--sup-ink);
    font-size: .8125rem;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
    cursor: pointer;
}
.sup-pill > .bi:first-child { color: var(--sup-accent); }
.sup-pill.sup-tone-ok > .bi:first-child { color: var(--sup-ok); }
.sup-pill.sup-tone-warn > .bi:first-child { color: var(--sup-warn); }
.sup-pill.sup-tone-bad > .bi:first-child { color: var(--sup-bad); }

/* Phones: a full-width sheet; tap targets 40px+. */
@media (max-width: 575.98px) {
    .sup { left: 8px; right: 8px; width: auto; max-width: none; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
    body:has(#skp-bar:not([hidden])) .sup { bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
    .sup[data-state="min"] { left: auto; }
    .sup-icon-btn { width: 40px; height: 40px; }
    .sup-btn { min-height: 40px; padding: 8px 12px; }
    .sup-list { max-height: 40vh; }
    .sup-link { padding: 8px 0; }
}

@media (prefers-reduced-motion: reduce) {
    .sup-bar-fill { transition: none; }
}
