/* MwStageStatusCard — shared "now playing" stage card (mw-ssc-*).
   The card background is the progress bar: the inline style sets a left-to-right gradient
   (accent for elapsed, darker accent for remaining). Text is white with a shadow so it stays
   legible over any stage accent colour. Used by the Stage View and the Artist Büro dashboard. */

.mw-ssc {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 18px;
    border-radius: 10px;
    /* visible so the artist-care hover popover can extend beyond the card; the progress-bar
       background stays clipped to the rounded corners via border-radius regardless. */
    overflow: visible;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    transition: background 1s linear;
    min-height: 96px;
}

/* Lift a hovered/focused card (and thus its care popover) above sibling cards. */
.mw-ssc:hover,
.mw-ssc:focus-within { z-index: 40; }

.mw-ssc--compact {
    gap: 7px;
    padding: 12px 14px;
    min-height: 0;
    border-radius: 8px;
}

/* ── Top line ── */
.mw-ssc-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.mw-ssc-stage {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.92;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mw-ssc-top-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.mw-ssc-goto {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    opacity: 0.72;
    text-decoration: none;
    transition: opacity 120ms ease;
}

.mw-ssc-goto:hover { opacity: 1; }

.mw-ssc-goto .mud-icon-root { font-size: 18px; }

.mw-ssc-open {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.28);
}

.mw-ssc-open-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff;
}

.mw-ssc-open--open .mw-ssc-open-dot { background: var(--mud-palette-success); }
.mw-ssc-open--closing .mw-ssc-open-dot { background: var(--mud-palette-warning); }
.mw-ssc-open--closed .mw-ssc-open-dot { background: rgba(255, 255, 255, 0.55); }

/* ── Body (act + countdown) ── */
.mw-ssc-body {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

.mw-ssc-actwrap { min-width: 0; flex: 1; }

.mw-ssc-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.85;
    margin-bottom: 2px;
}

.mw-ssc-label--next { opacity: 0.7; }

.mw-ssc-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18);
    animation: mw-ssc-pulse 2s ease-in-out infinite;
}

.mw-ssc-act {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.12;
    /* two lines then ellipsis — never a hard mid-word cut */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mw-ssc--compact .mw-ssc-act { font-size: 1.2rem; }

.mw-ssc-act--next { opacity: 0.92; }
.mw-ssc-act--idle { opacity: 0.6; font-style: italic; font-weight: 600; }

.mw-ssc-time {
    font-size: 12px;
    opacity: 0.85;
    font-variant-numeric: tabular-nums;
    margin-top: 2px;
}

/* Now-playing time range: single line, with the inline live dot (compact) */
.mw-ssc-time--range {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

/* Between-acts "ab HH:mm · in M:SS" may wrap rather than clip */
.mw-ssc-time--flow { white-space: normal; }

.mw-ssc-countwrap { text-align: right; flex-shrink: 0; }

.mw-ssc-countdown {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.mw-ssc--compact .mw-ssc-countdown { font-size: 1.9rem; }

.mw-ssc-countlabel {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.75;
}

/* ── Rahmenprogramm ── */
.mw-ssc-rahmen {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.22);
}

.mw-ssc-rahmen-tag {
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.18);
    flex-shrink: 0;
}

.mw-ssc-rahmen-act { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mw-ssc-rahmen-time { margin-left: auto; opacity: 0.85; font-variant-numeric: tabular-nums; flex-shrink: 0; }

/* ── Actions ── */
.mw-ssc-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

/* ── Artist-care widget (collapsed row) ── */
.mw-ssc-care {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.24);
    outline: none;
    cursor: default;
}

.mw-ssc-care-icon { display: inline-flex; opacity: 0.9; flex-shrink: 0; }
.mw-ssc-care-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mw-ssc-care--empty .mw-ssc-care-name { font-weight: 500; font-style: italic; opacity: 0.8; }
.mw-ssc-care--empty .mw-ssc-care-name { margin-right: auto; }
.mw-ssc-care-time { margin-left: auto; font-size: 11px; opacity: 0.8; font-variant-numeric: tabular-nums; flex-shrink: 0; }

.mw-ssc-care-chevron {
    display: inline-flex;
    flex-shrink: 0;
    opacity: 0.4;
    transition: opacity 120ms ease, transform 120ms ease;
}
.mw-ssc-care-chevron .mud-icon-root { font-size: 16px; }
.mw-ssc-care:hover .mw-ssc-care-chevron,
.mw-ssc-care:focus-within .mw-ssc-care-chevron { opacity: 0.85; transform: translateY(-1px); }

/* ── Artist-care handover popover (hover/focus reveal) ── */
.mw-ssc-care-pop {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    right: auto;
    min-width: 244px;
    max-width: min(320px, 88vw);
    padding: 10px;
    border-radius: 12px;
    background: var(--mud-palette-surface, #14141b);
    color: var(--mud-palette-text-primary, #fff);
    text-shadow: none;
    box-shadow: 0 18px 48px -12px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.07);
    opacity: 0;
    transform: translateY(6px) scale(0.98);
    transform-origin: bottom left;
    pointer-events: none;
    transition: opacity 140ms ease, transform 140ms ease;
    z-index: 20;
}

/* invisible bridge across the gap so the pointer can travel into the popover without dropping :hover */
.mw-ssc-care-pop::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 10px;
}

.mw-ssc-care:hover .mw-ssc-care-pop,
.mw-ssc-care:focus-within .mw-ssc-care-pop {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.mw-ssc-care-pop-head {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 2px 4px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 6px;
}
.mw-ssc-care-pop-icon { display: inline-flex; opacity: 0.7; }
.mw-ssc-care-pop-icon .mud-icon-root { font-size: 16px; }
.mw-ssc-care-pop-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.75;
}
.mw-ssc-care-pop-stage {
    margin-left: auto;
    font-size: 10px;
    opacity: 0.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 45%;
}

.mw-ssc-care-pop-divider { height: 1px; background: rgba(255, 255, 255, 0.06); margin: 6px 2px; }

.mw-ssc-care-row {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 6px;
    border-radius: 8px;
    transition: background 120ms ease;
}
.mw-ssc-care-row:hover { background: rgba(255, 255, 255, 0.04); }
.mw-ssc-care-row--now { background: color-mix(in srgb, var(--mw-ssc-accent, #7c6cf0), transparent 86%); }

.mw-ssc-care-row-badge {
    flex-shrink: 0;
    min-width: 44px;
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.55;
}
.mw-ssc-care-row--now .mw-ssc-care-row-badge { color: var(--mw-ssc-accent, #b3a8ff); opacity: 0.95; }

.mw-ssc-care-row-main { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.mw-ssc-care-row-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mw-ssc-care-row-time { font-size: 11px; opacity: 0.65; font-variant-numeric: tabular-nums; }

.mw-ssc-care-row-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }

.mw-ssc-care-act {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.05);
    color: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: background 120ms ease, color 120ms ease;
}
.mw-ssc-care-act:hover { background: rgba(255, 255, 255, 0.12); }
.mw-ssc-care-act--call:hover { background: color-mix(in srgb, var(--mud-palette-success, #2e7d32), transparent 50%); color: #fff; }
.mw-ssc-care-act .mud-icon-root { font-size: 17px; }

@keyframes mw-ssc-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
