/* @ekm-tags: style, billing */
/*
 * Billing Communication rebuild, Slice H: "+ New Item" (js/ekm-bc2-newitem.js). Tokens and core components come from
 * css/ekm-bc2.css (Slice A, owner revision 2026-10-29): cool slate, no white surfaces, no pills, status as a left rule.
 * Tokens only below: no raw hex values, no browser-default controls. Every target is at least 44px tall.
 */
.bc2.bc2ni-host { background:transparent; }
.bc2 .bc2ni-scrim { z-index:9060; background:rgba(15,23,42,.45); padding:16px; overflow:auto; }   /* above the side panel (9040) */
.bc2 .bc2ni-modal { width:min(680px, 100%); max-height:calc(100vh - 32px); display:flex; flex-direction:column; gap:18px; color:var(--text);
  border:1px solid var(--line-strong); }
.bc2 .bc2ni-head { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.bc2 .bc2ni-head h2 { font:400 26px/1.15 var(--font-display); }
.bc2 .bc2ni-x { width:44px; height:44px; min-height:44px; padding:0; justify-content:center; font-size:20px; }
.bc2 .bc2ni-h3 { margin:0 0 8px; font:600 11px/1.2 var(--font-ui); letter-spacing:.09em; text-transform:uppercase; color:var(--label); }
.bc2 .bc2ni-section, .bc2 .bc2ni-details { display:flex; flex-direction:column; gap:12px; }
.bc2 .bc2ni-details .bc2ni-h3 { margin:0; }

/* type tiles: hairline cards; the chosen one gets a 2px accent left rule (never a pill) */
.bc2 .bc2ni-types { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:8px; }
.bc2 .bc2ni-type { min-height:44px; text-align:left; display:flex; flex-direction:column; gap:3px; padding:12px 14px; border-radius:var(--r-card);
  border:1px solid var(--line-strong); border-left:2px solid var(--line-strong); background:var(--surface-2); color:var(--text); font:14px/1.35 var(--font-ui); cursor:pointer; }
.bc2 .bc2ni-type:hover { background:var(--surface-3); }
.bc2 .bc2ni-type b { font-size:15px; font-weight:600; }
.bc2 .bc2ni-type.is-on { border-color:var(--accent); border-left-color:var(--accent); background:var(--accent-tint); }
.bc2 .bc2ni-type__sub { font-size:13px; color:var(--text-2); }
.bc2 .bc2ni-type__goes { font-size:12px; font-weight:600; color:var(--accent); }
.bc2 .bc2ni-type.is-off { cursor:not-allowed; border-left-color:var(--warning); }
.bc2 .bc2ni-type.is-off:hover { background:var(--surface-2); }
.bc2 .bc2ni-type__off { font-size:12px; font-weight:600; color:var(--warning); }

/* fields */
.bc2 .bc2ni-grid { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px; }
.bc2 .bc2ni-field { display:flex; flex-direction:column; gap:4px; min-width:0; }
.bc2 .bc2ni-label { font-size:13px; font-weight:600; color:var(--text-2); }
.bc2 .bc2ni-input, .bc2 .bc2ni-text { min-height:44px; width:100%; box-sizing:border-box; font-size:15px; }
.bc2 .bc2ni-text { padding:10px 12px; resize:vertical; line-height:1.4; }
.bc2 .is-invalid { border-color:var(--danger) !important; }
.bc2 .bc2ni-readonly { min-height:44px; display:flex; align-items:center; font-size:14px; color:var(--muted); }
.bc2 .bc2ni-info { margin:0; padding:10px 12px; border-left:2px solid var(--success); background:var(--success-tint); color:var(--success); font-size:14px; border-radius:var(--r-control); }

/* dropdown listboxes (design system 6.4) at form size */
.bc2 .bc2ni-dd { display:flex; flex-direction:column; gap:4px; min-width:0; }
.bc2 .bc2ni-dd__btn { min-height:44px; width:100%; justify-content:space-between; }
.bc2 .bc2ni-dd__menu { top:calc(100% + 4px); width:100%; min-width:0; max-height:280px; overflow:auto; box-sizing:border-box; }
.bc2 .bc2ni-dd .bc-dd__opt, .bc2 .bc2ni-sugg .bc-dd__opt { min-height:44px; }

/* patient combobox */
.bc2 .bc2ni-patient { position:relative; }
.bc2 .bc2ni-sugg { top:72px; left:0; right:0; min-width:0; max-height:300px; overflow:auto; }
.bc2 .bc2ni-sugg__opt.is-active { background:var(--accent-tint); font-weight:600; }
.bc2 .bc2ni-sugg__tag { font-size:12px; color:var(--muted); font-weight:500; }
.bc2 .bc2ni-names-error { color:var(--warning); font-weight:600; }

/* while a save is in flight the fields are disabled (js: busyAttr) */
.bc2 .bc2ni-modal.is-busy [disabled] { cursor:progress; }

.bc2 .bc2ni-error { font-weight:600; }
.bc2 .bc2ni-foot { display:flex; justify-content:flex-end; gap:10px; }
.bc2 .bc2ni-foot .bc-btn { min-height:44px; }
.bc2 .bc2ni-foot .bc-btn[aria-disabled="true"] { opacity:1; background:var(--surface-3); color:var(--muted); }

/* confirmation bar (under the header) */
.bc2 .bc2ni-flash { justify-content:space-between; }
.bc2 .bc2ni-flash__x { min-height:44px; background:transparent; color:inherit; border-color:currentColor; }

@media (max-width: 640px) {
  .bc2 .bc2ni-types, .bc2 .bc2ni-grid { grid-template-columns:minmax(0, 1fr); }
}
