/* ==========================================================================
   INTERACTIVE TOOLS CSS: Water Calculator, WOMAC Test, Nutrient Checklist
   ========================================================================== */

/* Tabs Control */
.interactive-tabs-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
  background: var(--slate-100);
  padding: 6px;
  border-radius: var(--radius-xl);
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.tab-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--slate-600);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--slate-900);
}

.tab-btn.active {
  background-color: #ffffff;
  color: var(--primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease-in-out forwards;
}

.tab-content.active {
  display: block;
}

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

@media (max-width: 680px) {
  .interactive-tabs-nav {
    flex-direction: column;
    gap: 6px;
    border-radius: var(--radius-lg);
  }
  .tab-btn {
    width: 100%;
    justify-content: flex-start;
  }
}

/* ---------------- TAB 1: WATER CALCULATOR ---------------- */
.calculator-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  max-width: 900px;
  margin: 0 auto;
}

.calc-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.calc-group {
  margin-bottom: 28px;
}

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

.calc-label {
  font-weight: 700;
  font-size: 1rem;
  color: var(--slate-900);
}

.calc-value-badge {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 14px;
  border-radius: var(--radius-full);
}

/* Range Slider */
.custom-range {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--slate-200);
  outline: none;
  transition: background var(--transition-fast);
}

.custom-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(15, 118, 110, 0.4);
  border: 3px solid #ffffff;
  transition: transform var(--transition-fast);
}

.custom-range::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.custom-range::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(15, 118, 110, 0.4);
  border: 3px solid #ffffff;
}

.range-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--slate-400);
  font-weight: 600;
}

/* Radio Group Chips */
.chip-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.chip-option {
  position: relative;
}

.chip-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 12px 10px;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--slate-700);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.chip-option input[type="radio"]:checked + .chip-label {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 700;
}

/* Calculator Result Side */
.calc-result-box {
  background: linear-gradient(135deg, #f0fdfa 0%, #e6fffa 100%);
  border: 2px solid rgba(15, 118, 110, 0.2);
  border-radius: var(--radius-lg);
  padding: 30px;
  text-align: center;
  position: relative;
}

.calc-water-glass-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px auto;
  color: var(--primary);
}

.calc-result-title {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate-600);
  margin-bottom: 6px;
}

.calc-result-number {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 4px;
}

.calc-result-unit {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--slate-600);
  margin-bottom: 24px;
}

/* Hourly Breakdown Chart */
.calc-schedule {
  border-top: 1px solid rgba(15, 118, 110, 0.15);
  padding-top: 20px;
  text-align: left;
}

.calc-schedule-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--slate-700);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.schedule-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(15, 118, 110, 0.15);
  font-size: 0.875rem;
}

.schedule-row:last-child {
  border-bottom: none;
}

.schedule-time {
  font-weight: 600;
  color: var(--slate-700);
  display: flex;
  align-items: center;
  gap: 6px;
}

.schedule-amount {
  font-weight: 800;
  color: var(--primary);
}

@media (max-width: 860px) {
  .calc-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

/* ---------------- TAB 2: WOMAC TEST ---------------- */
.womac-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  max-width: 860px;
  margin: 0 auto;
}

.womac-progress-bar-wrap {
  width: 100%;
  height: 8px;
  background: var(--slate-100);
  border-radius: 4px;
  margin-bottom: 30px;
  overflow: hidden;
}

.womac-progress-bar-fill {
  height: 100%;
  width: 20%;
  background: linear-gradient(90deg, #0f766e, #14b8a6);
  transition: width 0.4s ease;
}

.womac-question-container {
  margin-bottom: 30px;
}

.womac-q-num {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.womac-q-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 24px;
  line-height: 1.35;
}

.womac-answers-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.womac-answer-item {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  background: #ffffff;
}

.womac-answer-item:hover {
  background: var(--slate-50);
  border-color: var(--slate-400);
}

.womac-answer-item.selected {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 700;
}

.womac-answer-radio {
  margin-right: 14px;
  accent-color: var(--primary);
}

.womac-nav-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--slate-200);
}

/* WOMAC Results */
.womac-result-box {
  display: none;
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 30px;
  border: 2px solid var(--slate-200);
  text-align: center;
  animation: fadeIn 0.4s ease-in-out forwards;
}

.womac-score-display {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--primary);
  margin-bottom: 12px;
}

.womac-score-max {
  font-size: 1.25rem;
  color: var(--slate-400);
  font-weight: 600;
}

.womac-phase-tag {
  display: inline-block;
  padding: 6px 18px;
  border-radius: var(--radius-full);
  font-size: 0.9375rem;
  font-weight: 800;
  margin-bottom: 20px;
}

.womac-phase-1 { background: #dcfce7; color: #15803d; }
.womac-phase-2 { background: #fef3c7; color: #b45309; }
.womac-phase-3 { background: #fee2e2; color: #b91c1c; }

.womac-doctor-advice {
  background: var(--slate-50);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: left;
  border-left: 4px solid var(--primary);
  margin-bottom: 28px;
}

.womac-doctor-advice-title {
  font-size: 1.0625rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.womac-doctor-advice-text {
  font-size: 0.9375rem;
  color: var(--slate-700);
  line-height: 1.6;
}

/* ---------------- TAB 3: NUTRIENT DEFICIENCIES CHECKLIST ---------------- */
.checklist-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}

.symptom-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 28px;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.symptom-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.symptom-card.active {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: var(--shadow-lg);
}

.symptom-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.symptom-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--slate-100);
  color: var(--slate-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  transition: all var(--transition-fast);
}

.symptom-card.active .symptom-icon {
  background: var(--primary-light);
  color: var(--primary);
}

.symptom-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--slate-900);
}

.symptom-subtitle {
  font-size: 0.875rem;
  color: var(--slate-500);
}

.symptom-description {
  font-size: 0.9375rem;
  color: var(--slate-600);
  line-height: 1.55;
  margin-bottom: 16px;
}

.symptom-solution-revealer {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: all 0.35s ease;
  background: var(--primary-light);
  border-radius: var(--radius-md);
  border: 1px solid rgba(15, 118, 110, 0.2);
}

.symptom-card.active .symptom-solution-revealer {
  max-height: 200px;
  opacity: 1;
  padding: 16px;
  margin-top: 14px;
}

.solution-molecule {
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.solution-effect {
  font-size: 0.875rem;
  color: var(--slate-800);
  line-height: 1.45;
}

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