/* VALBLOX modal (layout-v2 preview): the frame every pop-out shares (assets/js/vb-modal.js). Loads after styles.css.
   A heavy-tier plate (the forged rim of the site's key panels) on a dimmed page; a calm head (icon tile, title, a
   short line under it, the close button) over one rule; the body scrolls on its own when it is taller than the screen.
   Phones (600px and under): the whole screen, no chamfer, the head stays put while the body scrolls.
   pages.css (fields, inputs, notes, switches, panels, tables) comes scoped to the dialogs as vb-pages.css, linked just
   before this file, so the blocks inside look exactly as on their own pages; buttons are the site's own. */

.vbm { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; }
.vbm[hidden] { display: none; }
.vbm .vbm__body [hidden] { display: none !important; }   /* buttons, switches and flex rows set display, which beats [hidden] */
html.vbm-lock, html.vbm-lock body { overflow: hidden; }
.vbm__scrim { position: absolute; inset: 0; background: rgba(7, 10, 15, .7); }
.vbm__dlg {
  position: relative; isolation: isolate; width: min(var(--vbm-w, 880px), 100%); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px);
  display: flex; flex-direction: column; outline: none; color: var(--muted);
  filter: drop-shadow(0 24px 48px rgba(4, 7, 12, .6));
}
.vbm__plate { --c: 16px; --n: 4px; --face: linear-gradient(180deg, #232B3A 0%, #1D2430 100%); }
.vbm__head {
  flex: none; display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 14px 16px 14px 22px;
  box-shadow: inset 0 -2px 0 var(--rule), inset 0 -3px 0 rgba(var(--hi), .35);
}
.vbm__ic {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center; color: var(--lilac);
  background: linear-gradient(180deg, #19202B 0%, #1D2531 100%);
  box-shadow: inset 0 2px 0 rgba(var(--lo), .7), inset 0 -1px 0 rgba(var(--hi), .38), inset 0 0 0 1px var(--rim-iron);
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
}
.vbm__ic .ic { width: 22px; height: 22px; }
.vbm__ttl { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.vbm__t { font-size: 21px; line-height: 26px; letter-spacing: 1.2px; color: var(--white); text-transform: uppercase; }
.vbm__sub { font-family: "Skranji", sans-serif; font-size: 13px; line-height: 18px; letter-spacing: .3px; color: var(--muted); }
.vbm__x { width: 40px; height: 40px; flex: none; --c: 9px; }
.vbm__x .ic { width: 16px; height: 16px; }
.vbm__body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 24px 26px 28px; scrollbar-width: thin; scrollbar-color: #3A4559 transparent; container: page / inline-size; }

@media (max-width: 600px) {
  .vbm { padding: 0; place-items: stretch; grid-template: minmax(0, 1fr) / minmax(0, 1fr); }   /* one screen tall: the body scrolls, not the dialog */
  .vbm__dlg { width: 100%; max-height: none; height: 100%; filter: none; }
  .vbm__plate { --c: 0px; }
  .vbm__head { min-height: 64px; padding: calc(10px + env(safe-area-inset-top)) 12px 10px 16px; gap: 12px; }
  .vbm__ic { width: 36px; height: 36px; }
  .vbm__t { font-size: 18px; line-height: 22px; }
  .vbm__body { padding: 18px 16px calc(24px + env(safe-area-inset-bottom)); }
}
