/* vocab.css — the diagnosis / operation tag chip, its suggestions and its popover (vocab.js). UI_STANDARD: taps >= 44 x 44 px and >= 8 px apart;
   colour always with its background (U15); phone (< 600 px) = bottom sheet, desktop = dropdown under the box; never wider than the screen. */
.vc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; min-width: 0; max-width: 100%; }
.vc:not(:has(> :not([hidden]))) { display: none; }
.vc .vc-chip { min-height: 44px; min-width: 44px; max-width: 100%; padding: 6px 12px; border-radius: 22px; border: 1px solid var(--accent, #0f6e8c);
  background: var(--accent-2, #e3f1f6); color: var(--accent-d, #0b5870); font: inherit; font-size: 14px; text-align: left; cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vc .vc-chip.vc-unl { border-style: dashed; border-color: var(--muted, #5d6b7a); background: var(--card, #fff); color: var(--muted, #5d6b7a); }
.vc .vc-chip:hover, .vc .vc-chip:focus-visible { background: var(--accent, #0f6e8c); color: #fff; }
.vc .vc-sugg { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; min-width: 0; }
.vc .vc-sugg[hidden], .vc .vc-chip[hidden] { display: none; }
.vc .vc-sg { min-height: 44px; min-width: 44px; max-width: 100%; padding: 6px 12px; border-radius: 22px; border: 1px solid var(--line, #d3dce5);
  background: var(--card, #fff); color: var(--ink, #1b2733); font: inherit; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.vc .vc-sg:hover, .vc .vc-sg:focus-visible { background: var(--accent-2, #e3f1f6); color: var(--ink, #1b2733); }

.vc-pop { position: absolute; z-index: 1000; width: 360px; max-width: calc(100vw - 16px); max-height: 70vh; overflow: auto; box-sizing: border-box;
  padding: 12px; background: var(--card, #fff); color: var(--ink, #1b2733); border: 1px solid var(--line, #d3dce5); border-radius: 12px; box-shadow: 0 8px 28px #0f2a3a33; }
.vc-pop.vc-sheet { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; max-width: none; max-height: 80vh; border-radius: 16px 16px 0 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
.vc-scrim { position: fixed; inset: 0; z-index: 999; background: #0f2a3a66; }
.vc-pop .vc-said { margin: 0 0 8px; font-size: 14px; color: var(--muted, #5d6b7a); background: transparent; }
.vc-pop .vc-q { box-sizing: border-box; width: 100%; min-height: 44px; font-size: 16px; padding: 8px 10px; border: 1px solid var(--field, #c9d3dd); border-radius: 8px;
  background: var(--card, #fff); color: var(--ink, #1b2733); }
.vc-pop .vc-res { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.vc-pop .vc-r { display: flex; flex-direction: column; align-items: flex-start; min-height: 44px; width: 100%; padding: 6px 10px; text-align: left; font: inherit;
  border: 1px solid var(--line, #d3dce5); border-radius: 8px; background: var(--card, #fff); color: var(--ink, #1b2733); cursor: pointer; }
.vc-pop .vc-r small { color: var(--muted, #5d6b7a); font-size: 13px; }
.vc-pop .vc-r:hover, .vc-pop .vc-r:focus-visible { background: var(--accent-2, #e3f1f6); color: var(--ink, #1b2733); }
.vc-pop .vc-r.on { border-color: var(--accent, #0f6e8c); background: var(--accent-2, #e3f1f6); color: var(--ink, #1b2733); }
.vc-pop .vc-none { margin: 4px 0; color: var(--muted, #5d6b7a); background: transparent; }
.vc-pop .vc-ap, .vc-pop .vc-ad { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line2, #e6ecf1); }
.vc-pop .vc-tg { min-height: 44px; min-width: 44px; padding: 6px 12px; border-radius: 22px; border: 1px solid var(--line, #d3dce5); font: inherit; font-size: 14px;
  background: var(--card, #fff); color: var(--ink, #1b2733); cursor: pointer; }
.vc-pop .vc-tg[aria-pressed="true"] { background: var(--accent, #0f6e8c); color: #fff; border-color: var(--accent, #0f6e8c); }
.vc-pop .vc-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.vc-pop .vc-foot button { min-height: 44px; min-width: 44px; padding: 6px 14px; border-radius: 8px; font: inherit; cursor: pointer; }
.vc-pop .vc-rm { border: 1px solid var(--err, #b3261e); background: var(--card, #fff); color: var(--err, #b3261e); }
.vc-pop .vc-done { border: 1px solid var(--accent, #0f6e8c); background: var(--accent, #0f6e8c); color: #fff; }
/* the ward board / OT note grids: the chip row spans its own cell only, so a grid's columns are not pushed */
.wc-grid .vc, .otf-grid .vc { grid-column: auto; width: 100%; }
/* dark mode: the app keeps its light palette (app.css has no dark theme), and every rule here names both colours, so nothing repaints */
@media print { .vc, .vc-pop, .vc-scrim { display: none !important; } }
/* ?p=dx Operations editor (29-Nov-2026, UX-21): each label sits ABOVE its box, never beside it */
.dxgrid .vc-f { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; min-width: 0; } .dxgrid .vc-f > .vc-fl { font-size: 13px; } .dxgrid .vc-f > input, .dxgrid .vc-f > textarea { width: 100%; box-sizing: border-box; }
