/* ============================================================
   BMI CALCULATOR — bmi-calculator.css
   Tailored responsive glassmorphism styles for Health & Wellness
   Toolspot by Tradesala
   ============================================================ */

.container {
  --tool-red: var(--red);
  --tool-red-soft: var(--red-soft);
}

/* Custom coloring overrides for standard components in container */
.container .value-badge {
  border-color: rgba(249, 115, 22, 0.25);
}

#height-imperial-group .value-badge {
  font-size: 12px;
  padding: 0 8px;
  min-width: 50px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  line-height: 1;
}

.mode-toggle {
  position: relative;
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  z-index: 1;
  transition: all 0.3s ease;
}

.mode-toggle::before {
  content: '';
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 6px);
  background: var(--tool-red);
  border-radius: 8px;
  transition: transform 0.28s cubic-bezier(0.25, 1, 0.5, 1);
  z-index: 0;
  box-shadow: 0 4px 12px var(--red-glow);
}

.mode-toggle.active-imperial::before,
.mode-toggle.active-global::before {
  transform: translateX(calc(100% + 4px));
}

.mode-btn {
  position: relative;
  z-index: 2;
  flex: 1;
  background: transparent !important;
  border: none;
  padding: 10px 16px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 8px;
  box-shadow: none !important;
  transition: color 0.28s cubic-bezier(0.25, 1, 0.5, 1), 
              transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

.mode-btn.active {
  color: #ffffff !important;
}

.mode-btn:active {
  transform: scale(0.97);
}

body.light .mode-toggle {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.06);
}

body.light .mode-toggle::before {
  background: var(--tool-red);
  box-shadow: 0 4px 10px rgba(249, 115, 22, 0.15);
}

body.light .mode-btn {
  color: #475569;
}

body.light .mode-btn:hover {
  color: #0f172a;
}

body.light .mode-btn.active {
  color: #ffffff !important;
}

/* ── Result KPI Hero ── */
.result-hero {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.04) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

body.light .result-hero {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.01) 0%, rgba(0, 0, 0, 0.03) 100%);
  border-color: rgba(0, 0, 0, 0.06);
}

.bmi-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.result-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-2);
}

.result-val {
  font-family: 'Outfit', sans-serif;
  font-size: 48px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  margin-bottom: 8px;
}

.result-standard-lbl {
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.5px;
}

body.light .result-val {
  color: #0f172a;
}

/* ── Risk Badge Slabs ── */
.risk-badge {
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.risk-underweight {
  background: rgba(96, 165, 250, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.3);
}

.risk-normal {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.risk-overweight {
  background: rgba(251, 146, 60, 0.15);
  color: #fb923c;
  border: 1px solid rgba(251, 146, 60, 0.3);
}

.risk-obese {
  background: rgba(248, 113, 113, 0.15);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.3);
}

body.light .risk-underweight { background: rgba(59, 130, 246, 0.1); color: #2563eb; }
body.light .risk-normal { background: rgba(16, 185, 129, 0.1); color: #059669; }
body.light .risk-overweight { background: rgba(249, 115, 22, 0.1); color: #d97706; }
body.light .risk-obese { background: rgba(220, 38, 38, 0.1); color: #dc2626; }

/* ── Spectrum Visualizer ── */
.spectrum-container {
  width: 100%;
}

.spectrum-labels {
  position: relative;
  height: 16px;
  font-size: 9px;
  font-weight: 700;
  color: var(--text-3);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.spectrum-labels span {
  position: absolute;
  transform: translateX(-50%);
  white-space: nowrap;
}

.spectrum-bar {
  height: 12px;
  border-radius: 6px;
  position: relative;
  background: linear-gradient(to right, 
    #60a5fa 0%, #60a5fa 11.67%, 
    #34d399 11.67%, #34d399 26.67%, 
    #fb923c 26.67%, #fb923c 33.33%, 
    #f87171 33.33%, #f87171 50%,
    #ef4444 50%, #ef4444 66.67%,
    #b91c1c 66.67%, #b91c1c 100%
  );
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.4);
}

body.light .spectrum-bar {
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.15);
}

.pointer {
  position: absolute;
  top: -4px;
  width: 20px;
  height: 20px;
  background: #ffffff;
  border: 4px solid var(--bg);
  border-radius: 50%;
  transform: translateX(-50%);
  transition: left 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 2px 6px rgba(0,0,0,0.4), 0 0 12px rgba(255,255,255,0.4);
}

body.light .pointer {
  border-color: #ffffff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.spectrum-markers {
  display: flex;
  position: relative;
  height: 20px;
  margin-top: 6px;
}

.spectrum-markers span {
  position: absolute;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--text-3);
  font-weight: 700;
}

/* ── Healthy weight range details card ── */
.ideal-weight-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 16px;
}

body.light .ideal-weight-card {
  background: rgba(0, 0, 0, 0.015);
  border-color: rgba(0, 0, 0, 0.06);
}

.card-inner-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ideal-col {
  flex: 1;
  text-align: center;
}

.ideal-divider {
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.08);
}

body.light .ideal-divider {
  background: rgba(0, 0, 0, 0.08);
}

.col-lbl {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-3);
  margin-bottom: 4px;
}

.col-val {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}

body.light .col-val {
  color: #0f172a;
}

/* ── Risk Subcards WHtR & Goals ── */
.risk-subcard {
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  animation: fadeIn 0.4s ease forwards;
}

.badge-active {
  background: var(--red-soft);
  color: var(--red2);
  border: 1px solid rgba(251, 146, 60, 0.3);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
