/* BooksOfMedical calculator UI. Loaded only on pages with a bom shortcode. */
.bom-calc { background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 22px; margin: 20px 0; box-shadow: 0 8px 24px rgba(15,42,61,.05); }
.bom-calc h2, .bom-calc h3 { margin-top: 0; }
.bom-calc .bom-unit-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.bom-calc .bom-unit-row label { font-size: 13px; font-weight: 700; color: #475569; }
.bom-calc .bom-unit-row select { height: 40px; border: 1px solid #cbd5e1; border-radius: 9px; padding: 0 10px; background: #fff; font: inherit; }
.bom-field { margin-bottom: 14px; }
.bom-field label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 5px; color: #0f2a3d; }
.bom-field input, .bom-field select { width: 100%; height: 44px; border: 1px solid #cbd5e1; border-radius: 10px; padding: 0 12px; font: inherit; background: #fff; color: #1e293b; }
.bom-field input:focus, .bom-field select:focus { border-color: #0e7490; box-shadow: 0 0 0 3px rgba(14,116,144,.15); outline: none; }
.bom-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .bom-field-row { grid-template-columns: 1fr; } }
.bom-field .bom-hint { font-size: 12px; color: #64748b; font-weight: 400; margin-top: 3px; }
.bom-btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.bom-btn { border: 0; border-radius: 10px; padding: 12px 20px; font-weight: 700; font-size: 15px; cursor: pointer; }
.bom-btn-primary { background: #0e7490; color: #fff; }
.bom-btn-primary:hover { background: #0d9488; }
.bom-btn-secondary { background: #f1f5f9; color: #0f2a3d; border: 1px solid #e2e8f0; }
.bom-result { display: none; margin-top: 18px; border-radius: 12px; padding: 18px 20px; background: #f0fdfa; border: 1px solid #99f6e4; }
.bom-result.bom-show { display: block; }
.bom-result .bom-result-value { font-size: 34px; font-weight: 800; color: #0f2a3d; line-height: 1.1; }
.bom-result .bom-result-value small { font-size: 16px; font-weight: 700; color: #475569; }
.bom-result .bom-result-label { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #0e7490; }
.bom-result .bom-result-cat { display: inline-block; margin-top: 8px; background: #0f2a3d; color: #fff; border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 700; }
.bom-result p { margin: 10px 0 0; font-size: 14px; color: #334155; }
.bom-result table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; }
.bom-result th, .bom-result td { border: 1px solid #ccfbf1; padding: 7px 9px; text-align: left; }
.bom-result th { background: #ccfbf1; }
.bom-error { display: none; margin-top: 14px; background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; border-radius: 10px; padding: 12px 14px; font-size: 14px; }
.bom-error.bom-show { display: block; }
.bom-disclaimer { margin-top: 16px; font-size: 12.5px; color: #64748b; border-top: 1px solid #f1f5f9; padding-top: 12px; }
@media print {
  body * { visibility: hidden; }
  .bom-result, .bom-result * { visibility: visible; }
  .bom-result { position: absolute; left: 0; top: 0; width: 100%; border: 0; }
}

/* --- v2.2 dark mode: calculator UI (style.css carries the site-wide rules) --- */
html[data-theme="dark"] .bom-calc { background: #1e293b; border-color: #334155; color: #e2e8f0; box-shadow: none; }
html[data-theme="dark"] .bom-calc h2, html[data-theme="dark"] .bom-calc h3 { color: #e2e8f0; }
html[data-theme="dark"] .bom-field label { color: #e2e8f0; }
html[data-theme="dark"] .bom-field input, html[data-theme="dark"] .bom-field select, html[data-theme="dark"] .bom-calc .bom-unit-row select { background: #0f172a; color: #e2e8f0; border-color: #475569; }
html[data-theme="dark"] .bom-field input::placeholder { color: #94a3b8; }
html[data-theme="dark"] .bom-field .bom-hint, html[data-theme="dark"] .bom-calc .bom-unit-row label { color: #94a3b8; }
html[data-theme="dark"] .bom-btn-secondary { background: #334155; color: #e2e8f0; border-color: #475569; }
html[data-theme="dark"] .bom-result { background: #134e4a; border-color: #2dd4bf; }
html[data-theme="dark"] .bom-result .bom-result-value { color: #f0fdfa; }
html[data-theme="dark"] .bom-result .bom-result-value small { color: #99f6e4; }
html[data-theme="dark"] .bom-result .bom-result-label { color: #5eead4; }
html[data-theme="dark"] .bom-result p { color: #ccfbf1; }
html[data-theme="dark"] .bom-result th, html[data-theme="dark"] .bom-result td { border-color: #0f766e; color: #e2e8f0; }
html[data-theme="dark"] .bom-result th { background: #155e75; }
html[data-theme="dark"] .bom-result .bom-result-cat { background: #0f172a; color: #e2e8f0; }
html[data-theme="dark"] .bom-error { background: #450a0a; border-color: #7f1d1d; color: #fecaca; }
html[data-theme="dark"] .bom-disclaimer { color: #94a3b8; border-top-color: #334155; }
