/*
 * app-overrides.css — global HD-token overrides
 * --------------------------------------------------------------------------
 * Loaded on every ZK page via <theme-uri> in WEB-INF/zk.xml (after tokens.css).
 * Neutralizes the app's legacy green button-image PNGs and gradients to flat
 * HD blue app-wide, so screens that haven't been individually restyled still
 * drop the green. All colours come from tokens.css (var(--hd-*)).
 */
.mm-button, .large-mm-button, .large-mm-button-220, .large-mm-button-275,
.large-mm-button-325, .long-mm-button, .myGreen .z-button-cm,
.green, .mm-btn-green{
  background-image:none !important;
  background:var(--hd-primary) !important;
  border:1px solid var(--hd-primary) !important;
  color:var(--hd-on-primary) !important;
}
.mm-button:hover, .large-mm-button:hover, .large-mm-button-220:hover,
.large-mm-button-275:hover, .large-mm-button-325:hover, .long-mm-button:hover,
.myGreen .z-button-cm:hover, .green:hover, .mm-btn-green:hover{
  background-image:none !important;
  background:var(--hd-primary-hover) !important;
  border-color:var(--hd-primary-hover) !important;
  color:var(--hd-on-primary) !important;
}

/* Modal/popup window styling lives in modals.css (HD dialog look). */

/* ---- remove the dark MyDining banner band (header_extend.png + logo) ---- */
.header{ display:none !important; }

/* ---- recolour the green refresh icon -> blue ---- */
img[src*="refresh-icon"]{ filter: hue-rotate(115deg) saturate(1.3); }

/* ---- Patients listing: roomy caption-above-control filter bar ---- */
.patient-filters{
  display:flex; flex-wrap:wrap; align-items:flex-end; gap:16px 24px;
  /* no top padding: the header card's own 24px bottom margin is the gap (matches Reports/Admin) */
  padding:0 4px 22px;
}
.patient-filters .pf-field{ display:flex; flex-direction:column; gap:7px; }
.patient-filters .pf-cap{
  font-size:11px; font-weight:700; letter-spacing:.05em; text-transform:uppercase;
  color:var(--hd-text-muted);
}
.patient-filters .pf-control{ height:40px !important; box-sizing:border-box; }
.patient-filters .pf-control.z-combobox .z-combobox-input{ height:38px !important; box-sizing:border-box; }
.patient-filters .pf-control.z-datebox .z-datebox-input{ height:38px !important; box-sizing:border-box; }
/* search box + its Clear button share one row */
.patient-filters .pf-search-row{ display:flex; gap:10px; align-items:center; }
.patient-filters .pf-clear{ height:40px !important; }
.patient-filters .pf-actions{ display:flex; gap:12px; align-items:flex-end; margin-left:auto; }
.patient-filters .pf-actions .z-button{ height:40px !important; }

/* ---- order screen: patient card -> redesigned (header / info-strip / allergy banner) ---- */
/* card + notes panel sit side by side as two rounded panels */
.pcard-row{ display:flex; align-items:stretch; gap:10px; margin:6px 10px; }
.pcard{
  flex:1 1 auto; min-width:0;
  background:var(--hd-surface);
  border:1px solid var(--hd-border);
  border-radius:12px;
  box-shadow:var(--hd-shadow-sm);
  overflow:hidden;            /* clip the strip / banner to the rounded corners */
}

/* ===== menu-selection + order-summary -> rounded cards (match patient/notes cards) ===== */
/* west column: flex so the menu card fills the height below the patient card
   (the div is plain block by default, so the menu card's flex:1 was a no-op) */
.cc-west-col{ display:flex !important; flex-direction:column; height:100%; min-height:0; }
.cc-menu-card{
  display:flex; flex-direction:column; flex:1 1 auto; min-height:0;
  background:var(--hd-surface); border:1px solid var(--hd-border); border-radius:12px;
  box-shadow:var(--hd-shadow-sm); margin:4px 10px 8px; padding:8px 10px 10px; overflow:hidden;
}
/* the menu-items borderlayout (only a <center>) gets 0 height from ZK vflex inside a native
   flex div — drive its height with CSS flex instead, and let the center flow + scroll. */
/* flex the whole borderlayout->center chain so the food area fills the card and
   scrolls on overflow (percentage-height didn't resolve through ZK's wrappers) */
.cc-menu-card > .z-borderlayout,
.cc-menu-card > .z-borderlayout > div,
.cc-menu-card .z-center{
  display:flex !important; flex-direction:column; flex:1 1 auto !important;
  min-height:0 !important; height:auto !important; position:static !important; width:auto !important;
}
.cc-menu-card .z-center-body{
  flex:1 1 auto !important; min-height:0 !important; height:auto !important;
  position:static !important; overflow-y:auto !important; overflow-x:hidden !important;
}

/* bottom action bar -> rounded card (matches the other cards) */
.z-south{ background:transparent !important; }
.cc-foot-bar{
  background:var(--hd-surface) !important; border:1px solid var(--hd-border) !important;
  border-radius:12px !important; box-shadow:var(--hd-shadow-sm) !important;
  margin:2px 10px 6px !important; padding:8px 12px !important;
}
/* order summary: float the panel as a card on the (now transparent) east region */
.z-east, .z-east-body{ background:transparent !important; }
.cc-os-card, .z-east .cc-os-card{
  background:var(--hd-surface) !important; border:1px solid var(--hd-border) !important;
  border-radius:12px !important; box-shadow:var(--hd-shadow-sm) !important;
  margin:6px 10px !important; height:calc(100% - 12px) !important; box-sizing:border-box; overflow:hidden;
}

/* notes panel blended beside the card */
.pcard-notes{
  flex:0 0 300px; align-self:stretch;
  background:var(--hd-surface); border:1px solid var(--hd-border);
  border-radius:12px; box-shadow:var(--hd-shadow-sm);
  padding:12px 14px; overflow:auto;
}
.pcn-title{
  font-size:11px; font-weight:700; letter-spacing:.06em; text-transform:uppercase;
  color:#8A97A8; margin-bottom:8px;
}
/* strip ALL the global .z-grid framing (grids.css) so the notes read as a flat list */
.pcard-notes .pcn-grid.z-grid{
  border:none !important; border-radius:0 !important; background:transparent !important; overflow:visible !important;
}
.pcard-notes .pcn-grid .z-grid-body{ background:transparent !important; border:none !important; overflow:visible !important; }
.pcard-notes .pcn-grid .z-grid-header, .pcard-notes .pcn-grid .z-columns, .pcard-notes .pcn-grid .z-column{ display:none !important; }
.pcard-notes .pcn-grid .z-row, .pcard-notes .pcn-grid .z-row > .z-cell,
.pcard-notes .pcn-grid .z-row-odd > .z-cell,
.pcard-notes .pcn-grid .z-row:hover > .z-cell,
.pcard-notes .pcn-grid .z-row-selected > .z-cell,
.pcard-notes .pcn-grid .z-row-seld > .z-cell{
  background:transparent !important; background-image:none !important; cursor:default;
}
.pcard-notes .pcn-grid .z-cell{
  border:none !important; border-bottom:none !important;
  padding:4px 0 !important; font-size:13px !important; vertical-align:top !important;
}
.pcard-notes .pcn-grid .z-grid-emptybody-content{ color:#9AA6B5 !important; font-size:12px !important; font-style:italic; padding:4px 0 !important; }
.pcn-line{ display:flex; align-items:flex-start; gap:8px; line-height:1.35; }
.pcn-chip, .pcn-chip.z-label{
  flex:0 0 auto; font-size:9.5px !important; font-weight:700 !important; letter-spacing:.03em;
  border-radius:5px; padding:2px 6px; line-height:1.45 !important; white-space:nowrap; margin-top:1px;
}
.pcn-chip.pcn-spcl{ background:#E6EEFF; color:#2C4A9A; }
.pcn-chip.pcn-pref{ background:#EDE7FB; color:#6A4BB0; }
.pcn-chip.pcn-note{ background:#EEF1F5; color:#64748B; }
.pcn-text, .pcn-text.z-label{ flex:1 1 auto; font-size:13px !important; color:var(--hd-text) !important; word-break:break-word; }
.pcn-print{ flex:0 0 auto; margin-top:2px; font-size:12px !important; color:#64748B !important; }
/* the note's "Print on Ticket" marker: z-icon-print on a <label> doesn't pull ZK's
   icon font (renders as an empty/tofu box), so draw the FA print glyph explicitly
   using the same font stack ZK's working icons resolve to. */
.pcard-notes .pcn-print::before{ content:"\f02f"; font-family:"ZK85Icons", FontAwesome; font-weight:900; }

/* ===== Order Summary header redesign ===== */
.os-head{ background:var(--hd-surface); padding:14px 16px 12px; border-bottom:1px solid var(--hd-line); }
.os-head-bar{ display:flex; align-items:center; gap:8px; }
.os-title, .os-title .z-label{ font-size:18px !important; font-weight:700 !important; color:var(--hd-text) !important; }
.os-head-bar .os-expand{ color:var(--hd-text-muted) !important; font-size:13px !important; margin:0 !important; }
.os-head-actions{ margin-left:auto; display:flex; gap:8px; }
.os-btn, button.os-btn{
  background:#fff !important; background-image:none !important;
  border:1px solid var(--hd-border) !important; border-radius:8px !important;
  color:var(--hd-text) !important; font-size:13px !important; font-weight:600 !important;
  padding:6px 13px !important; box-shadow:none !important; line-height:1.2 !important;
  cursor:pointer; position:relative;
}
.os-btn:hover, button.os-btn:hover{ background:var(--hd-row-hover) !important; border-color:var(--hd-field-hover) !important; }
/* icons come from ZK's bundled FontAwesome (z-icon-* = solid, font-weight 900) */
.os-btn [class*="z-icon"]{ margin-right:6px !important; font-size:13px !important; }
.os-btn-ticket [class*="z-icon"]{ color:var(--hd-text-muted) !important; }
.os-btn-clear, button.os-btn-clear{ color:var(--hd-danger) !important; }
.os-btn-clear [class*="z-icon"]{ color:var(--hd-danger) !important; }
.os-btn-clear:hover, button.os-btn-clear:hover{ border-color:var(--hd-danger) !important; background:var(--hd-danger-bg) !important; }

.os-fields{ display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:12px 14px; align-items:start; margin-top:12px; }
.os-field{ display:flex; flex-direction:column; min-width:0; }
/* inputs fill their grid cell so 3 fit per row (2-row layout) */
.os-fields .os-datebox, .os-fields .os-timebox, .os-fields .os-select, .os-fields .os-meal-select,
.os-fields .z-datebox, .os-fields .z-timebox, .os-fields .z-selectbox, .os-fields .z-combobox{
  width:100% !important; min-width:0 !important; box-sizing:border-box;
}
.os-cap{ font-size:10px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:#8A97A8; margin-bottom:5px; white-space:nowrap; }
.os-cap-meal, .os-cap-meal .z-label{ font-size:10px !important; font-weight:700 !important; letter-spacing:.05em; color:var(--hd-text) !important; }

/* boxed inputs */
.os-datebox .z-textbox, .os-timebox .z-textbox, .os-select .z-textbox, .os-meal-select .z-textbox{
  border:1px solid var(--hd-border) !important; border-radius:8px !important; height:38px !important;
  font-size:14px !important; color:var(--hd-text) !important; background:#fff !important; padding:0 10px !important;
}
.os-datebox .z-datebox-button, .os-timebox .z-timebox-button{ border:none !important; background:transparent !important; }

/* meal B/L/D segmented */
.os-meal-row{ display:flex; align-items:center; gap:10px; }
.os-bld{ display:inline-flex; border:1px solid var(--hd-border); border-radius:8px; overflow:hidden; }
.os-bld .os-meal-cell{
  display:flex !important; align-items:center; gap:5px;
  padding:0 10px !important; height:38px !important; width:auto !important; line-height:normal !important;
  background:#fff !important; background-image:none !important;
  border:none !important; border-right:1px solid var(--hd-border) !important;
  cursor:pointer; color:var(--hd-text) !important;
}
.os-bld .os-meal-cell:last-child{ border-right:none !important; }
.os-bld .os-meal-cell .z-label{ color:var(--hd-text) !important; font-size:14px !important; font-weight:700 !important; }
.os-bld .os-meal-cell::before{ content:""; width:8px; height:8px; border-radius:50%; background:#9AA6B5; flex:0 0 auto; }
.os-bld .meal-normal-indicator::before{ background:var(--hd-success) !important; }
.os-bld .meal-refused-indicator::before{ background:var(--hd-danger) !important; }
.os-bld .meal-unfed-indicator::before{ background:#9AA6B5 !important; }
.os-bld .meal-onhold-indicator::before{ background:var(--hd-warning) !important; }
.os-bld .os-meal-active{ background:var(--hd-primary) !important; }
.os-bld .os-meal-active .z-label{ color:#fff !important; }

/* status legend */
.os-legend{ display:grid; grid-template-columns:auto auto; gap:3px 12px; align-content:start; }
.os-leg{ font-size:11.5px; color:var(--hd-text-muted); display:inline-flex; align-items:center; gap:6px; white-space:nowrap; }
.os-leg::before{ content:""; width:8px; height:8px; border-radius:50%; }
.os-leg-normal::before{ background:var(--hd-success); }
.os-leg-refused::before{ background:var(--hd-danger); }
.os-leg-unfed::before{ background:#9AA6B5; }
.os-leg-onhold::before{ background:var(--hd-warning); }
.os-legend .os-leg{ font-size:11px; }

.os-hold{ margin-top:10px; font-size:13px; color:var(--hd-danger); }
.os-hold-cap, .os-hold-cap .z-label{ font-weight:700 !important; }

/* ===== HD confirmation dialog (Delete All? etc.) ===== */
.hd-dialog.z-window, .hd-dialog{
  border:none !important; border-radius:14px !important; overflow:hidden !important;
  box-shadow:0 16px 48px rgba(40,46,56,.30) !important; background:var(--hd-surface) !important;
}
.hd-dialog .z-window-header, .hd-dialog .z-window-title{
  background:var(--hd-surface) !important; background-image:none !important;
  border-bottom:1px solid var(--hd-line) !important;
  font-size:17px !important; font-weight:700 !important; color:var(--hd-text) !important;
}
.hd-dialog .z-window-header{ padding:15px 18px !important; }
.hd-dialog .z-window-close, .hd-dialog .z-window-icon{ color:var(--hd-text-muted) !important; opacity:.8; }
.hd-dialog-body{ padding:20px 18px 18px; }
.hd-dialog-text{ font-size:14px; color:var(--hd-text); line-height:1.55; }
.hd-dialog-actions{ display:flex; justify-content:flex-end; gap:10px; margin-top:26px; }
.hd-dlg-btn, button.hd-dlg-btn{
  border-radius:8px !important; border:1px solid transparent !important; background-image:none !important;
  font-size:13.5px !important; font-weight:600 !important; padding:9px 16px !important;
  box-shadow:none !important; line-height:1.2 !important; cursor:pointer;
}
.hd-dlg-btn.danger, button.hd-dlg-btn.danger{ background:var(--hd-danger) !important; color:#fff !important; }
.hd-dlg-btn.danger:hover{ background:#B7211F !important; }
.hd-dlg-btn.primary, button.hd-dlg-btn.primary{ background:var(--hd-primary) !important; color:#fff !important; }
.hd-dlg-btn.primary:hover{ background:var(--hd-primary-hover) !important; }
.hd-dlg-btn.ghost, button.hd-dlg-btn.ghost{ background:#fff !important; color:var(--hd-text) !important; border:1px solid var(--hd-border) !important; }
.hd-dlg-btn.ghost:hover{ background:var(--hd-row-hover) !important; border-color:var(--hd-field-hover) !important; }

/* ===== Order screen footer action buttons ===== */
.cc-foot-btn, button.cc-foot-btn{
  border-radius:8px !important; border:1px solid transparent !important; background-image:none !important;
  font-size:13.5px !important; font-weight:600 !important; padding:8px 15px !important;
  box-shadow:none !important; line-height:1.2 !important; cursor:pointer; margin:0 3px !important;
}
.cc-foot-btn.ghost, button.cc-foot-btn.ghost{ background:#fff !important; color:var(--hd-text) !important; border:1px solid var(--hd-border) !important; }
.cc-foot-btn.ghost:hover{ background:var(--hd-row-hover) !important; border-color:var(--hd-field-hover) !important; }
.cc-foot-btn.primary, button.cc-foot-btn.primary{ background:var(--hd-primary) !important; color:#fff !important; }
.cc-foot-btn.primary:hover{ background:var(--hd-primary-hover) !important; }
.cc-foot-btn.primary[disabled], button.cc-foot-btn.primary.z-button-disabled{ opacity:.45 !important; }
.cc-foot-btn.rush, button.cc-foot-btn.rush{ background:#FBEED5 !important; color:#A9690B !important; border:1px solid #E7C684 !important; }
.cc-foot-btn.rush:hover{ background:#F8E6C5 !important; }
.cc-foot-btn.rush [class*="z-icon"]{ color:#A9690B !important; margin-right:5px !important; }
.cc-foot-btn.link, button.cc-foot-btn.link{ background:transparent !important; color:var(--hd-text-muted) !important; }
.cc-foot-btn.link:hover{ background:var(--hd-row-hover) !important; color:var(--hd-text) !important; }

/* ===== top-nav Hospitals dropdown -> HD card with modern radios ===== */
.hosp-popup.z-menupopup{
  border:none !important; border-radius:12px !important; padding:6px !important;
  background:var(--hd-surface) !important; box-shadow:0 12px 34px rgba(40,46,56,.22) !important;
}
.hosp-popup .z-menuitem{ background:transparent !important; }
.hosp-popup .z-menuitem-content{
  position:relative; border-radius:8px !important; padding:9px 14px 9px 36px !important;
  font-size:13px !important; color:var(--hd-text) !important; line-height:1.3 !important;
}
.hosp-popup .z-menuitem:hover .z-menuitem-content{ background:var(--hd-row-hover) !important; }
/* hide the sprite radio image; draw a modern radio */
.hosp-popup .radio-image-css img, .hosp-popup .selected-hospital-info img{ display:none !important; }
.hosp-popup .radio-image-css .z-menuitem-content::before{
  content:""; position:absolute; left:13px; top:50%; transform:translateY(-50%);
  width:16px; height:16px; border-radius:50%; border:2px solid var(--hd-border); box-sizing:border-box;
}
.hosp-popup .radio-selected-css .z-menuitem-content::before{ border-color:var(--hd-primary) !important; }
.hosp-popup .radio-selected-css .z-menuitem-content::after{
  content:""; position:absolute; left:17px; top:50%; transform:translateY(-50%);
  width:8px; height:8px; border-radius:50%; background:var(--hd-primary);
}
.hosp-popup .radio-selected-css .z-menuitem-content span{ font-weight:700 !important; color:var(--hd-text) !important; }
/* "set/this is your default hospital" footer link */
.hosp-popup .selected-hospital-info{ border-top:1px solid var(--hd-line) !important; margin-top:5px !important; }
.hosp-popup .selected-hospital-info .z-menuitem-content{ padding:9px 14px !important; }
.hosp-popup .selected-hospital-info span{ color:var(--hd-primary) !important; font-size:12px !important; text-decoration:none !important; font-weight:600 !important; }

/* ===== Patient Details modal -> HD redesign ===== */
.modal-top.z-window{
  border:none !important; border-radius:14px !important; overflow:hidden !important;
  box-shadow:0 24px 70px rgba(40,46,56,.34) !important; background:var(--hd-surface) !important;
  max-width:1060px !important;
}
/* header bar -> small uppercase "PATIENT DETAILS" eyebrow + close */
.modal-top > .z-window-header{
  background:var(--hd-surface) !important; background-image:none !important;
  border-bottom:1px solid var(--hd-line) !important; padding:0 18px !important;
  height:50px !important; line-height:50px !important;
  font-size:11px !important; font-weight:700 !important; letter-spacing:.09em !important;
  text-transform:uppercase !important; color:var(--hd-text-muted) !important;
}
.modal-top .z-window-icon, .modal-top .z-window-close{ color:var(--hd-text-muted) !important; opacity:.85; }
.modal-top > .z-window-content{ background:var(--hd-surface) !important; }

/* name + status chips */
.modal-top .mm-heading-label, .modal-top .mm-heading-label.z-label{
  font-size:23px !important; font-weight:700 !important; color:var(--hd-text) !important; letter-spacing:-.01em;
}
.pd-chips{ display:inline-flex; gap:7px; margin-left:12px; vertical-align:middle; }
.pd-chip, .pd-chip .z-label{
  display:inline-flex; align-items:center; gap:5px; font-size:11.5px !important; font-weight:600 !important;
  border-radius:999px; padding:3px 10px; line-height:1.5; white-space:nowrap;
}
.pd-chip-status{ background:#E2F3EB; color:#0A7A43; }
.pd-chip-status::before{ content:""; width:6px; height:6px; border-radius:50%; background:var(--hd-success); }
.pd-chip-type{ background:var(--hd-primary-soft); color:#2C4A9A; }
.pd-chip-acct{ background:#EEF1F5; color:#5B6A7E; }
/* compact chips */
.pd-chips{ gap:6px; margin-left:10px; }
.pd-chip, .pd-chip .z-label{ font-size:11px !important; font-weight:600 !important; padding:2px 8px !important; border-radius:999px; }
.pd-chip-status::before{ width:5px; height:5px; }

/* divider under the name/header row */
.modal-top .pd-header{ border-bottom:1px solid var(--hd-line); padding-bottom:12px; overflow:hidden; }

/* identity / admission / app-access columns: spread wide with vertical separators */
.modal-top .pd-fields{ table-layout:fixed; width:100% !important; }
.modal-top .pd-fields > tbody > tr > td{ padding:14px 26px !important; vertical-align:top; border-right:1px solid var(--hd-line); }
.modal-top .pd-fields > tbody > tr > td:first-child{ padding-left:2px !important; }
.modal-top .pd-fields > tbody > tr > td:last-child{ border-right:none !important; padding-right:2px !important; }

/* section info-icon (tooltip): modern glyph placed right after the title (chevron stays far right) */
.modal-top .custom-groupbox .z-caption-content .z-image,
.modal-top .custom-groupbox .z-caption-content img{ display:none !important; }
.modal-top .pd-info{ order:2; margin-left:7px !important; align-self:center; cursor:help; }
.modal-top .pd-info::before{
  content:"\f05a"; font-family:'FontAwesome'; font-weight:900; font-size:14px; color:var(--hd-text-muted);
}
.modal-top .pd-info:hover::before{ color:var(--hd-primary); }

/* buttons inside the modal -> HD outlined */
.modal-top .mm-btn-green, .modal-top .btn-group .mm-btn-green{
  background:#fff !important; background-image:none !important; border:1px solid var(--hd-border) !important;
  color:var(--hd-text) !important; border-radius:8px !important; font-weight:600 !important;
  box-shadow:none !important; padding:7px 13px !important; font-size:13px !important;
}
.modal-top .mm-btn-green:hover{ background:var(--hd-row-hover) !important; border-color:var(--hd-field-hover) !important; }
.modal-top .pd-actions{ display:flex; align-items:center; gap:8px; }
.modal-top .pd-actions .btn-group{ display:inline-flex; }
.modal-top .pd-btn-primary, .modal-top .pd-btn-primary:hover{
  background:var(--hd-primary) !important; color:#fff !important; border-color:var(--hd-primary) !important;
}
.modal-top .pd-btn-primary [class*="z-icon"]{ color:#fff !important; margin-right:5px !important; }

/* identity / admission / app-access field tables */
.modal-top .mm-default-font, .modal-top .mm-default-font td, .modal-top .mm-default-font .z-label{
  font-size:13px !important; color:var(--hd-text) !important; line-height:1.5 !important;
}
.modal-top .mm-default-font td{ padding:3px 8px 3px 0 !important; vertical-align:top; }
.modal-top .mm-default-font td:first-child{ color:var(--hd-text-muted) !important; }
.modal-top .pd-col-head{
  font-size:10.5px !important; font-weight:700 !important; letter-spacing:.06em;
  text-transform:uppercase; color:#8A97A8 !important; margin:0 0 8px !important;
}
.modal-top .separator, .modal-top .z-separator-bar{ background:var(--hd-line) !important; height:1px !important; }

/* the 7 collapsible sections -> HD cards with clean caption + chevron on the right */
.modal-top .custom-groupbox{
  border:1px solid var(--hd-border) !important; border-radius:12px !important;
  background:var(--hd-surface) !important; box-shadow:var(--hd-shadow-sm) !important;
  margin:10px 5px !important; overflow:hidden; padding:0 !important;
}
.modal-top .custom-groupbox > .z-groupbox-header{
  background:var(--hd-surface) !important; background-image:none !important; border:none !important; padding:0 !important;
}
.modal-top .custom-groupbox .z-caption{ background:transparent !important; padding:0 !important; cursor:pointer; }
.modal-top .custom-groupbox .z-caption-content{ display:flex !important; align-items:center; padding:13px 16px !important; }
.modal-top .custom-groupbox .z-caption-label{
  order:1; flex:0 0 auto; font-size:15px !important; font-weight:700 !important; color:var(--hd-text) !important;
}
.modal-top .custom-groupbox .z-caption-image{ order:2; margin-left:auto; width:13px !important; height:13px !important; opacity:.55; }
.modal-top .custom-groupbox > .z-groupbox-content{
  border:none !important; background:var(--hd-surface) !important; padding:2px 16px 14px !important;
}
.modal-top .custom-groupbox:hover > .z-groupbox-header .z-caption-content{ background:#F8FAFD; }

/* per-section icon (left of the title) in a soft rounded square */
.modal-top .pd-cap .z-caption-label::before{
  content:""; display:inline-flex; align-items:center; justify-content:center;
  width:30px; height:30px; border-radius:8px; margin-right:11px; vertical-align:middle;
  background:#EEF2F8; color:#3A4A5E; font-family:'FontAwesome'; font-weight:900; font-size:14px;
}
.modal-top .pd-cap-diet    .z-caption-label::before{ content:"\f2e7"; }  /* utensils */
.modal-top .pd-cap-notes   .z-caption-label::before{ content:"\f15c"; }  /* file-lines */
.modal-top .pd-cap-hl7     .z-caption-label::before{ content:"\f0f3"; background:var(--hd-danger-bg); color:var(--hd-danger); }  /* bell */
.modal-top .pd-cap-allow   .z-caption-label::before{ content:"\f4be"; }  /* hand-holding */
.modal-top .pd-cap-so      .z-caption-label::before{ content:"\f021"; }  /* arrows-rotate */
.modal-top .pd-cap-cno     .z-caption-label::before{ content:"\f3ed"; }  /* shield */
.modal-top .pd-cap-dislike .z-caption-label::before{ content:"\f165"; }  /* thumbs-down */
.modal-top .pd-cap-personal .z-caption-label::before{ content:"\f007"; }  /* user (Edit Profile) */
.modal-top .pd-cap-meal     .z-caption-label::before{ content:"\f2e7"; }  /* utensils */
.modal-top .pd-cap-app      .z-caption-label::before{ content:"\f3cd"; }  /* mobile (MyMeal) */
.modal-top .pd-cap-admit    .z-caption-label::before{ content:"\f0f8"; }  /* hospital */

/* expand indicator: hide the legacy arrow png, draw a modern chevron that flips */
.modal-top .custom-groupbox .z-caption-image{ display:none !important; }
.modal-top .custom-groupbox .z-caption-content::after{
  content:"\f078"; font-family:'FontAwesome'; font-weight:900; font-size:12px;
  color:var(--hd-text-muted); margin-left:auto; order:3; transition:transform .15s ease;
}
.modal-top .custom-groupbox:has(> .z-groupbox-content[style*="display:none"]) .z-caption-content::after{
  transform:rotate(-90deg);
}

/* ADT split-button caret was white-on-white -> make it a visible dark chevron */
.modal-top .btn-group .caret{
  border:none !important; width:auto !important; height:auto !important; margin:0 0 0 2px !important;
}
.modal-top .btn-group .caret::before{
  content:"\f078"; font-family:'FontAwesome'; font-weight:900; font-size:10px; color:var(--hd-text-muted);
}

/* ===== ZK Messagebox -> HD card (Place Order?, Rush, info/error, etc.) =====
   Overrides the legacy custom-window.css ZK6/7 styling (win-header.png grey band). */
.z-messagebox-window{
  border:none !important; border-radius:14px !important; overflow:hidden !important;
  background:var(--hd-surface) !important; background-image:none !important;
  box-shadow:0 16px 48px rgba(40,46,56,.30) !important;
}
.z-messagebox-window .z-window-header, .z-messagebox-window .z-window-title{
  background:var(--hd-surface) !important; background-image:none !important;
  border-bottom:1px solid var(--hd-line) !important;
  font-size:17px !important; font-weight:700 !important; color:var(--hd-text) !important;
}
.z-messagebox-window .z-window-header{ padding:15px 18px !important; }
.z-messagebox-window .z-window-close, .z-messagebox-window .z-window-icon{ color:var(--hd-text-muted) !important; }
.z-messagebox-window .z-window-content{ background:var(--hd-surface) !important; background-image:none !important; padding:20px 22px !important; }
/* kill any legacy grey header-image bands inside the messagebox */
.z-messagebox, .z-messagebox *, .z-messagebox-window .z-window-content > *{ background-image:none !important; }
.z-messagebox{ background:transparent !important; border:none !important; }
.z-messagebox, .z-messagebox .z-label{ font-family:var(--hd-font) !important; font-size:14px !important; color:var(--hd-text) !important; line-height:1.55 !important; }
.z-messagebox hr, .z-messagebox .z-separator{ display:none !important; }
/* buttons -> HD: focused/default = primary blue, others = ghost */
.z-messagebox-buttons{ text-align:right !important; padding-top:10px !important; }
.z-messagebox-button, .z-messagebox-window .z-button{
  background:#fff !important; background-image:none !important; color:var(--hd-text) !important;
  border:1px solid var(--hd-border) !important; border-radius:8px !important;
  font-size:13.5px !important; font-weight:600 !important; padding:9px 16px !important;
  box-shadow:none !important; margin:0 4px !important;
}
.z-messagebox-button:hover, .z-messagebox-window .z-button:hover{ background:var(--hd-row-hover) !important; border-color:var(--hd-field-hover) !important; }
.z-messagebox-button-focus, .z-messagebox-window .z-button:focus, .z-messagebox-window .z-button-focus{
  background:var(--hd-primary) !important; color:#fff !important; border-color:var(--hd-primary) !important;
}
/* content viewport: lay icon + message as a flex row so a long message wraps instead of
   overflowing (the old side-by-side icon+text overflowed -> ugly horizontal scrollbar). */
.z-messagebox-viewport{
  display:flex !important; align-items:flex-start; gap:14px;
  overflow-x:hidden !important; overflow-y:auto !important;
  height:auto !important; max-height:58vh !important; padding:2px 4px !important;
}
.z-messagebox-viewport .z-messagebox-icon{ flex:0 0 auto; margin-top:1px; }
.z-messagebox-viewport .z-messagebox{ flex:1 1 auto; min-width:0; }
.z-messagebox-viewport .z-messagebox .z-label{ line-height:1.55 !important; white-space:normal; word-break:break-word; }
.z-messagebox-viewport::-webkit-scrollbar{ width:10px; height:0; }
.z-messagebox-viewport::-webkit-scrollbar-thumb{ background:#CCCFD4; border-radius:6px; border:3px solid #fff; }
.z-messagebox-viewport::-webkit-scrollbar-track{ background:transparent; }

/* ===== header ===== */
.pcard-head{ display:flex; align-items:center; gap:14px; padding:13px 18px 12px; }
.pcard-avatar{
  flex:0 0 auto; width:46px; height:46px; border-radius:11px;
  background:var(--hd-primary); color:#fff;
  display:flex; align-items:center; justify-content:center;
  font-size:16px; font-weight:700; letter-spacing:.02em;
}
.pcard-avatar .z-label{ color:#fff !important; }
.pcard-id{ flex:1 1 auto; min-width:0; }
.pcard-nameline{ display:flex; align-items:center; gap:9px; flex-wrap:wrap; }
.pcard-name, .pcard-name .z-label{
  font-size:19px; font-weight:700; color:var(--hd-text); letter-spacing:-.01em; line-height:1.15;
}
.pcard-meta, .pcard-meta .z-label{
  background:#EEF2F8; color:#5B6A7E; border-radius:6px;
  padding:2px 8px; font-size:11px; font-weight:600; line-height:1.5; white-space:nowrap;
}
/* HL7 alert -> soft red pill with dot (NO !important on display: keep ZK visible=false working) */
.pcard-hl7, .pcard-hl7 .z-label{
  background:var(--hd-danger-bg) !important; color:var(--hd-danger) !important;
  border:1px solid var(--hd-danger-border) !important;
  border-radius:999px !important; padding:2px 10px 2px 9px !important;
  font-size:11px !important; font-weight:600 !important; line-height:1.4 !important; white-space:nowrap;
}
.pcard-hl7{ display:inline-flex; align-items:center; }
.pcard-hl7::before{
  content:""; width:6px; height:6px; border-radius:50%;
  background:var(--hd-danger); margin-right:6px; flex:0 0 auto;
}
.pcard-sub, .pcard-sub .z-label{ font-size:13px; color:var(--hd-text-muted); line-height:1.5; }
.pcard-sub{ margin-top:4px; }
/* DOB / phone values: match the label size + baseline so the whole line sits straight */
.pcard-strong, .pcard-strong .z-label{
  color:var(--hd-text) !important; font-weight:600 !important;
  font-family:ui-monospace,"SF Mono",Menlo,Consolas,monospace !important;
  font-size:13px !important; line-height:1.5 !important; vertical-align:baseline !important;
}
.pcard-faint, .pcard-faint .z-label{ color:#9AA6B5 !important; font-size:13px !important; line-height:1.5 !important; vertical-align:baseline !important; font-style:normal; }
/* ===== birthday band + pill + highlighted DOB (only on the patient's birthday) ===== */
.pcard-birthday{
  display:flex; align-items:center; gap:8px;
  background:#FBEED5; border-bottom:1px solid #EAD9AE;
  padding:9px 18px; color:#8A5B0B;
}
.pcard-bday-cake{ font-size:15px; line-height:1; }
.pcard-bday-text, .pcard-bday-text .z-label{ font-size:13px !important; font-weight:700 !important; color:#8A5B0B !important; }
.pcard-bday-pill, .pcard-bday-pill.z-label{
  background:#FBEED5 !important; color:#A9690B !important; border:1px solid #EAD9AE !important;
  border-radius:999px !important; padding:2px 10px !important;
  font-size:11px !important; font-weight:700 !important; line-height:1.5 !important; white-space:nowrap;
}
.pcard-bday-date, .pcard-bday-date .z-label{ color:#A9690B !important; }
.pcard-actions{ margin-left:auto; flex:0 0 auto; display:flex; gap:8px; align-items:center; }
.pcard-btn, .pcard-btn .z-button, button.pcard-btn{
  background:#fff !important; background-image:none !important;
  border:1px solid var(--hd-border) !important; border-radius:8px !important;
  color:var(--hd-text) !important; font-size:13px !important; font-weight:600 !important;
  padding:6px 13px !important; box-shadow:none !important; line-height:1.2 !important; cursor:pointer;
}
.pcard-btn:hover, button.pcard-btn:hover{
  background:var(--hd-row-hover) !important; border-color:var(--hd-field-hover) !important;
}

/* ===== info strip ===== */
.pcard-strip{
  display:flex; align-items:stretch;
  background:#EEF1F8; border-top:1px solid var(--hd-line);
  padding:11px 0 11px 18px;
}
.pcard-field{ flex:0 0 auto; min-width:0; padding-right:26px; align-self:center; }
.pcard-cap{
  font-size:10px; font-weight:700; letter-spacing:.05em; text-transform:uppercase;
  color:#8A97A8; margin-bottom:3px; line-height:1.2;
}
.pcard-val, .pcard-val .z-label{ font-size:13.5px; font-weight:600; color:var(--hd-text); line-height:1.3; }
.pcard-html, .pcard-html *{ font-size:13.5px !important; line-height:1.3 !important; }
.pcard-none{ font-size:13px; color:#9AA6B5; font-style:italic; }
/* diet-order accent block — blue rule + faint blue fill, fills remaining width */
.pcard-diet{
  flex:1 1 auto; align-self:stretch; margin-left:6px;
  border-left:3px solid var(--hd-primary); background:#E6ECF8;
  padding:6px 16px; display:flex; flex-direction:column; justify-content:center;
}
.pcard-diet-cap{ color:var(--hd-primary); }
.pcard-diet-cap::before{ content:"\25C6"; margin-right:6px; font-size:9px; }
.pcard-diet-val, .pcard-diet-val .z-label{ font-size:14px; font-weight:700; color:var(--hd-text); line-height:1.3; }

/* ===== adaptive allergy banner ===== */
.pcard-allergy{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:11px 18px; border-top:1px solid var(--hd-line); font-size:13.5px;
}
.pcard-allergy.ok{ background:#E4F4EC; color:#0A7A43; }
.pcard-allergy.warn{ background:var(--hd-danger-bg); color:var(--hd-danger); }
.pcard-allergy-text{ display:flex; align-items:center; min-width:0; }
.pcard-allergy-text b{ font-weight:700; }
.pcard-allergy .z-html, .pcard-allergy .pcard-allergy-text .z-label{ display:inline; }
.pcard-allergy.warn .found-allergy, .pcard-allergy.warn .not-found-allergy,
.pcard-allergy.ok .found-allergy, .pcard-allergy.ok .not-found-allergy{
  background:transparent !important; background-image:none !important;
  color:var(--hd-danger) !important; font-weight:600; padding:0 !important;
}
.pcard-allergy-text::before{
  flex:0 0 auto; width:19px; height:19px; border-radius:50%;
  display:inline-flex; align-items:center; justify-content:center;
  color:#fff; font-size:11px; font-weight:700; margin-right:9px;
}
.pcard-allergy.ok .pcard-allergy-text::before{ content:"\2713"; background:var(--hd-success); }
.pcard-allergy.warn .pcard-allergy-text::before{ content:"!"; background:var(--hd-danger); }
/* "Confirm with patient" / "Review before ordering" are passive prompts, not actions */
.pcard-allergy-note{ flex:0 0 auto; font-size:12.5px; font-weight:600; color:#0A7A43; white-space:nowrap; }
.pcard-allergy-note.warn{ color:var(--hd-danger); }

/* ---- ZK switch-mold checkboxes (Call Center filter toggles) -> HD blue when on ---- */
.z-checkbox-switch-on .z-checkbox-mold{ background-color:var(--hd-primary) !important; }

/* ---- ZK busy/loading mask ("Processing…") -> clean invoker-core spinner ----
   Replaces the legacy grey gif+text with a white card + a circular HD-blue ring
   spinner (LoadingSpinner inspiration), shown app-wide on every AU request. */
.z-loading{ background:transparent !important; border:none !important; }
.z-loading-indicator{
  position:relative;
  display:inline-flex !important;
  align-items:center;
  gap:12px;
  background:#FFFFFF !important;
  background-image:none !important;
  color:#282E38 !important;                 /* blackBlue100 */
  font-family:'DM Sans','Segoe UI',Roboto,Helvetica,Arial,sans-serif !important;
  font-size:14px !important;
  font-weight:600 !important;
  line-height:24px !important;
  border:1px solid #E6E8EC !important;
  border-radius:10px !important;
  box-shadow:0 6px 22px rgba(40,46,56,.18) !important;
  padding:13px 18px !important;
}
/* suppress the default ZK gif/icon, draw our own ring via ::before */
.z-loading-indicator .z-loading-icon{ display:none !important; }
.z-loading-indicator::before{
  content:'';
  box-sizing:border-box;
  width:22px; height:22px; flex:0 0 22px;
  border-radius:50%;
  border:3px solid #CFDFF4;                 /* lightBlue20 track */
  border-top-color:#003396;                 /* HD blue arc */
  animation:hd-spin .8s linear infinite;
}
@keyframes hd-spin{ to{ transform:rotate(360deg); } }

/* ============================================================================
   Order screen — fluid responsive layout (medium and up)
   The main task here is selecting menu items. The patient card / order summary
   are not hidden; instead everything wraps to stay inside its card as the
   window narrows (header buttons wrap, the info-strip diet cell wraps, notes
   sit in side-by-side sections, and the foot bar flexes).
   ============================================================================ */
.pcard-head{ flex-wrap:wrap; row-gap:8px; }
.pcard-id{ flex:1 1 200px; }
.pcard-actions{ margin-left:auto; flex-wrap:wrap; justify-content:flex-end; }
.pcard-row{ flex-wrap:wrap; }
.pcard{ flex:1 1 440px; position:relative; }
.pcard-notes{ flex:1 1 260px; max-width:none; }   /* legacy side panel (no longer rendered) */
/* integrated notes inside the patient card: Preferences + Special Instructions
   sit side by side (label-above-value, matching the info strip) to save height;
   the variable printable User Notes get their own full-width row below. */
.pcard-notesec{ border-top:1px solid var(--hd-line); padding:10px 18px; display:flex; flex-flow:row wrap; gap:10px 40px; align-items:flex-start; }
.pcn2{ display:flex; flex-direction:column; gap:2px; flex:0 1 auto; min-width:0; }
.pcn2-label{ font-size:10px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:#8A97A8; line-height:1.4; }
.pcn2-body{ min-width:0; display:flex; align-items:center; min-height:24px; }   /* center each column's value so plain text + pills share one baseline */
.pcn2-text, .pcn2-text .z-label{ font-size:13.5px; color:var(--hd-text); line-height:1.4; }
.pcn2-empty, .pcn2-empty .z-label{ font-size:13px; color:#9AA6B5; font-style:italic; }
/* NOTES (user notes) sit inline as a third column; each note is a pill, pills
   wrap horizontally to save vertical space */
.pcn2-usernotes .pcn2-label{ color:var(--hd-primary); }
.pcn2-pills{ display:flex; flex-flow:row wrap; gap:5px; align-items:center; }
.pcn2-pill{ display:inline-flex; align-items:center; background:#EEF2F8; border:1px solid var(--hd-border); border-radius:999px; padding:2px 10px; }
.pcn2-pill .pcn2-text, .pcn2-pill .pcn2-text .z-label{ font-size:12.5px !important; color:var(--hd-text) !important; }
.pcn2-pill .pcn2-print{ margin-right:1px; }
.pcn2-noteline{ align-items:center; }
.pcn2-print, .pcn2-print.z-label{ color:#64748B !important; font-size:12px !important; flex:0 0 auto; }
.pcn2-print::before{ content:"\f02f"; font-family:"ZK85Icons", FontAwesome; font-weight:900; }
.pcard-strip{ flex-wrap:wrap; row-gap:10px; }
.pcard-diet{ flex:1 1 200px; min-width:180px; }
/* foot bar: one row spread edge-to-edge when it fits; clean contained wrap when it doesn't */
.cc-foot-bar{ display:flex !important; align-items:center; flex-wrap:wrap; gap:10px 14px; justify-content:space-between; }
.cc-foot-bar > div{ display:flex !important; align-items:center; gap:10px; flex-wrap:wrap; }
.cc-foot-bar > div:first-child{ width:auto !important; flex:1 1 auto; min-width:0; }
.cc-foot-bar > div:first-child > div{ float:none !important; }
.cc-foot-bar > div:last-child{ float:none !important; padding-right:0 !important; flex:0 0 auto; }
.cc-foot-bar .z-combobox, .cc-foot-bar .z-combobox .z-combobox-input{ width:260px !important; min-width:0 !important; box-sizing:border-box !important; }

/* ===== collapse controls (shown at all widths for consistency) =====
   Patient card collapses to its top row + allergy banner; Order Summary
   collapses to its title + items (the filter fields hide). Pure CSS toggle
   (hidden checkbox + label[for]); default = expanded. */
.pc-toggle, .os-toggle{ position:absolute !important; width:0; height:0; opacity:0; pointer-events:none; }
.pc-collapse-btn, .os-collapse-btn{
  display:inline-flex; align-items:center; justify-content:center;
  width:28px; height:28px; border-radius:8px; cursor:pointer; flex:0 0 auto;
  border:1px solid var(--hd-border); background:#fff; color:var(--hd-text-muted);
}
.pc-collapse-btn{ margin-left:8px; align-self:flex-start; }
.pc-collapse-btn:hover, .os-collapse-btn:hover{ background:var(--hd-row-hover); color:var(--hd-text); }
/* chevron-up = collapse (expanded state) -> chevron-down = expand (collapsed state) */
.pc-collapse-btn::before, .os-collapse-btn::before{ font:900 12px/1 FontAwesome, "ZK85Icons"; content:"\f077"; }
.pc-toggle:checked ~ .pcard-row .pc-collapse-btn::before,
.os-toggle:checked ~ .os-head .os-collapse-btn::before{ content:"\f078"; }
/* collapsed (checked): patient card -> only header + allergies */
.pc-toggle:checked ~ .pcard-row .pcard-strip,
.pc-toggle:checked ~ .pcard-row .pcard-notesec{ display:none; }
/* collapsed (checked): order summary -> hide the filter fields */
.os-toggle:checked ~ .os-head .os-fields{ display:none; }

/* ===== "Choose Time" delivery-time picker popup — HD restyle (pill buttons) ===== */
.time-popup .time-popup-body{ padding:6px 18px 16px; gap:14px; align-items:center; }
/* large, centered time display */
.time-popup .time-display .z-timebox .z-textbox{
  border:1px solid var(--hd-border) !important; border-radius:10px !important;
  height:46px !important; font-size:22px !important; font-weight:700 !important; letter-spacing:.02em;
  text-align:center; color:var(--hd-text) !important; background:var(--hd-surface-2) !important;
}
/* hour / minute / am-pm quick-pick buttons -> clean HD pills */
.time-popup .timerbox-button,
.time-popup .timerbox-button.z-button,
.time-popup .timerbox-button.z-button-os{
  background:#fff !important; background-image:none !important;
  border:1px solid var(--hd-border) !important; border-radius:8px !important;
  color:var(--hd-text) !important; font-size:14px !important; font-weight:600 !important;
  min-width:50px !important; height:40px !important; padding:0 12px !important;
  box-shadow:none !important; cursor:pointer; line-height:1 !important; margin:0 !important;
}
.time-popup .timerbox-button:hover,
.time-popup .timerbox-button.z-button-os:hover{
  background:var(--hd-row-hover) !important; border-color:var(--hd-field-hover) !important; color:var(--hd-text) !important;
}
/* AM = HD primary accent, PM = amber accent */
.time-popup .timerbox-button.blue{ color:var(--hd-primary) !important; border-color:var(--hd-primary) !important; font-weight:700 !important; }
.time-popup .timerbox-button.blue:hover{ background:var(--hd-primary) !important; color:#fff !important; }
.time-popup .timerbox-button.rosy{ color:#A9690B !important; border-color:#E7C684 !important; font-weight:700 !important; }
.time-popup .timerbox-button.rosy:hover{ background:#FBEED5 !important; color:#A9690B !important; }
/* soften the dated gray column dividers */
.time-popup td[style*="border-right"]{ border-right-color:var(--hd-line) !important; }
/* Cancel = ghost (Set Time stays primary via mm-btn-green) */
.time-popup .time-cancel-btn, .time-popup .time-cancel-btn.z-button{
  background:#fff !important; background-image:none !important; border:1px solid var(--hd-border) !important;
  border-radius:8px !important; color:var(--hd-text) !important; font-weight:600 !important;
  height:38px !important; padding:0 18px !important; box-shadow:none !important; cursor:pointer;
}
.time-popup .time-cancel-btn:hover{ background:var(--hd-row-hover) !important; border-color:var(--hd-field-hover) !important; }
