/* ============================================================
   SWIFT Desk texts (MEA-21): the staff pages (/admin/officer-engagement,
   /da/engagement/review, /ada/engagement/review) and the officer sign-up
   page (/officer/engagement).

   Both are built from design-system components (pane, rows, facts,
   field, button row, callout). This sheet places them and styles the
   pieces no component covers: the tab row, the message text block, guard
   findings and the approvals list.

   Rule of the desk: anything placed directly on the dark desk background
   uses --t-text-inverse; everything else sits in a pane and takes its
   colours from the pane's surface. Structure in @layer layout, paint in
   @layer design, tokens only (D10).
   ============================================================ */

@layer layout {
  /* Tab row between the scheduled texts and the Welcome text. */
  .oe-tabs { display: flex; flex-wrap: wrap; gap: var(--mea-space-2); }
  .oe-tabs a { display: inline-flex; align-items: center;
               min-height: var(--t-target-min, 44px);
               padding: var(--mea-space-2) var(--mea-space-4);
               border-radius: var(--mea-radius-pill); text-decoration: none; }

  .oe-back { margin: 0; }

  /* Inside a version card. */
  .oe-version > .body > :is(p, h3) { margin: 0; }
  .oe-version .when { font-size: var(--t-font-size-sm); font-weight: var(--t-font-weight-semibold); }
  .oe-version h3 { font-family: var(--t-font-family-heading); font-size: var(--t-font-size-lg);
                   font-weight: var(--t-font-weight-bold); }
  .oe-body { margin: 0; padding: var(--t-space-4); border-radius: var(--t-radius-md);
             border-width: var(--t-border-width-interactive);
             font-size: var(--t-font-size-md);
             white-space: pre-wrap; overflow-wrap: anywhere; }
  .oe-reasons { margin: 0; padding-inline-start: var(--mea-space-5);
                display: grid; gap: var(--mea-space-2); }
  .oe-reasons p { margin: 0; }
  .oe-ack, .oe-send-now { display: grid; gap: var(--mea-space-3);
                          margin-block-start: var(--mea-space-2); }
  .oe-send-now > p { margin: 0; }
  /* The approve button sits on the line with "Waiting". */
  .oe-parties dd { display: flex; flex-wrap: wrap; align-items: center; gap: var(--t-space-3); }

  /* Officer sign-up card. */
  .officer-engagement .pane {
    & > .body { font-size: var(--t-font-size-md); }
    & p, & h2 { margin: 0; }
    & h2 { font-family: var(--t-font-family-heading); font-size: var(--t-font-size-lg);
           font-weight: var(--t-font-weight-bold); }
    & section, & form { display: grid; gap: var(--t-space-4); }
    & .disclosure { display: grid; gap: var(--t-space-2);
                    padding: var(--t-space-4); border-radius: var(--t-radius-md);
                    border-width: var(--t-border-width-interactive); }
    & .agree { font-size: var(--t-font-size-sm); }
    & .field .code { max-inline-size: 14rem; }
  }
}

@layer design {
  /* Tabs sit on the desk: white outline pills; the current tab is a card. */
  .oe-tabs a { font-size: var(--mea-text-sm); font-weight: var(--mea-w-semibold);
               color: var(--t-text-inverse); border: 1px solid currentColor; }
  .oe-tabs a[aria-current] { background: var(--t-card-bg); color: var(--t-text);
                                    border-color: var(--t-card-border); }
  .oe-tabs a:focus-visible { outline: 2px solid var(--t-text-inverse); outline-offset: 2px; }

  .oe-back a { color: var(--t-text-inverse); font-size: var(--mea-text-sm);
               font-weight: var(--mea-w-semibold); }

  .oe-body { border-style: solid; border-color: var(--t-border); }

  /* Officer sign-up card. */
  .officer-engagement .pane {
    & .disclosure { border-style: solid; border-color: var(--t-border); }
    & .agree { color: var(--c-surface-text-color-muted); }
  }
}
