/* UTI Calculator - Page-specific styles */

/* ── Temperature unit toggle ───────────────────────────────── */
.temp-input {
  display: flex;
  gap: var(--s-2);
  align-items: stretch;
}

.temp-input input {
  flex: 1;
}

.unit-toggle {
  display: flex;
  background: var(--c-border-light);
  border-radius: var(--r-sm);
  padding: 2px;
  gap: 2px;
}

.unit-btn {
  flex: 1;
  padding: var(--s-2) var(--s-3);
  border: none;
  background: transparent;
  color: var(--c-text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--r-xs);
  transition: all var(--dur) var(--ease);
}

.unit-btn:hover {
  color: var(--c-text);
}

.unit-btn.active {
  background: var(--c-bg);
  color: var(--c-primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ── Radio and checkbox groups ────────────────────────────── */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--text-sm);
  cursor: pointer;
}

.radio-group input[type="radio"],
.radio-group input[type="checkbox"] {
  width: auto;
  height: auto;
  accent-color: var(--c-primary);
  cursor: pointer;
}

/* ── Callout box for canonical tool ────────────────────────── */
.callout {
  padding: var(--s-4) var(--s-5);
  border-radius: var(--r-md);
  margin-bottom: var(--s-6);
  border-left: 4px solid;
}

.callout-warn {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
}

.callout a {
  color: #b45309;
  font-weight: 600;
  text-decoration: underline;
}

.callout a:hover {
  color: #78350f;
}

/* ── Risk banners ──────────────────────────────────────────── */
.risk-banner {
  padding: var(--s-4) var(--s-5);
  border-radius: var(--r-md);
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--s-4);
  text-align: center;
  line-height: 1.5;
}

.risk-banner.level-ok {
  background: var(--c-green-soft);
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.risk-banner.level-warn {
  background: var(--c-amber-soft);
  color: #92400e;
  border: 1px solid #fde68a;
}

.risk-banner.level-risk-high {
  background: var(--c-red-soft);
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* ── Result grid ───────────────────────────────────────────── */
.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: var(--s-4);
  margin-bottom: var(--s-6);
}

.result-item {
  background: var(--c-border-light);
  padding: var(--s-4) var(--s-3);
  border-radius: var(--r-md);
  text-align: center;
}

.result-value {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--c-primary);
  margin-bottom: var(--s-1);
}

.result-label {
  font-size: var(--text-sm);
  color: var(--c-text-secondary);
  font-weight: 500;
}

/* ── Post-test section ────────────────────────────────────── */
#postTestSection h3 {
  margin-bottom: var(--s-4);
  font-size: var(--text-lg);
}

/* ── Button sizing ────────────────────────────────────────── */
.btn-sm {
  padding: var(--s-2) var(--s-3);
  font-size: var(--text-sm);
}

/* ── Mobile responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
  .temp-input {
    flex-direction: column;
  }

  .unit-toggle {
    width: 100%;
  }

  .result-grid {
    grid-template-columns: 1fr;
  }

  .callout {
    padding: var(--s-3) var(--s-4);
    font-size: var(--text-sm);
  }
}
