/* ============================================================
   Liquid Dosage Calculator — liquid-dosage.css
   Load /css/style.css FIRST, then this file
   ============================================================ */

/* ── Mode Tabs ───────────────────────────────────────────── */
.ld-tabs { display:flex; background:#f1f5f9; border-radius:12px; padding:4px; gap:3px; margin-bottom:18px; flex-wrap:wrap; }
.ld-tab { flex:1; min-width:90px; padding:8px 8px; border-radius:9px; border:none; font-family:'Lexend',sans-serif; font-size:11px; font-weight:600; cursor:pointer; transition:all 0.2s; color:#64748b; background:transparent; text-align:center; white-space:nowrap; }
.ld-tab.active { background:#1D3557; color:#fff; box-shadow:0 2px 8px rgba(0,0,0,0.12); }
.ld-tab:hover:not(.active) { color:#1D3557; }

/* ── Medication Presets ──────────────────────────────────── */
.ld-presets { display:flex; gap:5px; flex-wrap:wrap; margin-bottom:12px; }
.ld-preset { background:#f8fafc; border:1.5px solid #e2e8f0; border-radius:8px; padding:4px 10px; font-family:'Lexend',sans-serif; font-size:11px; font-weight:600; color:#64748b; cursor:pointer; transition:all 0.2s; }
.ld-preset.active { background:#1D3557; border-color:#1D3557; color:#fff; }
.ld-preset:hover:not(.active) { border-color:#1D3557; color:#1D3557; }
.ld-preset-group-label { font-family:'Lexend',sans-serif; font-size:10px; font-weight:700; color:#94a3b8; text-transform:uppercase; letter-spacing:0.06em; margin-bottom:4px; margin-top:8px; display:block; width:100%; }

/* ── Result Area ─────────────────────────────────────────── */
#ld-result-area { display:none; margin-top:18px; }
#ld-result-area.show { display:block; animation:fadeInUp 0.4s ease forwards; }

/* ── Primary Volume Display ──────────────────────────────── */
.ld-primary-box { border-radius:16px; padding:18px 20px; margin-bottom:14px; text-align:center; }
.ld-primary-val { font-family:'Lexend',sans-serif; font-weight:900; font-size:52px; line-height:1; margin-bottom:4px; }
.ld-primary-unit { font-family:'Inter',sans-serif; font-size:14px; margin-bottom:6px; }
.ld-formula-note { font-family:'Courier New',monospace; font-size:11px; border-radius:8px; padding:6px 12px; display:inline-block; margin-top:6px; }

/* Safe/Warning colours */
.ld-safe { background:#f0fdf4; border:2px solid #86efac; }
.ld-safe .ld-primary-val { color:#15803d; }
.ld-safe .ld-primary-unit { color:#166534; }
.ld-safe .ld-formula-note { background:rgba(0,0,0,0.06); color:#14532d; }

.ld-warn { background:#fff7ed; border:2px solid #fdba74; }
.ld-warn .ld-primary-val { color:#c2410c; }
.ld-warn .ld-primary-unit { color:#9a3412; }
.ld-warn .ld-formula-note { background:rgba(0,0,0,0.06); color:#7c2d12; }

.ld-danger { background:#fff1f2; border:2px solid #fca5a5; }
.ld-danger .ld-primary-val { color:#be123c; }
.ld-danger .ld-primary-unit { color:#9f1239; }
.ld-danger .ld-formula-note { background:rgba(0,0,0,0.06); color:#881337; }

/* ── Equivalent Measurements ─────────────────────────────── */
.ld-equiv-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-bottom:14px; }
.ld-equiv-card { background:#f8fafc; border:1px solid #e2e8f0; border-radius:10px; padding:10px; text-align:center; }
.ld-equiv-val { font-family:'Lexend',sans-serif; font-weight:800; font-size:18px; color:#1D3557; line-height:1; margin-bottom:2px; }
.ld-equiv-unit { font-family:'Inter',sans-serif; font-size:10px; color:#94a3b8; text-transform:uppercase; letter-spacing:0.04em; }

/* ── Syringe Visual ──────────────────────────────────────── */
.ld-syringe-row { display:flex; align-items:center; gap:14px; margin-bottom:12px; }
.ld-syringe-info { flex:1; }
.ld-syringe-stat { display:flex; justify-content:space-between; align-items:center; padding:5px 0; border-bottom:1px solid #f1f5f9; }
.ld-syringe-stat:last-child { border-bottom:none; }
.ld-syringe-label { font-family:'Inter',sans-serif; font-size:12px; color:#94a3b8; }
.ld-syringe-val { font-family:'Lexend',sans-serif; font-weight:700; font-size:13px; color:#1D3557; }

/* ── Safety Bar ──────────────────────────────────────────── */
.ld-safety-bar { margin-bottom:12px; }
.ld-safety-bar-title { font-family:'Lexend',sans-serif; font-weight:700; color:#1D3557; font-size:12px; margin-bottom:6px; display:flex; align-items:center; justify-content:space-between; }
.ld-safety-track { height:10px; background:#e2e8f0; border-radius:999px; overflow:hidden; margin-bottom:4px; }
.ld-safety-fill { height:100%; border-radius:999px; transition:width 0.8s cubic-bezier(0.34,1.56,0.64,1); }
.ld-safety-low   { background:linear-gradient(90deg,#4ade80,#86efac); }
.ld-safety-mid   { background:linear-gradient(90deg,#fbbf24,#fb923c); }
.ld-safety-high  { background:linear-gradient(90deg,#f87171,#dc2626); }
.ld-safety-labels { display:flex; justify-content:space-between; font-family:'Inter',sans-serif; font-size:9px; color:#94a3b8; }

/* ── Max Dose Warning ────────────────────────────────────── */
.ld-max-warning { display:none; background:#fee2e2; border:1px solid #fca5a5; border-radius:10px; padding:10px 12px; margin-bottom:12px; font-family:'Inter',sans-serif; font-size:12px; color:#991b1b; line-height:1.5; }
.ld-max-warning.show { display:block; }

/* ── Mode Panel ──────────────────────────────────────────── */
.ld-panel { display:none; }
.ld-panel.active { display:block; animation:fadeInUp 0.3s ease; }

/* ── Formula Boxes ───────────────────────────────────────── */
.ld-formula-box { background:#1e293b; border-radius:12px; padding:16px 18px; margin-bottom:20px; }
.ld-formula-label { color:#94a3b8; font-size:11px; font-family:'Inter',sans-serif; font-weight:600; text-transform:uppercase; letter-spacing:0.06em; margin-bottom:6px; }
.ld-formula-eq { font-family:'Courier New',monospace; font-size:12px; line-height:2; }
.lf-green  { color:#4ade80; }
.lf-white  { color:#e2e8f0; }
.lf-yellow { color:#facc15; }
.lf-blue   { color:#93c5fd; }
.lf-gray   { color:#64748b; }
.lf-red    { color:#f87171; }

/* ── Reference Tables ────────────────────────────────────── */
.ld-ref-table { width:100%; border-collapse:collapse; border-radius:12px; overflow:hidden; border:1px solid #e2e8f0; margin-bottom:24px; }
.ld-ref-table thead tr { background:#1D3557; }
.ld-ref-table th { text-align:left; padding:10px 10px; font-family:'Lexend',sans-serif; font-weight:600; font-size:11px; color:#fff; }
.ld-ref-table td { padding:8px 10px; font-family:'Inter',sans-serif; font-size:12px; color:#475569; border-bottom:1px solid #f1f5f9; }
.ld-ref-table tbody tr:nth-child(even) { background:#f8fafc; }
.ld-ref-table tbody tr:hover { background:#eff6ff; }
.ld-ref-table tbody tr:last-child td { border-bottom:none; }
.med-name-td { font-weight:600; color:#1D3557; }

/* ── Conversion Chart ────────────────────────────────────── */
.conv-table { width:100%; border-collapse:collapse; border-radius:12px; overflow:hidden; border:1px solid #e2e8f0; margin-bottom:24px; }
.conv-table th { background:#1D3557; color:#fff; padding:9px 12px; font-family:'Lexend',sans-serif; font-size:11px; font-weight:600; text-align:center; }
.conv-table td { padding:8px 12px; font-family:'Inter',sans-serif; font-size:12px; color:#475569; border-bottom:1px solid #f1f5f9; text-align:center; }
.conv-table tbody tr:nth-child(even) { background:#f8fafc; }
.conv-table tbody tr:hover { background:#eff6ff; }

/* ── Tips Grid ───────────────────────────────────────────── */
.tips-grid-ld { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:24px; }
.tip-ld { background:#fff; border:1px solid #e2e8f0; border-radius:12px; padding:16px; }
.tip-icon-ld { font-size:22px; margin-bottom:8px; }
.tip-title-ld { font-family:'Lexend',sans-serif; font-weight:600; color:#1D3557; font-size:14px; margin-bottom:6px; }
.tip-body-ld { font-family:'Inter',sans-serif; font-size:12px; color:#64748b; line-height:1.6; }

/* ── Highlight Box ───────────────────────────────────────── */
.hl-box-ld { background:linear-gradient(135deg,#fff5f5,#fef2f2); border-left:4px solid #E63946; border-radius:0 12px 12px 0; padding:16px 18px; margin-bottom:24px; }
.hl-box-ld p { font-size:13px; margin:0; }

/* ── Hero Badge ──────────────────────────────────────────── */
.ld-hero-badge { display:inline-flex; align-items:center; gap:6px; background:linear-gradient(135deg,#1D3557,#2d4f7f); color:#fff; border-radius:20px; padding:5px 14px; font-size:12px; font-weight:600; font-family:'Lexend',sans-serif; letter-spacing:0.3px; margin-bottom:16px; }

/* ── Stat Strip ──────────────────────────────────────────── */
.stat-strip-ld { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-bottom:24px; }
.stat-box-ld { background:#fff; border:1px solid #e2e8f0; border-radius:10px; padding:12px; text-align:center; }
.stat-num-ld { font-family:'Lexend',sans-serif; font-weight:800; font-size:18px; color:#1D3557; }
.stat-num-ld.red { color:#E63946; }
.stat-lbl-ld { font-family:'Inter',sans-serif; font-size:10px; color:#94a3b8; text-transform:uppercase; letter-spacing:0.04em; margin-top:2px; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width:768px) {
  .ld-equiv-grid { grid-template-columns:repeat(2,1fr); }
  .ld-tabs { gap:2px; }
  .ld-tab { font-size:10px; padding:7px 4px; min-width:70px; }
  .tips-grid-ld { grid-template-columns:1fr; }
  .stat-strip-ld { grid-template-columns:repeat(2,1fr); }
  .ld-primary-val { font-size:42px; }
}
@media (max-width:480px) {
  .ld-equiv-grid { grid-template-columns:repeat(2,1fr); }
}
@media print {
  .ld-tabs,.share-row,.sidebar-card,.calc-btn { display:none !important; }
}