/* Shared dialog base (dlg-*). One modal system for the report, ban, and
   embed dialogs: centered card on desktop; on mobile a draggable bottom
   sheet by default, or a fullscreen takeover with the dlg--full variant
   (assets/src/js/dialog.js pairs this with the shared createBottomSheet
   controller: same drag/flick/backdrop-fade mechanics as the comment
   drawer).

   Design rules:
   - ONE font: inherits var(--font-sans) via body. No Source Code Pro (it is
     not even loaded on the feed/map pages these dialogs mount on).
   - Whole-number type scale only: 17 title / 14 body+fields / 13 secondary+
     buttons / 12 labels+micro.
   - ONE vertical rhythm: .dlg-body is a grid with a single gap; sections do
     not own their own margins.
   - All colors via theme vars with explicit unthemed fallbacks (there is no
     global --vc default). Panel uses --vb (always solid), never --v-card-bg
     (can be transparent on low-contrast vessels).

   Structure contract (see views/partials/common/report-dialog.ejs):
     .dlg > .dlg-backdrop[data-dlg-close]
          + .dlg-panel > .dlg-grip + header.dlg-head
                       + form.dlg-form > .dlg-body + footer.dlg-foot
                       (+ state panels as form siblings)
   The FORM owns body+foot so submit buttons live inside it (Enter submits);
   the panel is position:relative so it paints above the absolute backdrop.

   NOTE: .dlg-panel is overflow:hidden for radius clipping. The OPEN panel
   rests at `transform: none` at both breakpoints (and bottomSheet.js snaps
   a declined drag back to `none`), so it is never the containing block of
   a position:fixed descendant: the ban dialog's duration select menu is
   placed against the viewport and escapes the clip. A panel transform at
   rest would clip it (the comment drawer's notes in comments.css). */

.dlg {
  position: fixed;
  inset: 0;
  z-index: 110; /* above the comment drawer (60) and list panel (70) */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
}

/* Alert tier: the confirm/alert dialog (NyxDialog) stacks ABOVE the feature
   dialogs at 110 so an error raised from inside the ban/share/dm dialogs
   paints over them. The Escape handler in dialog.js yields to an open
   .dlg--alert for the same layering. Still below v-picker menus and the
   lightbox (9999+), which never host confirms. */
.dlg--alert { z-index: 120; }

/* Dialog JS toggles every state panel via the hidden ATTRIBUTE, and several
   of those panels carry their own display rule (.dlg-form flex, .rd-success
   grid, .rd-disclosure flex, .rd-rules-list grid). An author display beats
   the UA [hidden] rule, so without this a "hidden" panel half-shows. Make
   hidden unconditional inside dialogs. */
.dlg [hidden] { display: none !important; }
.dlg.is-open { pointer-events: auto; }
.dlg.is-hidden { display: none; }

/* Backdrop overscans the viewport top/bottom: iOS Safari shifts fixed layers
   while the keyboard is up, and the oversized scrim keeps the page from
   peeking through (same trick as .cm-drawer-backdrop). The drag controller
   writes inline `opacity` during a sheet drag — it multiplies over this
   background transition, no conflict. */
.dlg-backdrop {
  position: absolute;
  inset: -100vh 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.18s ease;
}
.dlg.is-open .dlg-backdrop { background: rgba(0, 0, 0, 0.6); }

.dlg-panel {
  position: relative; /* paints above the absolute backdrop */
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--dlg-w, 520px); /* per-dialog knob: #x-dialog { --dlg-w: … } */
  max-height: min(85dvh, 720px);
  /* Unthemed pages (feed, map, /s) must land on the SITE palette, not a
     stray near-black: #14161a was a warm neutral while Midnight is
     blue-tinted, so the dialog read as "black" next to everything around
     it. gray-900 is the documented default panel surface (the same value
     .collect-modal-panel snapshots as --vb). Tokens, never hex copies. */
  background: var(--vb, var(--color-gray-900));
  color: var(--vtext, var(--color-gray-200));
  border: 1px solid var(--v-card-border, rgba(255, 255, 255, 0.10));
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  /* Desktop entrance. Open state is `transform: none` (not translateY(0))
     so the open panel is not a containing block for fixed descendants. */
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.dlg.is-open .dlg-panel {
  opacity: 1;
  transform: none;
}

/* Drag handle — mobile-sheet chrome only. */
.dlg-grip {
  display: none;
  justify-content: center;
  padding: 8px 0 2px;
  flex-shrink: 0;
}
.dlg-grip span {
  width: 32px;
  height: 4px;
  border-radius: 99px;
  background: var(--vc, var(--color-gray-600));
}

.dlg-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px 12px;
  flex-shrink: 0;
}
.dlg-head-text { min-width: 0; flex: 1; }
.dlg-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--vt, #fff);
  letter-spacing: -0.005em;
}
.dlg-sub {
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--vc-53, #8d93a0);
}
.dlg-sub b { color: var(--vtext, #d4d6da); font-weight: 600; }

.dlg-close {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 9999px;
  border: 0;
  background: transparent;
  color: var(--vc-53, #8d93a0);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
  font-family: inherit;
}
.dlg-close:hover {
  background: var(--vc-10, rgba(255, 255, 255, 0.06));
  color: var(--vt, #fff);
}

/* The form is the flex column so the footer pins while the body scrolls.
   min-height: 0 is load-bearing — without it the body never shrinks. */
.dlg-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.dlg-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 20px 16px;
  display: grid;
  gap: 16px;
  align-content: start;
  font-size: 14px;
  line-height: 1.5;
}
/* Grid items default to min-width:auto, so ONE wide child (a long <pre>
   line in the embed snippet, an unbroken URL) blows the single column out
   past the panel, where overflow:hidden silently clips every section.
   Let children shrink to the track; wide content then scrolls inside its
   own overflow-x container instead. */
.dlg-body > * { min-width: 0; }

/* Shared inset box: disclosures, rules, inline errors. */
.dlg-box {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--vc-7, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--vc-15, rgba(255, 255, 255, 0.08));
  font-size: 13px;
  line-height: 1.5;
  color: var(--vtext, #c7cad1);
}
/* Error is a STATE, not themed content: fixed red on every vessel theme. */
/* The error state is inked in the ACCENT, the house error ink on a themed
   surface (editor.css .post-form-error): a fixed red fights some palettes
   (Aaron, 2026-10-02). Red stays only as the unthemed fallback. Danger
   confirms (confirm-dialog.css .is-danger) keep their fixed red: that is a
   destructive action, not a field to fix. */
.dlg-box--error {
  background: var(--vc-10, rgba(248, 113, 113, 0.10));
  border-color: var(--vc-40, rgba(248, 113, 113, 0.35));
  color: var(--vc, #fda4af);
}

.dlg-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--vc-53, #8d93a0);
  margin: 0 0 8px;
}
.dlg-optional { font-weight: 400; opacity: 0.75; }

.dlg-textarea {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  min-height: 64px;
  background: var(--vc-7, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--vc-15, rgba(255, 255, 255, 0.10));
  border-radius: 10px;
  color: var(--vtext, var(--color-gray-200));
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  padding: 10px 12px;
}
/* Single-line field: the textarea's look without the resize handle. The
   composer's source and schedule dialogs and the fieldDialog.js prompts
   share it. */
.dlg-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  background: var(--vc-7, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--vc-15, rgba(255, 255, 255, 0.10));
  border-radius: 10px;
  color: var(--vtext, var(--color-gray-200));
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  padding: 10px 12px;
}
.dlg-textarea:focus,
.dlg-input:focus {
  outline: none;
  border-color: var(--vc, var(--color-teal-300));
}
/* Invalid: the accent frame, one ring heavier than the focus ring so the
   state still reads while the field is focused (the same accent). After
   :focus so it holds while the field is being fixed. */
.dlg-textarea[aria-invalid="true"],
.dlg-input[aria-invalid="true"] {
  border-color: var(--vc, rgba(248, 113, 113, 0.5));
  box-shadow: 0 0 0 1px var(--vc, rgba(248, 113, 113, 0.5));
}
/* Character count under a field (N/max), announced politely. */
.dlg-counter {
  margin-top: 6px;
  text-align: right;
  font-size: 12px;
  color: var(--vc-53, var(--color-gray-500));
}
/* iOS Safari zooms the page into any focused field under 16px. Touch
   devices get 16px on the single-line field and the field-dialog textarea:
   the one sanctioned step off the 17/14/13/12 scale, scoped so the report,
   ban and follow textareas keep theirs. */
@media (any-pointer: coarse) {
  .dlg-input,
  .dlg--field .dlg-textarea { font-size: 16px; }
}

/* fieldDialog.js prompts (image caption, link, audio track): the source
   dialog's width. */
.dlg--field { --dlg-w: 440px; }

/* The vessel rules dialog (vesselRules.js, opened from the composers' rules
   chip): the same width, a numbered list in the body. */
.dlg--rules { --dlg-w: 440px; }
.dlg-rules-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
  font-size: 14px;
  line-height: 1.5;
  list-style: decimal;
}

.dlg-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--v-card-border, rgba(255, 255, 255, 0.06));
  flex-shrink: 0;
}

.dlg-btn {
  background: transparent;
  color: var(--vtext, var(--color-gray-200));
  border: 1px solid var(--vc-25, rgba(255, 255, 255, 0.16));
  border-radius: 9999px;
  padding: 9px 18px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.dlg-btn:hover { border-color: var(--vc, rgba(255, 255, 255, 0.35)); }
.dlg-btn--primary {
  background: var(--vc, var(--color-teal-300));
  color: var(--vc-text, #0a0b0e);
  border-color: var(--vc, var(--color-teal-300));
  font-weight: 700;
}
.dlg-btn--primary:hover { filter: brightness(1.08); border-color: var(--vc, var(--color-teal-300)); }
.dlg-btn--primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: none;
}

/* Page behind a dialog doesn't scroll. Own class (composes with the comment
   drawer's cm-drawer-open when a dialog opens above a still-open drawer). */
body.dlg-open {
  overflow: hidden;
  touch-action: none;
}

/* ---- Mobile: draggable bottom sheet -------------------------------------- */
/* JS gates the drag controller on the same query: matchMedia('(max-width: 639px)'). */
@media (max-width: 639px) {
  .dlg { padding: 0; }
  .dlg-panel {
    /* fixed, not absolute: same box inside the fixed inset:0 root, but iOS
       26+ Safari tints its bottom toolbar from the position: fixed / sticky
       element at the bottom edge and the root paints nothing, so the panel
       must be that element (comments.css .cm-drawer-panel has the story). */
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    max-width: none;
    max-height: 92vh;
    max-height: 92dvh;
    border-radius: 18px 18px 0 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    /* Sheet entrance: slide from the bottom edge; the drag controller
       tracks the finger via inline transform during a drag. */
    opacity: 1;
    transform: translateY(100%);
    transition: transform 0.22s ease, padding-bottom 0.2s ease;
    /* iOS keyboard lift: dialog.js sets --dlg-kb to the keyboard's overlap
       (the shared keyboardInset tracker), so the padding rides the fields
       and the footer above the keyboard while the panel's own surface fills
       the band behind Safari's bars. 0 when no keyboard is up. */
    padding-bottom: var(--dlg-kb, 0px);
  }
  /* `none`, not translateY(0): see the header note (fixed descendants). */
  .dlg.is-open .dlg-panel { transform: none; }
  .dlg-grip { display: flex; }
  .dlg-head { padding-top: 6px; }
  .dlg-foot { padding-bottom: 24px; } /* thumb room above the home indicator */

  /* Fullscreen variant (dlg--full): the sheet covers the viewport instead
     of docking partially, for dialogs whose content wants the whole
     screen (the embed dialog's live preview + snippet). Recipe = the
     comment drawer's keyboard-open state (comments.css .cm-kb-open): full
     dvh minus the top safe area, no radius, no shadow, and an OPAQUE
     backdrop so iOS Safari's fixed-layer shifts expose panel-colored
     surface, never the page peeking through the seam. The grip pill hides
     for a clean takeover; the header still drags to dismiss (the core
     wires [grip, head]), plus X / backdrop / Esc as always. Desktop is
     untouched; these rules live only inside this media block. */
  .dlg--full .dlg-panel {
    height: calc(100dvh - env(safe-area-inset-top, 0px));
    max-height: none;
    border-radius: 0;
    box-shadow: none;
  }
  .dlg--full .dlg-grip { display: none; }
  .dlg--full .dlg-head { padding-top: 14px; }
  .dlg--full.is-open .dlg-backdrop { background: var(--vb, var(--color-gray-950)); }
}

/* ---- Styleguide demo -------------------------------------------------- */
/* Renders the panel in-flow (no overlay, no backdrop) so the base can be
   showcased on /backstage/styleguide without dialog JS. */
.dlg.dlg--inline {
  position: static;
  padding: 0;
  pointer-events: auto;
  display: block;
}
.dlg--inline .dlg-backdrop { display: none; }
.dlg--inline .dlg-panel {
  position: static; /* the phone sheet rule is position: fixed; this demo stays in flow */
  opacity: 1;
  transform: none;
  max-height: none;
}


/*# sourceMappingURL=dialogCss.eecdabb89b0aa423d1bc.css.map*/