/* Admin › Cloud splits (P636, src/studio/cloud-splits/): Analytics' cards, tiles and tables (admin.css), plus the Mac's
   card, the state pills, the line-up's first column and the Cancel dialog. */

.cs-sub { margin: 4px 0 0; color: var(--st-text-dim); font-size: 14px; }
.cs-sub a { color: inherit; }
.cs-off, .cs-admin > [hidden] { display: none; }
.cs-live, .cs-history, .cs-stats { display: flex; flex-direction: column; gap: 16px; }

.cs-mac { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; }
.cs-mac__icon { width: 24px; height: 24px; color: var(--st-text-dim); }
.cs-mac__who { flex: 1; min-width: 200px; }
.cs-mac__name { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--st-text); font: 600 16px/22px var(--st-font); }
.cs-mac__line { margin: 2px 0 0; color: var(--st-text-faint); font-size: 12.5px; }
.cs-mac__state { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 6px; background: var(--st-surface-2); color: var(--st-text-dim); font: 500 12px/16px var(--st-font); }
.cs-mac__state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.cs-mac__state--online { color: var(--st-ok); }
.cs-mac__state--busy { color: var(--st-warn); }
.cs-mac__state--offline { color: var(--st-error-ink); }
.cs-mac__stats { display: flex; gap: 32px; }
.cs-stat { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.cs-stat__label { color: var(--st-text-faint); font: 500 11px/14px var(--st-font); letter-spacing: 0.04em; text-transform: uppercase; }
.cs-stat__value { color: var(--st-text); font: 600 22px/26px var(--st-font); font-variant-numeric: tabular-nums; }

.cs-paused { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--st-text-dim); font-size: 13px; }
.cs-paused .st-icon { flex: none; width: 16px; height: 16px; }

.cs-state { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 6px; background: var(--st-surface-2); color: var(--st-text-dim); font: 500 12.5px/16px var(--st-font); white-space: nowrap; }
.cs-state .st-icon { width: 13px; height: 13px; }
.cs-state--run { color: var(--st-text); }
.cs-state--done { color: var(--st-ok); }
.cs-state--fail { color: var(--st-error-ink); }
.cs-state__bar { width: 100%; max-width: 240px; height: 3px; margin-top: 6px; }
.cs-place { color: var(--st-text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cs-act { width: 1%; text-align: right; white-space: nowrap; }
.cs-acted { margin-top: 4px; color: var(--st-text-faint); font-size: 12px; }
.cs-notice { margin: 8px 0 0; color: var(--st-text-dim); font-size: 13px; }
.cs-notice:empty { display: none; }
.cs-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; color: var(--st-text-faint); font-size: 12px; }

.cs-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.cs-search { flex: 1; min-width: 200px; max-width: 440px; height: 36px; padding: 0 12px; border: 0; border-radius: 10px; outline: 1px solid var(--st-line); outline-offset: -0.5px; background: var(--st-surface); color: var(--st-text); font: 400 14px var(--st-font); }
.cs-dates { display: flex; align-items: center; gap: 8px; margin-left: auto; color: var(--st-text-faint); font-size: 13px; }
.cs-date { height: 32px; padding: 0 10px; border: 0; border-radius: 999px; outline: 1px solid var(--st-line); outline-offset: -0.5px; background: none; color: var(--st-text); font: 400 13px var(--st-font); color-scheme: dark light; }

.cs-hours { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }
.cs-hour { display: grid; grid-template-columns: 56px 1fr 40px; align-items: center; gap: 12px; font-size: 13px; }
.cs-hour .an-num { color: var(--st-text-dim); }
.cs-user { width: 100%; padding: 0; border: 0; background: none; color: var(--st-text); font: inherit; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.cs-user:hover { text-decoration: underline; }
.cs-user::after { content: ' ›'; color: var(--st-text-dim); }
.cs-user[aria-expanded='true']::after { content: ' ⌄'; }
.cs-unknown { display: block; }
.cs-splits-heading { margin: 12px 0 4px; font-size: 13px; font-weight: 600; color: var(--st-text); }
.cs-pro-users__note { margin: 12px 0 0; }
@container an (width < 600px) {
  .cs-user-detail, .cs-user-detail > .an-td { display: block; }
  .cs-pro-users .an-table--stack .an-tr { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.an-daily__part.cs-plan--pro, .an-legend__item.cs-plan--pro::before { background: var(--st-chord-ink); }
.an-daily__part.cs-plan--admin, .an-legend__item.cs-plan--admin::before { background: var(--st-text-faint); }
.an-daily__part.cs-plan--other, .an-legend__item.cs-plan--other::before { background: var(--st-accent); }

.cs-dialog { width: min(520px, calc(100vw - 32px)); padding: 28px 32px; border: 0; border-radius: 16px; outline: 1px solid var(--st-line); background: var(--st-panel); color: var(--st-text); font-family: var(--st-font); }
.cs-dialog::backdrop { background: rgb(0 0 0 / 0.6); }
.cs-dialog__title { margin: 0; font: 600 18px/24px var(--st-font); }
.cs-dialog__body { margin: 14px 0 24px; color: var(--st-text-dim); font-size: 15px; line-height: 22px; }
.cs-dialog__actions { display: flex; justify-content: flex-end; gap: 10px; }

/* A phone (the stacked tables' own break, where the page is under 600px): a job is one compact card, not a label grid.
   Song and state, then user and plan, then place / queued / waited (Live) or when / waited / ran (History). */
@container an (width < 600px) {
  .cs-table.an-table--stack .an-tr { grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 4px 0; padding: 10px 0; }
  .cs-table.an-table--stack [data-label]::before { content: none; }
  .cs-table.an-table--stack th.an-td { grid-column: 1 / 4; grid-row: 1; min-width: 0; }
  .cs-table.an-table--stack .an-song__artist { display: none; }
  .cs-table.an-table--stack :is([data-label="State"], [data-label="Outcome"], [data-label="Plan"], [data-label="Outcome"] > .cs-state) { grid-column: 4; justify-self: end; margin-left: 10px; }
  .cs-table.an-table--stack :is([data-label="State"], [data-label="Outcome"] > .cs-state) { grid-row: 1; }
  .cs-table.an-table--stack [data-label="Plan"] { grid-row: 2; }
  .cs-table.an-table--stack [data-label="User"] { grid-column: 1 / 4; grid-row: 2; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cs-table.an-table--stack :is([data-label="Place"], [data-label="When"], [data-label="Queued"], [data-label="Wait"], [data-label="Waited"], [data-label="Run"]) { grid-row: 3; color: var(--st-text-faint); font-size: 12.5px; white-space: nowrap; }
  .cs-table.an-table--stack :is([data-label="Place"], [data-label="When"]) { grid-column: 1; margin-right: 12px; }
  .cs-table.an-table--stack :is([data-label="Queued"], [data-label="Wait"]) { grid-column: 2; margin-right: 12px; }
  .cs-table.an-table--stack :is([data-label="Waited"], [data-label="Run"]) { grid-column: 3; }
  .cs-table.an-table--stack :is([data-label="Wait"], [data-label="Waited"])::before { content: "waited "; display: inline; margin: 0; font: inherit; letter-spacing: 0; text-transform: none; }
  .cs-table.an-table--stack [data-label="Run"]::before { content: "ran "; display: inline; margin: 0; font: inherit; letter-spacing: 0; text-transform: none; }
  .cs-table.an-table--stack [data-label="Size"] { display: none; }
  .cs-table.an-table--stack .cs-act { grid-column: 4; grid-row: 3; justify-self: end; width: auto; }
  .cs-table.an-table--stack .cs-act .st-btn { min-height: 44px; min-width: 44px; }
  /* History: the outcome pill sits where Live's state does, its logged admin actions on one small line under the card. */
  .cs-table.an-table--stack [data-label="Outcome"] { display: contents; }
  .cs-table.an-table--stack .cs-acted { grid-column: 1 / -1; grid-row: 4; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* The header: the mode on its own line without "set in Plan limits"; the tabs full width, Pause queue under them. */
  .cs-mode { display: block; }
  .cs-mode__set { display: none; }
  .cs-admin .an-head__tools { flex-direction: column; align-items: stretch; width: 100%; gap: 10px; }
  .cs-admin .an-head__tools .st-seg { display: flex; }
  .cs-admin .an-head__tools .st-seg__item { flex: 1; }
  .cs-admin .an-head__tools .st-seg { order: -1; }
}
