/* The drug screen, laid out and spaced like the app (drug_screen.dart, drug_screen_parts.dart,
   dose_widgets.dart): cards 14px padding with 12px side margins on a phone, STRENGTH / INDICATION
   rows of selectable cards, Geist numbers with tabular figures. */

/* ---------- top bar of the drug (back · weight · label · edit · pin) ---------- */
.drug-nav{display:flex;align-items:center;gap:4px;min-height:52px;margin:-4px 0 -6px}
.nav-actions{margin-left:auto;display:flex;align-items:center;gap:2px;flex-wrap:wrap;justify-content:flex-end}
.nav-chip{display:inline-flex;margin-right:4px}
.nav-chip .patient{padding:6px 12px 6px 6px;gap:7px}
.nav-btn{width:44px;height:44px}
.nav-btn[aria-pressed="true"]{color:var(--brand-text)}
.app[data-screen="drug"] #weightChip{display:none}

/* ---------- name ---------- */
.drug-head{display:block;padding:4px 8px 6px}
.drug-head h1{font-size:26px;line-height:1.1;letter-spacing:-.5px;font-weight:600}
.drug-head .trade{margin-top:2px;color:var(--muted)}
.drug-head .chips{margin-top:8px}
.fact-line{display:flex;align-items:center;gap:6px;margin-top:8px;color:var(--muted);font-size:13px;min-width:0}
.fact-line .num{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.strip-link{font-size:12.5px;font-weight:600;color:var(--brand-text);padding:2px 6px;border-radius:6px;flex:none}
.strip-link:hover{background:var(--surface-2)}

/* ---------- STRENGTH / INDICATION rows (VariationStrip) ---------- */
#variations:empty{display:none}
#variations{display:flex;flex-direction:column;gap:12px}
.strip{min-width:0}
.strip-head{display:flex;align-items:center;justify-content:space-between;padding:0 8px 8px}
.strip-head h2{margin:0}
.strip-row{display:flex;gap:8px;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x proximity;scroll-padding-inline:8px;scrollbar-width:none;padding:0 8px 2px}
.strip-row::-webkit-scrollbar{display:none}
.vcard{flex:none;min-width:132px;height:78px;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:2px;text-align:left;
  padding:9px 12.5px;border-radius:12px;background:var(--surface-2);border:1px solid var(--line);color:var(--muted);scroll-snap-align:start;
  transition:border-color .16s,background-color .16s,color .16s}
.vcard.fixed{width:150px}
.vcard:hover{border-color:var(--faint)}
.vcard[aria-pressed="true"]{background:var(--surface);border:1.5px solid var(--brand);padding:8.5px 12px;color:var(--ink)}
.vcard.muted:not([aria-pressed="true"]){color:var(--faint)}
.vcard.empty{cursor:default;border-style:dashed}
.vc-title,.vc-value,.vc-sub-text{max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.vc-title{font-size:13px;font-weight:600}
.vc-value{font-size:12.5px;font-weight:500}
.vc-sub{display:flex;align-items:center;gap:5px;max-width:100%;font-size:11.5px;color:var(--faint)}
.vc-kind{display:inline-flex;color:var(--muted);flex:none}
.vcard[aria-pressed="true"] .vc-kind{color:var(--brand-text)}

/* ---------- dose card ---------- */
.card{padding:14px}
.mode-row{margin-bottom:12px;overflow-x:auto}
.dose-card .card-title{margin-bottom:10px}
.step-text{font-size:12px;color:var(--muted)}
.dose-card .echo{margin-top:8px}
.dose-card .echo:empty{display:none}
.dose-card .range-lab{padding:0 calc(10.9% - 14px)}

/* ---------- dilute before giving ---------- */
.switch-head{cursor:pointer;margin-bottom:0}
.switch.sm{width:38px;height:22px}
.switch.sm::after{top:3px;left:3px;width:16px;height:16px}
.switch.sm[aria-checked="true"]::after{transform:translateX(16px)}
.dilute-card #dilOff{margin-top:6px}
.dilute-card .fields{margin-top:10px}

/* ---------- CHECK THE WEIGHT ---------- */
.weight-check .wc-head{display:flex;align-items:center;gap:6px;color:var(--warn)}
.weight-check .wc-head .label{color:var(--warn)}
.weight-check .wc-msg{margin:8px 0 2px;font-size:16px;line-height:1.3;font-weight:600}
.weight-check .wc-btns{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}

/* ---------- result column: result, working, notes ---------- */
.right-col{position:static}
#readoutBox:empty,#noStrengthBox:empty,#workingBox:empty,#notesBox:empty{display:none}
.no-strength{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;padding:0 8px;font-size:12.5px;color:var(--muted)}
.notes-card{padding:6px}
.notes-card summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:8px;padding:8px;border-radius:10px}
.notes-card summary::-webkit-details-marker{display:none}
.notes-card summary:hover{background:var(--surface-2)}
.notes-icon{display:inline-flex;color:var(--muted)}
.notes-title{font-size:14px;font-weight:600}
.notes-card .pip{margin-left:0}
.notes-card .chev{margin-left:auto;width:8px;height:8px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(45deg) translate(-2px,-2px);transition:transform .16s}
.notes-card[open] .chev{transform:rotate(-135deg) translate(-2px,-2px)}
.notes-card .note-body{padding:2px 8px 8px}

@media (max-width:1023.98px){
  /* On a phone the drug screen has only its own top bar, as in the app. */
  .app[data-screen="drug"] .topbar{display:none}
  .app[data-screen="drug"] .work-grid{padding:0 12px 28px;gap:10px}
  .app[data-screen="drug"] .main-col,.app[data-screen="drug"] .right-col{gap:10px}
  .drug-nav{position:sticky;top:0;z-index:5;background:var(--ground);margin:0 -12px;padding:4px 8px}
  .drug-nav .back-btn{margin-left:0}
  .strip-row{margin-right:-12px;padding-right:20px}
}
@media (min-width:1024px){
  .drug-nav [data-back]{display:none}
  .drug-head h1{font-size:30px}
}
