/* ============================================================
   IV Drip Rate Calculator — calculator-specific styles
   Depends on shared.css for theme tokens and base components.
   ============================================================ */

.calc-shell--wide {
  max-width: 640px;
}

/* ---------- Two-column input grid ---------- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 18px;
}
.grid-2 .field { margin-bottom: 0; }

@media (max-width: 560px) {
  .grid-2 { grid-template-columns: 1fr; }
}

/* Checkbox row aligned to sit like an input control */
.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
}
.check-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex-shrink: 0;
  cursor: pointer;
}

/* ---------- Result panel ---------- */
.calc-result {
  margin-top: 24px;
  padding: 24px 22px;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  text-align: center;
}

.calc-result__label {
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.calc-result__big {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
}

.calc-result__hint {
  margin: 12px 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.calc-result__hint .calc-result__hint-val {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 600;
  color: var(--text);
}

/* ---------- Info card ---------- */
.info-card {
  margin-top: 18px;
  padding: 18px 22px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.info-card p { margin: 0; }
.info-card strong { color: var(--text); font-weight: 600; }

/* ---------- Converter card ---------- */
.converter-card {
  margin-top: 24px;
  padding: 20px 22px;
}

.converter-card h2 {
  margin: 0 0 14px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.converter-card .step__label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.converter-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.converter-row input[type="number"] {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1.5px solid var(--border-strong);
  border-radius: 8px;
  -moz-appearance: textfield;
}
.converter-row input[type="number"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}
.converter-row input::-webkit-outer-spin-button,
.converter-row input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.converter-row .equals {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
}

.converter-row .conv-out {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-align: right;
}

/* ---------- Quick table ---------- */
.rate-table {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.rate-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.rate-grid .cell {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text);
}
.rate-grid .cell:nth-last-child(-n+2) { border-bottom: 0; }

.rate-grid .cell.th {
  background: var(--bg-subtle);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.rate-grid .cell:nth-child(2n) {
  border-left: 1px solid var(--border);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  color: var(--accent);
  font-weight: 600;
}

/* ---------- Below-tool reference section ---------- */
.section-divider {
  max-width: 720px;
  margin: 56px auto 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.reference {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 22px 8px;
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.95rem;
}

.reference h2 {
  margin: 0 0 10px;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.reference h3 {
  margin: 24px 0 6px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.reference p { margin: 0 0 12px; }
.reference strong { color: var(--text); font-weight: 600; }

.reference .ref-formula {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  overflow-x: auto;
}

.reference .ref-disclaimer {
  font-size: 0.85rem;
  border-left: 3px solid var(--border-strong);
  padding-left: 14px;
}

/* ---------- Footer disclaimer ---------- */
.footer-disclaimer {
  max-width: 720px;
  margin: 0 auto 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .calc-shell.calc-shell--wide {
    padding: 0 16px;
    margin-top: 80px;
  }
  .calc-result__big { font-size: 2rem; }
  .converter-row input[type="number"],
  .converter-row .conv-out { font-size: 0.9rem; }
  .reference { padding: 28px 16px 8px; }
  .section-divider { margin-top: 40px; }
}
