/*
====================================================================
 WELBRIGHT ADMIN UI — CONSOLIDATED & COMMENTED STYLES (DROP-IN)
 Author: ChatGPT (refactor)
 Purpose:
   - Reorganize styles into clear, logical units.
   - Add thorough comments to make future updates straightforward.
   - Remove duplicate / conflicting rules and normalize naming.
   - Fix minor inconsistencies (e.g., missing px units, repeated blocks).
 Integration: /portal/assets/css/admin.css (WordPress Kadence tab embed)
--------------------------------------------------------------------
 FILE MAP (use this TOC to jump quickly)
   0) Housekeeping & Conventions
   1) Tokens / Globals (CSS custom properties)
   2) Structure & Layout (container, grids, responsive)
   3) Base Components
      3.1) Card Shell
      3.2) Generic Form Controls (fields, inputs, selects, textarea)
      3.3) Buttons
      3.4) Dividers & Helpers
   4) Tabs (Card A)
   5) Card A — Client
   6) Card B — Case
      6.1) Header & Link-Pill
      6.2) Form Rows & Checkbox Layouts
      6.3) Flash Slot (non-jump layout)   ← includes FIX for Card B flash
   7) Card C — Documents
      7.1) Legacy Table (kept for backward compat)
      7.2) Modern Grid Rows (preferred UI)
      7.3) Pills, Status & Buttons
      7.3.5) Flash Slot (non-jump layout) ← includes FIX for regeneration pill
      7.4) Buttons & Selects in Grid
      7.5) Empty States & Category Header
   8) Utilities (gating, global flash defaults)
   9) Responsive Tweaks
--------------------------------------------------------------------
 CHANGELOG (key refactor notes)
   • Deduplicated multiple definitions of .wb-doclist-grid, .wb-docitem-row,
     .pill, .status-pill, etc. Kept one authoritative block per selector.
   • Normalized units (e.g., margin: 24px 0 -5px 0; not "24 0 -5 0").
   • Ensured Card B header pill stays single-line and stable on small screens.
   • Added scoped overrides so Card B/C flash pills live under the titles,
     with a reserved row (no layout jump).
====================================================================
*/


/*==================================================================
  0) HOUSEKEEPING & CONVENTIONS
==================================================================*/
/* Prefix “wb-” = Welbright component namespace.
   Maintain consistent spacing and token usage across components. */


/*==================================================================
  1) TOKENS / GLOBALS
==================================================================*/
:root{
  --wb-maxw: 1280px;
  --wb-wrapw: 80%;
  --wb-gap: 20px;

  --wb-card-bg: #fff;
  --wb-card-br: 12px;
  --wb-card-bc: #e5e7eb;
  --wb-card-shadow: 0 1px 2px rgba(0,0,0,.05);

  --wb-text: #111827;
  --wb-text-2: #374151;
  --wb-muted: #6b7280;

  --wb-input-h: 40px;
  --wb-input-bc: #d1d5db;
  --wb-input-bg: #fff;
  --wb-input-bg-disabled: #f3f4f6;

  --wb-brand: #2563eb;
  --wb-brand-700: #1d4ed8;

  --wb-tab-pill-gap: 6px;
  --wb-tab-row-gap: 10px;
  --wb-pretab-h: 18px;

  --wb-sep: #11182733;

  /* Card C content inset inside rounded row */
  --wb-row-hpad: 3%;
  --wb-ctrl-h: 36px;    /* shared control height (dropdown + icons) */
  --wb-icon-btn: 36px;  /* icon button square size */

  /* Flash reserved-row height for Cards B & C */
  --wb-pilleh: 22px;    /* reserved pill row height (easy to tweak) */
  --wb-pillmb: 10px;    /* margin-bottom under the pill row */
}


/*==================================================================
  2) STRUCTURE & LAYOUT
==================================================================*/
.wb-container{
  width: var(--wb-wrapw);
  max-width: var(--wb-maxw);
  margin: 0 auto;
  padding: 20px 0;
}
.wb-grid-2{
  display: grid;
  grid-template-columns: 35% 65%;
  gap: var(--wb-gap);
  align-items: start;
}
.wb-grid-2 > *{ min-width: 0; }

.wb-stack{
  display: flex;
  flex-direction: column;
  gap: 20px;
}


/*==================================================================
  3) BASE COMPONENTS
==================================================================*/

/* 3.1) Card Shell -------------------------------------------------*/
.wb-card{
  background: var(--wb-card-bg);
  border: 1px solid var(--wb-card-bc);
  border-radius: var(--wb-card-br);
  padding: 20px 20px 0 20px;
  box-shadow: var(--wb-card-shadow);
  width: 100%;
  box-sizing: border-box;
}


.wb-section-title{
  font:700 20px/1.4 system-ui;
  color: var(--wb-text);
  margin: 0 0 12px;
}

/* 3.2) Generic Form Controls -------------------------------------*/
.wb-field{
  display: flex;
  flex-direction: column;
  margin-bottom: 14px;
}
.wb-field label{
  font: 600 13px/1.3 system-ui;
  color: var(--wb-text-2);
  margin-bottom: 6px;
}
.wb-card .wb-field input,
.wb-card .wb-field select,
.wb-card .wb-field textarea{
  display: block;
  width: 100%;
  height: var(--wb-input-h);
  padding: 10px 12px;
  border: 1px solid var(--wb-input-bc);
  border-radius: 10px;
  background: var(--wb-input-bg);
  color: var(--wb-text);
  font: 14px/1.4 system-ui;
  box-sizing: border-box;
}
.wb-select{
  width: 100%;
  height: var(--wb-input-h);
  padding: 10px 12px;
  border: 1px solid var(--wb-input-bc);
  border-radius: 10px;
  background: var(--wb-input-bg);
  color: var(--wb-text);
  font: 14px/1.4 system-ui;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}
.wb-card .wb-field textarea{
  min-height: 96px;
  height: auto;
  line-height: 1.45;
}
.wb-card .wb-field input[disabled],
.wb-card .wb-field select[disabled],
.wb-card .wb-field textarea[disabled]{
  background: var(--wb-input-bg-disabled);
  color: #9ca3af;
  cursor: not-allowed;
}
.wb-readonly,
input[readonly].wb-input{
  background: var(--wb-input-bg-disabled);
  color: var(--wb-muted);
}

/* 3.3) Buttons ----------------------------------------------------*/
.wb-btn{
  display: block;
  width: 100%;
  padding: 10px 16px;
  border-radius: 10px;
  border: none;
  background: var(--wb-brand);
  color: #fff;
  font: 600 14px/1.4 system-ui;
  cursor: pointer;
}
.wb-btn:hover{ background: var(--wb-brand-700); }

/* 3.4) Dividers & Helpers ----------------------------------------*/
.wb-sep{
  height: 1px;
  border: 0;
  background: var(--wb-sep);
  margin: 16px 0;
}
.wb-grid-3{
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 12px;
}


/*==================================================================
  4) TABS (Card A)
==================================================================*/
.wb-tab-bar{
  display: flex;
  gap: var(--wb-tab-pill-gap);
  margin: 0 0 var(--wb-tab-row-gap);
}
.wb-tab{
  padding: 6px 12px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #f3f4f6;
  font: 600 14px/1.3 system-ui;
  color: #374151;
}
.wb-tab.is-active{
  background: #eaf1ff;
  border-color: var(--wb-brand);
  color: #1d4ed8;
}

/* Inline checkbox row under pills */
.wb-inline-check{
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: var(--wb-pretab-h);
  margin: 0 0 4px;
}
.wb-inline-check input[type="checkbox"]{
  width: 14px;
  height: 14px;
  accent-color: var(--wb-brand);
  vertical-align: middle;
}
.wb-inline-check label{
  margin: 0;
  font: 600 13px/1 system-ui;
  color: var(--wb-text);
}


/*==================================================================
  5) CARD A — CLIENT
==================================================================*/
.wb-card .wb-client-select{
  width: 100%;
  margin-bottom: 14px;
}



/* Same-as checkbox control styling */
.sameas {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #334155;
  background: transparent;
  padding: 0;
  border: 0;
  cursor: pointer;
}

.sameas[hidden] { display: none !important; }

.sameas input[type="checkbox"] {
  width: 16px;
  height: 16px;
  vertical-align: middle;
}

/* Keep “Same as …” text baseline aligned with tab buttons */
.wb-tab-bar .sameas {
  display: inline-flex;
  align-items: center;     /* vertical centering with tabs */
  line-height: 1.2;        /* matches your wb-tab line-height visually */
  font-size: 14px;
  margin-top: 1px;         /* micro-adjust for optical centering */
}

/* --- Address Pretab (row above pills) --- */
.wb-pretab-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 28px;        /* keeps layout stable when hidden */
  margin-bottom: 4px;
}

.wb-pretab {
  display: none;
  align-items: center;
}
.wb-pretab.is-active {
  display: flex;
}

.wb-inline-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #334155;
}



/*==================================================================
  6) CARD B — CASE (DROP-IN, SINGLE SOURCE OF TRUTH)
  Scope: #cm-card-b only
  Goals:
    • Title left, “More/Hide details” pill right (baseline aligned)
    • Stable flash row (constant height; no jump)
    • 3-col rows preserved
    • Row 2: Process spans 2 frames; Spouse+Child share 3rd (inline)
    • Compact checkboxes (incl. “Currently in U.S.”)
==================================================================*/

/* 6.1 — Header (title + pill) ----------------------------------- */
#cm-card-b .wb-card-head{
  display:flex; justify-content:space-between; align-items:baseline;
  gap:12px; margin:-4 0 4px;
}
#cm-card-b .wb-card-head .wb-btn-link{
  background:#f3f4f6; border:1px solid #e5e7eb; border-radius:999px;
  padding:4px 12px; font:500 12px/1.2 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:#111827; white-space:nowrap; margin-top:0 !important;
}
#cm-card-b .wb-card-head .wb-btn-link:hover{ background:#e5e7eb; }

/* 6.2 — Rows (3 fixed frames) ----------------------------------- */
#cm-card-b .wb-case-row{
  display:grid; grid-template-columns:repeat(3,1fr); gap:12px;
}

/* 6.4 — Row 2 specifics ----------------------------------------- */
/* Process spans 2 frames (columns 1–2) — also matches inline style */
#cm-card-b .wb-case-row .wb-field[style*="grid-column:span 2"]{ grid-column:1 / span 2; }

/* Spouse + Child share the 3rd frame; keep them on one line */
#cm-card-b .wb-field.wb-spousechild-inline{
  grid-column:3 / span 1;
  display:flex !important; align-items:center; justify-content:space-between; gap:12px;
}
#cm-card-b .wb-spousechild-inline label{
  display:inline-flex !important; align-items:center; gap:6px; margin:0; white-space:nowrap;
}

/* 6.5 — Compact checkboxes (Card B only) ------------------------ */
#cm-card-b input[type="checkbox"]{
  -webkit-appearance:checkbox !important; appearance:checkbox !important;
  width:16px !important; height:16px !important; margin:0 6px 0 0 !important;
  transform:none !important; vertical-align:middle !important; box-sizing:border-box !important;
}
/* “Currently in U.S.” label tidy */
#cm-card-b label[for="in_us"]{ display:inline-flex; align-items:center; gap:6px; margin-bottom:0; }

/* 6.6 — Optional: a little body when collapsed ------------------ */
#cm-card-b .wb-card{ min-height:125px; }




/* --- View + Version: tighter pair and smaller text --- */

/* Reduce overall spacing between action controls */
.wb-docactions { gap: 18px !important; }

/* Pull the version dropdown closer to the View button */
.wb-docactions .btn-view + .wb-version-select {
  margin-left: -8px !important;   /* counters the flex gap */
}




/*==================================================================
  7) CARD C — DOCUMENTS (FINAL v2)
  Updates in this version:
  • Row content width = 90% (5% margins L/R), centered
  • Grid inside row = 60% | 20% | 20%
  • Col 2 & Col 3 alignment tightened
  • Smaller, thinner text buttons
  • Retains earlier fixes: centered headers, top-align, spacing, pills
==================================================================*/

/* 7.0) Font consistency (match Cards A/B) */
.wb-doclist-grid,
.wb-docrow,
.wb-docrow *{
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* 7.1) Legacy Table (kept for backward compatibility) */
.wb-doclist-summary{
  font: 600 14px/1.4 system-ui;
  color: #111827;
  margin: 0 0 8px;
}
.wb-doclist-table{
  width: 100%;
  border-collapse: collapse;
  font: 14px/1.4 system-ui;
}
.wb-doclist-table th,
.wb-doclist-table td{
  border: 1px solid #e5e7eb;
  padding: 8px 10px;
  vertical-align: top;
}
.wb-doclist-table th{
  background: #f9fafb;
  color: #374151;
  text-align: left;
  font-weight: 600;
}



/* 7.2) Category header — accent line for visual hierarchy */
.wb-doccat{
  border-left: 8px solid #3b82f6; /* your accent color */
  padding-left: 12px;
  margin-top: 30px;
  background: #f9fafb;
  border-radius: 4px;
}

.wb-doccat__label{
  font-size: 15px;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 900;
  color: #1e3a8a; /* brand blue */
  text-transform: uppercase;
  letter-spacing: .4px;
  line-height: 35px; /* reset any inherited spacing */
  display: flex;
  align-items: center;
}

/* Base spacing for all section headers */
#card-client .wb-doccat {
  margin-top: 50px;      /* generous consistent spacing */
  margin-bottom: 12px;
}

/* Remove that extra top margin for the first header only */
#card-client form.wb-form .wb-doccat:first-of-type {
  margin-top: 20px;      /* tighten just Profile */
}

/* Status select (unchanged) */
.status-select{
  height:24px; padding:.30rem .55rem;
  border:1px solid #cbd5e1; border-radius:8px;
  background:#f8fafc; color:#334155; font-size:13px;
}

/* A11y helper */
.visually-hidden{
  position:absolute!important; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0 0 1px 1px); white-space:nowrap; border:0;
}


/*==================================================================
  7.3) Preferred Grid Rows — structure + toggle + actions (FINAL)
==================================================================*/

/* --- Container --- */
.wb-doclist-grid{
  display:flex;
  flex-direction:column;
  gap:22px; /* comfortable vertical spacing between docitems */
}

/* --- One document row --- */
.wb-docrow{
  display:grid;
  padding:16px var(--wb-row-hpad) 18px;
  column-gap:16px;
  row-gap:4px;
  grid-template-columns:1fr auto;
  grid-template-areas:
    "meta toggle"
    "desc desc"
    "actions actions";
  align-items:start;
  overflow:hidden;

  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:12px;
  box-shadow:0 1px 2px rgba(0,0,0,.04);
}

/* --- Grid areas --- */
.wb-docmeta   { grid-area:meta;   min-width:0;}
.wb-doctoggle { grid-area:toggle; justify-self:end; }
.wb-docdesc   { grid-area:desc;   min-width:0; }
.wb-docactions{ grid-area:actions; display:inline-flex; align-items:center; gap:14px; margin-top:8px; }

/* --- Title + description --- */
.doc-title {
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap; /* keeps it responsive */
}
.doc-title__text{ font-weight:600; color:#111827; }

/* --- Description typography normalization --- */
/* Document description text (lighter, smaller, and closer to title) */
.wb-docdesc,
.doc-desc {
  margin-top: 2px;          /* shifts text upward */
  font-size: 12.5px;        /* smaller font */
  font-weight: 300;         /* thinner text */
  color: #64748b;           /* soft grey */
  line-height: 1.4;         /* tighter line spacing */
}

/* Paragraph & list spacing (compact) */
.wb-docdesc p,
.doc-desc p {
  margin: 2px 0 6px;
}

.wb-docdesc ul,
.doc-desc ul,
.wb-docdesc ol,
.doc-desc ol {
  margin: 4px 0 4px 18px;
  padding: 0;
}

.wb-docdesc li,
.doc-desc li {
  margin: 2px 0;
}

/* Optional: emphasize headings if any appear inside */
.wb-docdesc h1,
.wb-docdesc h2,
.wb-docdesc h3,
.doc-desc h1,
.doc-desc h2,
.doc-desc h3 {
  font-size: 1em;
  font-weight: 600;
  margin: 0 0 4px;
}


/* --- Row 1: center everything vertically --- */
.wb-docmeta{
  display:flex;
  align-items:center;   /* was baseline */
  gap:12px;
}

/* Unify control height to 22px on Row 1 only */
.wb-docmeta .wb-doctoggle,
.wb-docmeta .pill,
.wb-docmeta .pill--status{
  height:22px;
  line-height:22px;     /* keeps text centered inside */
  display:inline-flex;  /* ensure vertical centering across browsers */
  align-items:center;
}

/* Details button (you already set height:22px; keep it consistent) */
.wb-doctoggle{
  font-weight:700;
  height:22px;
  padding:0 .65rem;
  border-radius: 999px;
  border: none;
  margin-left:4px;
  margin-top:0;         /* remove the -2px nudge; centering now handles it */
  transition: background 0.15s ease;
  background:#f3f4f6;
}

.wb-doctoggle:hover {background: #e5e7eb;}

/* Pills on Row 1: remove the 1px top/bottom padding so they’re truly 22px tall */
.wb-docmeta .pill,
.wb-docmeta .pill--status{
  padding:0 10px;       /* was 1px 10px; zero vertical padding = exact 22px total */
  white-space:nowrap;
}

/* Keep status pill at far right */
.pill--status{ margin-left:auto; }

/* Keep header pill baseline-aligned (same as Card B) */
#cm-card-c .wb-card-head{ align-items:baseline !important; }


/* Pills & Status (consistent with other cards) --*/
.pill,
.pill--status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  padding: 1px 10px;
  font-size: 12px;
  font-weight: 600;        /* make both bold */
  border-radius: 999px;    /* full pill shape */
  line-height: 1;          /* vertical centering */
  background: #e5e7eb;
  color: #334155;
}

/* Requirement levels */
.pill--required{ background: #fee2e2; color: #991b1b; }
.pill--suggested{ background: #e0e7ff; color: #3730a3; }

/* Document status colors */
.pill--not-submitted{ background: #f1f5f9; color: #475569; }
.pill--uploaded     { background: #dbeafe; color: #1e3a8a; }
.pill--returned     { background: #fee2e2; color: #991b1b; }
.pill--accepted     { background: #dcfce7; color: #166534; }

/* Buttons that are icon-only or icon+label */
.wb-docactions .btn--icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height:0;          /* prevents text line box from clipping */
  overflow:visible;       /* never clip child SVGs */
}

/* --- SVG inside icon buttons (Upload / View) --- */
.wb-docactions .btn--icon svg{
  width:22px; height:22px;
  display:block;
  fill:none;              /* important: outline icons shouldn’t fill */
  stroke:currentColor;
  stroke-width:1.75;
  stroke-linecap:round;   /* softer corners; less chance to look clipped */
  stroke-linejoin:round;
  vector-effect:non-scaling-stroke;
  overflow:visible;       /* allow stroke to extend past viewBox */
  padding:1px;            /* tiny breathing room */
  box-sizing:content-box;
}

.wb-docactions .btn--icon:hover svg {
  stroke-width: 2;
  opacity: 1;
}

.wb-docactions .btn--icon:disabled {
  color: #94a3b8;
  cursor: not-allowed;
}

.wb-docactions .btn--icon:disabled svg {
  fill: currentColor !important;
  stroke: currentColor !important;
  opacity: .9 !important;
}



/* ==============================================================
   7.4) DOCUMENT ACTIONS — ICON-ONLY (no JS required)
   - Upload uses <label for="file-input"> so chooser always opens
   - View is a plain <a> anchor
   - Icons show as authored (no forced fills)
   ============================================================== */

/* Tighter overall button spacing */
.wb-docactions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Pair View + Version dropdown */
.btn-view + .wb-version-select {
  margin-left: -8px;   /* pulls dropdown closer to button */
}


/* Upload, Delete (label) and View (anchor) behave the same visually */
.wb-docactions .btn-upload,
.wb-docactions .btn-delete,
.wb-docactions .btn-view{
  background:none;
  border:0;
  padding:0;
  margin:0;
  width:auto;
  height:auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;                 /* space between icon and text */
  cursor:pointer;
  line-height:1;           /* allow text line box */
  font-size:12.5px;        /* show label text */
  font-weight:600;         /* bold like your pills */
  border-radius:6px;
  text-decoration:none;
  color:#334155;           /* neutral label color */
}

.wb-docactions .btn-label{
  display:inline-block;
  line-height:1;
}

/* Hidden file input (screen-reader only) */
.wb-file-input,
.sr-only{
  position:absolute !important;
  width:1px; height:1px;
  padding:0; margin:-1px; overflow:hidden;
  clip:rect(0,0,0,0); white-space:nowrap; border:0;
}



/* Disabled (upload) — just cursor feedback */
.wb-docactions .btn-upload[aria-disabled="true"]{
  cursor:not-allowed;
  opacity: .6;
  pointer-events: none;
}

/* ICONS: show clean, no blobs */
.wb-docactions .btn-upload svg,
.wb-docactions .btn-delete svg,
.wb-docactions .btn-view  svg{
  width:22px;
  height:22px;
  display:block;
  fill:none;            /* no gray blobs */
  stroke:#475569;       /* subtle neutral outline */
  stroke-width:1.75;    /* consistent line weight */
  vector-effect:non-scaling-stroke;
}

/* Optional hover emphasis */
.wb-docactions .btn-upload:hover svg,
.wb-docactions .btn-view:hover  svg,
.wb-docactions .btn-delete:hover  svg{
  stroke:#0f172a;
}

/* EXTENSION — ICON + TEXT LABEL SUPPORT
   Upload / View / Delete — unified states (active/disabled), tighter spacing. */

/* Base button (icon + text) */
.wb-docactions .btn-inline{
  display:inline-flex;
  align-items:center;
  gap:4px;                 /* tighter icon–text gap */
  font-size:13px;
  font-weight:600;
  line-height:1.2;
  color:#475569;
  text-decoration:none;
  background:none;
  border:none;
  cursor:pointer;
}

/* Make SVGs inherit the button color (overrides inline stroke) */
.wb-docactions .btn-inline svg{
  width:18px;
  height:18px;
  display:block;
  fill:none;
  stroke:currentColor !important;  /* force to follow text color */
  stroke-width:1.75;
  vector-effect:non-scaling-stroke;
}

/* Label */
.wb-docactions .btn-inline .btn-label{
  font:600 12.5px/1.2 system-ui;
  color:inherit;
}

/* Unified ACTIVE state (all three buttons — dark gray) */
.wb-docactions .btn-inline:not(.is-disabled):not([disabled]){
  color:#334155; /* slate-700 — dark gray */
}
.wb-docactions .btn-inline:not(.is-disabled):not([disabled]):hover{
  color:#0f172a; /* slate-900 — darker on hover */
}

/* Unified DISABLED state (View + Delete when no file) */
.btn-delete[disabled], .btn-delete.is-disabled,
.btn-view[disabled],   .btn-view.is-disabled{
  opacity:.45;
  cursor:not-allowed;
  color:#94a3b8;            /* same muted tone */
}
/* keep tooltip for disabled <a> View */
.btn-view.is-disabled{ pointer-events:auto !important; }

/* Optional: subtle hover for enabled View/Delete */
.btn-view:hover:not([disabled]):not(.is-disabled),
.btn-delete:hover:not([disabled]):not(.is-disabled){
  color:#0f3ec6;
}

/* 7.5) Empty state (unchanged aside from tidy) */
.wb-doclist-empty{
  width:90%;
  margin:0 0 12px 0;
  padding:0;
  border-radius:10px;
  color:#94a3b8;
  font-style:italic;
  text-align:left;
}

/* Adjust overall spacing between action controls */
.wb-docactions{ display:flex; align-items:center; gap:20px; }

/* Pull the version dropdown closer to the View button */
.wb-docactions .btn-view + .wb-version-select {
  margin-left: -8px !important;   /* counters the flex gap */
}

/* Base (looks like plain bold text; no arrow, no border, no background) */
.wb-version-select{
  -webkit-appearance:none; -moz-appearance:none; appearance:none;
  background: transparent;                      /* no background */
  background-image: none;                       /* kill native arrow bg */
  border: none; box-shadow: none; outline: none;/* no border/blue ring */
  padding: 5px 8px; margin: 0;
  font: 600 11px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: #334155;                               /* dark slate */
  cursor: pointer;                              /* feel clickable */
}

/* Hide the old IE arrow just in case */
.wb-version-select::-ms-expand{ display:none; }

/* Hover & focus (light gray chip, bold text) */
.wb-version-select:hover,
.wb-version-select:focus{
  background: #f1f5f9;                          /* light gray */
  border-radius: 8px;
  color: #0f172a;
  font: 700 11px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;  
  outline: none; box-shadow: none;               /* suppress blue focus */
  padding: 5px 8px; margin: 0;
}

/* Disabled (no file): blank/white, non-interactive, blends in */
.wb-version-select:disabled{
  background: transparent;
  color: transparent;                            /* hides the text */
  pointer-events: none; cursor: default;
}

/* Popup list styling (Chrome/Firefox honor most; Safari is limited) */
.wb-version-select option{
  font: 700 11px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: #334155;
  background: #f1f5f9;                           /* light gray menu bg */
}


/* STATUS DROPDOWN (aligned right) */
.wb-docactions .status-select {
  margin-left: auto;
  text-align: center;        /* centers text horizontally */
  text-align-last: center;   /* centers the selected option text */
  min-width: 130px;
}

/*==================================================================
  8) UTILITIES
==================================================================*/
.cm-disabled{ opacity: .6; pointer-events: none; }

/* Bottom action area (legacy pattern that uses an absolute flash) */
.wb-actions-bottom{
  margin: 5px 0 0px 0;
  position: relative;
}
.wb-actions-bottom .wb-btn{ margin-bottom: var(--wb-flash-gap); }


/* === Toast / Flash wrapper (right-aligned, macOS-like) =================== */
.wb-toast-wrap{
  position: fixed;
  top: 33vh;                 /* distance from top */
  right: 24px;               /* margin from browser edge */
  display: flex;
  flex-direction: column;
  gap: 10px;                 /* spacing between stacked toasts */
  width: 380px;              /* consistent width */
  max-width: calc(100vw - 48px);
  z-index: 10000;
  pointer-events: none;      /* clicks pass through except inside toast */
}

/* --- Individual toast --- */
.wb-toast{
  pointer-events: auto;      /* clickable close button */
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  column-gap: 10px;

  /* visual */
  padding: 10px 12px;
  border-radius: 12px;
  color: #fff;
  background: rgba(15,23,42,0.50);    /* semi-transparent slate */
  backdrop-filter: blur(4px);
  box-shadow: 0 6px 24px rgba(0,0,0,.18);

  /* motion */
  transform: translateY(12px);
  opacity: 0;
  transition: transform .25s ease, opacity .25s ease;
}

/* enter */
.wb-toast.is-in{ transform: translateY(0); opacity: 1; }

/* icon + message */
.wb-toast__icon { display: grid; place-items: center; }
.wb-toast__icon svg{
  width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2;
}
.wb-toast__msg{
  text-align: left;          /* left-aligned text */
  font: 600 13px/1.35 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

/* close button */
.wb-toast__close{
  background: none; border: 0; color: #fff; opacity: .9;
  cursor: pointer; font-size: 16px; line-height: 1; padding: 2px 4px;
}
.wb-toast__close:hover{ opacity: 1; }

/* tone variants (subtle tint over base background) */
.wb-toast--success{ background: rgba(16,185,129,.55); } /* green */
.wb-toast--error  { background: rgba(239,68,68,.58); }  /* red   */
.wb-toast--info   { background: rgba(59,130,246,.55); } /* blue  */

/* optional exit keyframe if you use toast.style.animation = 'wb-toast-out ...' */
@keyframes wb-toast-out {
  to { opacity: 0; transform: translateY(-6px); }
}



/* ==============================================================
   Modern toast notifications (macOS-style)
   ============================================================== */

/* Toast container (stacks notifications) */
.wb-flash-wrap {
  position: fixed;
  top: 25vh;                /* about one-quarter from top */
  right: 32px;              /* distance from right edge */
  display: flex;
  flex-direction: column;
  align-items: flex-end;    /* stack to right edge */
  gap: 14px;                /* space between toasts */
  z-index: 2000;
  pointer-events: none;     /* allow clicks through empty space */
}

/* Toast card */
.wb-flash {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  min-width: 360px;
  max-width: 380px;
  background: rgba(30, 41, 59, 0.85);   /* translucent dark background */
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
  font: 500 14px/1.4 system-ui, sans-serif;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  pointer-events: auto; /* clickable close button */
}

/* Enter / leave animation */
.wb-flash.is-in {
  opacity: 1;
  transform: translateY(0);
}

/* Close button */
.wb-flash__close {
  background: none;
  border: 0;
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  padding: 0 0 0 8px;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.wb-flash__close:hover {
  opacity: 1;
}

/* Color variants */
.wb-flash--success {
  background: rgba(16, 185, 129, 0.85); /* green */
}
.wb-flash--error {
  background: rgba(239, 68, 68, 0.85);  /* red */
}
.wb-flash--info {
  background: rgba(59, 130, 246, 0.85); /* blue */
}

/*