/* ── Accutane / Isotretinoin Dosage Calculator – Styles ─────────────────── */

.acc-calc-wrap {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  max-width: 820px;
  margin: 2rem auto;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 28px rgba(0,0,0,0.08);
  color: #1e293b;
}

/* ── Header ─────────────────────────────────────────────────────────────── */

.acc-calc__header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.acc-calc__icon {
  font-size: 2.4rem;
  line-height: 1;
  flex-shrink: 0;
}

.acc-calc__title {
  font-size: 1.55rem;
  font-weight: 800;
  margin: 0 0 0.25rem;
  color: #0f172a;
}

.acc-calc__desc {
  font-size: 0.88rem;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

/* ── Info / Disclaimer banners ───────────────────────────────────────────── */

.acc-calc__info-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 0.85rem 1.1rem;
  font-size: 0.86rem;
  color: #1e3a8a;
  line-height: 1.6;
  margin-bottom: 0.85rem;
}

.acc-calc__disclaimer-banner {
  background: #fef9c3;
  border: 1.5px solid #fde68a;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 0.83rem;
  color: #78350f;
  line-height: 1.5;
  margin-bottom: 1rem;
}

/* ── Unit toggle ─────────────────────────────────────────────────────────── */

.acc-calc__toggle-wrap {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.4rem;
}

.acc-calc__toggle {
  padding: 0.42rem 1.1rem;
  border: 2px solid #334155;
  border-radius: 6px;
  background: transparent;
  color: #334155;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.acc-calc__toggle--active {
  background: #334155;
  color: #fff;
}

/* ── Fieldsets ───────────────────────────────────────────────────────────── */

.acc-calc__fieldset {
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.2rem 1.4rem;
  margin: 0 0 1.4rem;
}

.acc-calc__legend {
  font-size: 0.9rem;
  font-weight: 800;
  color: #0f172a;
  padding: 0 0.3rem;
}

.acc-calc__legend-opt {
  font-weight: 500;
  color: #64748b;
  font-size: 0.82rem;
}

.acc-calc__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.9rem;
}

.acc-calc__row--3 {
  grid-template-columns: 1fr 1fr 1fr;
}

@media (max-width: 580px) {
  .acc-calc__row,
  .acc-calc__row--3 { grid-template-columns: 1fr; }
}

.acc-calc__field {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.acc-calc__field label {
  font-size: 0.84rem;
  font-weight: 700;
  color: #374151;
}

.acc-calc__field input[type="number"],
.acc-calc__field input[type="date"],
.acc-calc__field select {
  padding: 0.6rem 0.85rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.97rem;
  color: #0f172a;
  background: #f8fafc;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  box-sizing: border-box;
}

.acc-calc__field input:focus,
.acc-calc__field select:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
  background: #fff;
}

.acc-calc__hint {
  font-size: 0.73rem;
  color: #94a3b8;
  line-height: 1.4;
}

/* ── Protocol radio cards ────────────────────────────────────────────────── */

.acc-calc__protocol-label {
  font-size: 0.84rem;
  font-weight: 700;
  color: #374151;
  margin-bottom: 0.6rem;
}

.acc-calc__protocol-group {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
}

@media (max-width: 640px) {
  .acc-calc__protocol-group { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 400px) {
  .acc-calc__protocol-group { grid-template-columns: 1fr; }
}

.acc-calc__protocol-option {
  cursor: pointer;
}

.acc-calc__protocol-option input[type="radio"] {
  display: none;
}

.acc-calc__protocol-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.85rem 0.9rem;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
  height: 100%;
  box-sizing: border-box;
}

.acc-calc__protocol-card strong {
  font-size: 0.86rem;
  color: #0f172a;
}

.acc-calc__protocol-card small {
  font-size: 0.71rem;
  color: #64748b;
  line-height: 1.4;
}

.acc-calc__protocol-option input[type="radio"]:checked + .acc-calc__protocol-card {
  border-color: #7c3aed;
  background: #f5f3ff;
}

.acc-calc__protocol-option input[type="radio"]:checked + .acc-calc__protocol-card strong {
  color: #7c3aed;
}

/* ── Capsule strength checkboxes ─────────────────────────────────────────── */

.acc-calc__strength-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.acc-calc__strength-option {
  cursor: pointer;
}

.acc-calc__strength-option input[type="checkbox"] {
  display: none;
}

.acc-calc__strength-card {
  display: inline-block;
  padding: 0.45rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 0.88rem;
  font-weight: 700;
  color: #374151;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.acc-calc__strength-option input[type="checkbox"]:checked + .acc-calc__strength-card {
  border-color: #7c3aed;
  background: #f5f3ff;
  color: #7c3aed;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.acc-calc__btn-wrap {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.acc-calc__btn {
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 8px;
  background: #7c3aed;
  color: #fff;
  font-size: 0.97rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.acc-calc__btn:hover  { background: #6d28d9; }
.acc-calc__btn:active { transform: scale(0.97); }

.acc-calc__btn--reset {
  background: #e2e8f0;
  color: #334155;
}
.acc-calc__btn--reset:hover { background: #cbd5e1; }

/* ── Results section ─────────────────────────────────────────────────────── */

.acc-calc__results {
  margin-top: 2rem;
  border-top: 2px solid #f1f5f9;
  padding-top: 1.75rem;
}

.acc-calc__results-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 1.1rem;
}

/* Status card */
.acc-calc__status-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  background: #f5f3ff;
  border: 2px solid #ddd6fe;
  margin-bottom: 1.25rem;
  transition: background 0.3s, border-color 0.3s;
}

.acc-calc__status-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.acc-calc__status-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.acc-calc__status-headline {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
}

.acc-calc__status-sub {
  font-size: 0.84rem;
  color: #64748b;
  line-height: 1.4;
}

/* Results cards grid */
.acc-calc__results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
  margin-bottom: 1.5rem;
}

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

@media (max-width: 380px) {
  .acc-calc__results-grid { grid-template-columns: 1fr; }
}

.acc-calc__result-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.acc-calc__result-card--highlight {
  background: #f5f3ff;
  border-color: #c4b5fd;
}

.acc-calc__result-card--green {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.acc-calc__result-card--amber {
  background: #fffbeb;
  border-color: #fde68a;
}

.acc-calc__result-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #64748b;
}

.acc-calc__result-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
}

.acc-calc__result-sub {
  font-size: 0.72rem;
  color: #94a3b8;
  line-height: 1.4;
}

/* ── Capsule combination box ─────────────────────────────────────────────── */

.acc-calc__capsule-box {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.1rem 1.3rem;
  margin-bottom: 1.5rem;
}

.acc-calc__capsule-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: #374151;
  margin: 0 0 0.75rem;
}

.acc-calc__capsule-combo {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.acc-calc__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #7c3aed;
  color: #fff;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
}

.acc-calc__pill--alt {
  background: #ede9fe;
  color: #7c3aed;
}

.acc-calc__pill-plus {
  font-size: 1.1rem;
  color: #64748b;
  font-weight: 700;
}

.acc-calc__pill-equals {
  font-size: 0.9rem;
  color: #374151;
  font-weight: 700;
}

/* ── Progress bar ────────────────────────────────────────────────────────── */

.acc-calc__progress-wrap {
  margin-bottom: 1.5rem;
}

.acc-calc__progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.acc-calc__progress-label {
  font-size: 0.84rem;
  font-weight: 700;
  color: #374151;
}

.acc-calc__progress-pct {
  font-size: 0.9rem;
  font-weight: 800;
  color: #7c3aed;
}

.acc-calc__progress-bar-track {
  height: 18px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.acc-calc__progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #a78bfa);
  border-radius: 999px;
  transition: width 0.6s ease;
}

.acc-calc__progress-sub {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 0.4rem;
  line-height: 1.5;
}

/* ── Monthly schedule table ──────────────────────────────────────────────── */

.acc-calc__table-wrap {
  margin-bottom: 1rem;
  overflow-x: auto;
}

.acc-calc__table-title {
  font-size: 0.84rem;
  font-weight: 800;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.65rem;
}

.acc-calc__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.acc-calc__table th {
  background: #f1f5f9;
  padding: 0.5rem 0.75rem;
  text-align: left;
  font-size: 0.76rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid #e2e8f0;
}

.acc-calc__table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #f1f5f9;
  color: #374151;
}

.acc-calc__table tr.acc-row--complete td {
  color: #15803d;
  font-weight: 700;
}

.acc-calc__table tr.acc-row--current {
  background: #fef9c3;
  font-weight: 700;
}

/* ── Facts panel ─────────────────────────────────────────────────────────── */

.acc-calc__facts {
  margin-top: 1.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem 1.4rem;
}

.acc-calc__facts-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #374151;
  margin: 0 0 0.9rem;
}

.acc-calc__facts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

@media (max-width: 520px) {
  .acc-calc__facts-grid { grid-template-columns: 1fr; }
}

.acc-calc__fact {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.82rem;
  color: #475569;
  line-height: 1.5;
}

.acc-calc__fact strong {
  font-size: 0.85rem;
  color: #0f172a;
}

/* ── Footnote / Error ────────────────────────────────────────────────────── */

.acc-calc__footnote {
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.6;
  margin-top: 1rem;
}

.acc-calc__error {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  color: #b91c1c;
  font-size: 0.9rem;
  font-weight: 600;
}
