/* ============================================================
   SWIFT Session (desk/staff) — prosecutor review queue.
   Built from design-system components; this sheet only places them.
   Structure in @layer layout, paint in @layer design. Colour comes from
   the surface each component sits on (the page is `surface lowest`, every
   pane is `surface raised`).
   ============================================================ */

@layer layout {
  /* Session header: a raised card holding the heading, the progress sentence
     and bar, and End Session. The surface supplies the fill and the ink. */
  .swift-session .intro { display: grid; gap: var(--t-space-4);
                          padding: var(--t-space-5);
                          border-radius: var(--t-radius-lg); }
  .swift-session .session-status { display: flex; flex-wrap: wrap; align-items: center;
                                   gap: var(--t-space-4); }
  .swift-session .progress-text { margin: 0; white-space: nowrap; }
  .swift-session .session-status progress { flex: 1; min-inline-size: 8rem; }
  .swift-session .end-form { margin: 0; }

  /* Two panels: the case queue beside the review pane. */
  .swift-session .panels { display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr);
                           gap: var(--t-space-4); align-items: start; }
  @container (max-width: 52rem) {
    .swift-session .panels { grid-template-columns: 1fr; }
  }

  /* The queue pane's header carries the count and the refresh link. */
  .swift-session .queue-aside { display: flex; flex-wrap: wrap; align-items: center;
                                gap: var(--t-space-3); }
  .swift-session .queue-count { white-space: nowrap; }

  /* The queue pane's body holds the messages above the cases, so they keep
     the pane's own spacing rather than running into the first card. */
  .swift-session #swift-queue { display: grid; gap: var(--t-space-4);
                                align-content: start; }

  /* One card per case: the number in a circle leads it, the name reads as the
     card's title, and the date under it is the small line the base drew. */
  .swift-session .rows .num { display: inline-flex; align-items: center;
                              justify-content: center;
                              inline-size: 1.75rem; block-size: 1.75rem;
                              border-radius: 50%;
                              font-size: var(--t-font-size-sm);
                              font-weight: var(--t-font-weight-bold); }
  .swift-session .rows .title { font-size: var(--t-font-size-sm); }
  .swift-session .rows .date { font-size: var(--t-font-size-xs); }
  .swift-session .rows .main .badge { justify-self: start; }

  /* Review pane: who the case is about. */
  .swift-session .swift-review { display: grid; gap: var(--t-space-5); }
  .swift-session .identity { display: flex; align-items: center; gap: var(--t-space-3); }
  .swift-session .avatar { display: inline-flex; align-items: center; justify-content: center;
                           inline-size: 2.75rem; block-size: 2.75rem; flex-shrink: 0;
                           border-radius: 50%; font-weight: var(--t-font-weight-bold); }
  .swift-session .who { display: grid; gap: var(--t-space-1); min-inline-size: 0; }
  .swift-session .who .name { font-weight: var(--t-font-weight-bold); }

  .swift-session .section-title { margin: 0; }
  .swift-session .section-title :is(h3) { font-size: var(--t-font-size-sm);
                                          font-weight: var(--t-font-weight-semibold); }
  .swift-session .alerts-title :is(h3) { font-size: var(--t-font-size-md);
                                         font-weight: var(--t-font-weight-semibold); }

  /* The folded officer report. */
  .swift-session .probable-cause summary { cursor: pointer;
                                           font-weight: var(--t-font-weight-semibold); }
  .swift-session .probable-cause p { margin: var(--t-space-2) 0 0; }

  /* The decision form and its decorative stepper. */
  .swift-session .decision { display: grid; gap: var(--t-space-4); }
  .swift-session .step-label { margin: 0; font-size: var(--t-font-size-xs);
                               font-weight: var(--t-font-weight-semibold); }
  .swift-session .stepper { display: grid; grid-template-columns: repeat(3, 1fr);
                            gap: var(--t-space-2); }
  .swift-session .stepper .segment { block-size: .375rem;
                                     border-radius: var(--t-radius-pill); }

  /* Offer pane and form. */
  .swift-session .swift-offer { display: grid; gap: var(--t-space-4); }
  .swift-session .swift-offer > :is(button, a.button, label.button) { justify-self: start; }
  .swift-session .swift-offer-form { display: grid; gap: var(--t-space-2); }
  .swift-session .recover { display: grid; gap: var(--t-space-2); justify-items: start; }
  .swift-session .hint { margin: 0; }

  /* Session summary: a focused column, its counts and its one figure. */
  .swift-session .swift-summary { max-inline-size: 40rem; margin-inline: auto; }
  .swift-session .swift-summary > .body { justify-items: stretch; text-align: center; }
  .swift-session .swift-summary .count { margin: 0; font-size: var(--t-font-size-hero);
                                         font-weight: var(--t-font-weight-bold); }
  .swift-session .swift-summary .meta { margin: 0; }
  .swift-session .swift-summary .button-row { justify-content: center; }
  .swift-session .savings-label, .swift-session .savings-amount,
  .swift-session .savings-basis { margin: 0; }
  .swift-session .savings-amount { font-size: var(--t-font-size-hero);
                                   font-weight: var(--t-font-weight-bold); }
}

@layer design {
  .swift-session .progress-text { color: var(--c-surface-text-color-base); }
  .swift-session .queue-count { color: var(--c-surface-text-color-muted); }
  .swift-session .rows .num { color: var(--c-surface-text-color-muted); }
  /* The whole card is the link, so its name reads as the card's title rather
     than as an underlined link inside it, as the base's case button did. The
     card still shows the focus ring the rows component gives it. */
  .swift-session .rows a.main .title { color: var(--c-surface-text-color-base);
                                       text-decoration: none; }

  .swift-session .who .date { color: var(--c-surface-text-color-muted); }
  .swift-session .section-title :is(h3) { color: var(--c-surface-text-color-muted); }
  .swift-session .step-label { color: var(--c-surface-text-color-muted); }

  /* A prior record marks the case: red when there is one, green when not. */
  .swift-session .prior[data-has-prior="true"] { color: var(--c-surface-text-color-error); }
  .swift-session .prior[data-has-prior="false"] { color: var(--c-surface-text-color-success); }

  .swift-session .hint { color: var(--c-surface-text-color-muted); }

  .swift-session .blank-slate.clear .icon { color: var(--c-surface-text-color-success); }
  .swift-session .swift-summary .meta { color: var(--c-surface-text-color-muted); }
  .swift-session .savings-label, .swift-session .savings-basis { color: var(--c-surface-text-color-muted); }
}
