/* =============================================================================
   Envíos demo — what inline styles can't carry: the header and its tabs, the
   demo banner, phone gutters, hovers, the Claim overlay's two panels, and the
   small classes the design canvas defined in its <helmet> blocks (v2-*).
   Buttons, chips, fields, cards, banners, modals: /ds/. Tokens only.
   ========================================================================== */

/* the demo banner, above the header; it scrolls away */
.dm-banner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px;
  padding: 8px 32px; background: var(--hb-sol-light); color: var(--hb-sol-ink);
  border-bottom: 1px solid var(--hb-sol-line); font-size: var(--fs-ui-sm); line-height: 1.4;
}
.dm-banner-text { flex: 1 1 320px; min-width: 0; }
.dm-banner-viewer { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.dm-banner-viewer select { min-height: 32px; }
.dm-note { display: block; margin-top: 4px; font-size: var(--fs-ui-xs); font-weight: 600; }

/* the redesign header */
.dm-header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: var(--hb-paper); border-bottom: 1px solid var(--hb-line);
  padding: 10px 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px;
}
/* a control that Tab or Shift+Tab scrolls into view stops below the sticky
   header (65px tall on a wide screen), not under it */
html { scroll-padding-top: 76px; }
.dm-brand, .dm-brand:hover { font-weight: 600; font-size: var(--fs-ui-xl); letter-spacing: -0.01em; color: inherit; text-decoration: none; }
.dm-tabs { display: flex; flex-wrap: wrap; gap: 2px; }
.dm-me { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dm-me-name { font-size: var(--fs-ui-md); font-weight: 600; }
.v2-tab {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  border-radius: var(--radius-pill); font-size: var(--fs-ui-md); font-weight: 600;
  color: var(--hb-ink-soft); text-decoration: none; white-space: nowrap;
}
.v2-tab:hover { background: var(--hb-cloud); color: var(--hb-chalkboard); }
.v2-tab[aria-current="page"], .v2-tab[aria-current="page"]:hover { background: var(--hb-chalkboard); color: var(--hb-paper); }

/* the page column: side gutters live here so phones get 16px */
.dm-main { margin: 0 auto; box-sizing: border-box; display: flex; flex-direction: column; padding-left: 32px; padding-right: 32px; }

/* from the canvas <helmet> blocks */
.v2-card-id { font-weight: 600; font-size: var(--fs-ui); color: var(--hb-chalkboard); text-decoration: none; }
.v2-card-id:hover { color: var(--hb-text-agua); text-decoration: underline; }
.v2-th { font-size: var(--fs-ui-xs); font-weight: 600; color: var(--hb-ink-soft); text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--hb-line); white-space: nowrap; }
.v2-th--tight { padding: 8px; }
.v2-td { font-size: var(--fs-ui-md); padding: 9px 10px; border-bottom: 1px solid var(--hb-line); vertical-align: top; }
.v2-td--tight { font-size: var(--fs-ui-sm); padding: 8px; }
.v2-td--roomy { padding: 10px; }
.v2-drag { cursor: grab; }
.v2-drag:active { cursor: grabbing; }
.v2-drag[draggable="false"] { cursor: default; }
.v2-pick:hover { border-color: var(--hb-chalkboard) !important; background: var(--hb-cloud-soft) !important; }
.v2-opt:hover { border-color: var(--hb-chalkboard) !important; }
.v2-mark {
  display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; flex: none;
  border-radius: var(--radius-pill); background: var(--hb-chalkboard); color: var(--hb-paper);
  font-size: var(--fs-ui-2xs); font-weight: 700;
}
.v2-src {
  display: inline-block; margin-left: 6px; padding: 1px 8px; vertical-align: middle;
  border-radius: var(--radius-pill); background: var(--hb-agave-light); color: var(--hb-agave-ink);
  font-size: var(--fs-ui-2xs); font-weight: 600;
}

/* one order at a time: the request and what Frankie gets, side by side on one scrim.
   The scrim is the one thing that scrolls: the request panel grows to its full
   height instead of hb-modal's own scroll box (on a phone that box hid Send). */
.dm-claim-scrim { padding: 48px 24px; }
.dm-claim-stage { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: center; gap: 24px; width: 100%; }
.dm-claim-stage:focus { outline: none; }
.dm-claim-modal { flex: 0 1 580px; min-width: 0; margin: 0; position: relative; max-height: none; overflow: visible; }
.dm-claim-preview { flex: 0 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.dm-channels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }

/* text someone typed (a note, a reason, a tracking number, a purchase order
   field, an event log, the "Last:" line): a long word breaks inside its box
   instead of widening the page; min-width: 0 lets a flex or grid child shrink.
   white-space and max-width are for a chip that shows a typed tracking
   number: /ds/ keeps a chip on one line, so this one may wrap again, and it
   never grows wider than its row (this file loads after /ds/) */
.dm-wrap { overflow-wrap: anywhere; min-width: 0; white-space: normal; max-width: 100%; }

/* small things */
.dm-vh { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* headings that take focus from code (Pack, after a move); the Claim stage has its own rule above */
.dm-heading-focus:focus { outline: none; }
/* a field marked invalid sits on an adobe-light row (Upload's unmatched line), where
   /ds/'s adobe-light halo can't be seen: keyboard focus gets the focus ring instead */
.dm-main [aria-invalid="true"]:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }

/* looks unavailable, stays in the Tab order (the Claim overlay's Send, 6.6): the same
   fade as a disabled hb-btn, and no lift on hover or press */
.dm-wait[aria-disabled="true"],
.dm-wait[aria-disabled="true"]:hover,
.dm-wait[aria-disabled="true"]:active { opacity: 0.6; cursor: default; transform: none; filter: none; }

/* Stock: a running-low row (6.10); on phones the detail gets its own line */
.dm-low-row { gap: 14px; }
.dm-low-detail { white-space: nowrap; }

/* phones */
@media (max-width: 640px) {
  html { scroll-padding-top: 0; }   /* the header scrolls away here */
  .dm-banner { padding: 8px 16px; }
  .dm-header { position: static; padding: 10px 16px; }
  .dm-tabs { flex: 1 1 100%; min-width: 0; max-width: 100%; flex-wrap: nowrap; overflow-x: auto; }
  .dm-me { margin-left: 0; }
  .dm-main { padding-left: 16px; padding-right: 16px; }
  .dm-claim-scrim { padding: 24px 16px; }
  .dm-channels { grid-template-columns: 1fr; }
  .dm-low-row { flex-wrap: wrap; gap: 2px 14px; }
  .dm-low-name { flex: 1 1 100%; }
  .dm-low-detail { white-space: normal; }
}
