/* ════════ DIGITAL WELLBEING CALCULATOR STYLES ════════ */

:root {
  --tool-emerald: #10b981;
  --tool-emerald-hover: #059669;
  --tool-emerald-soft: rgba(16, 185, 129, 0.08);
  --tool-emerald-glow: rgba(16, 185, 129, 0.2);
  --wellbeing-zen: #10b981;
  --wellbeing-moderate: #3b82f6;
  --wellbeing-warning: #f59e0b;
  --wellbeing-danger: #ef4444;
}

body.light {
  --tool-emerald: #059669;
  --tool-emerald-hover: #047857;
  --tool-emerald-soft: rgba(5, 150, 105, 0.08);
  --tool-emerald-glow: rgba(5, 150, 105, 0.2);
  --wellbeing-zen: #059669;
  --wellbeing-moderate: #2563eb;
  --wellbeing-warning: #d97706;
  --wellbeing-danger: #dc2626;
}

/* ─── HERO GRADIENT SPAN OVERRIDE ─── */
.tool-header h1 span {
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.light .tool-header h1 span {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ─── CONTAINER UI STANDARD WIDTH ─── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 100px;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
}

/* ─── LAYOUT GRID RATIO ─── */
.tool-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}

@media (max-width: 1024px) {
  .tool-layout {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }
}

/* ─── PRIVACY BANNER ─── */
.privacy-disclaimer-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--tool-emerald-soft);
  border: 1px solid var(--tool-emerald-glow);
  border-radius: 14px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
}

body.light .privacy-disclaimer-banner {
  background: rgba(5, 150, 105, 0.06) !important;
  border-color: rgba(5, 150, 105, 0.2) !important;
}

.privacy-icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}

.privacy-text {
  font-family: 'Figtree', sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
}

body.light .privacy-text {
  color: #334155;
}

.privacy-text strong {
  color: var(--tool-emerald);
  font-weight: 700;
}

body.light .privacy-text strong {
  color: #059669;
}

/* ─── INPUT FORM & SLIDERS ─── */
.wellbeing-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 640px) {
  .wellbeing-form-grid {
    grid-template-columns: 1fr;
  }
}

.input-card {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body.light .input-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.input-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

body.light .input-label {
  color: #475569;
}

.input-value-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 800;
  color: var(--tool-emerald);
}

body.light .input-value-badge {
  color: #059669;
}

.wellbeing-slider {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}

body.light .wellbeing-slider {
  background: #e2e8f0;
}

.wellbeing-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--tool-emerald);
  box-shadow: 0 0 10px var(--tool-emerald-glow);
  cursor: pointer;
  transition: transform 0.15s ease;
}

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

.wellbeing-select, .wellbeing-number-input {
  height: 42px;
  padding: 0 14px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13.5px;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}

body.light .wellbeing-select, body.light .wellbeing-number-input {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
  color: #0f172a;
}

/* ─── SCORECARD GRID ─── */
.wellbeing-scorecard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  width: 100%;
  margin-bottom: 20px;
}

@media (max-width: 640px) {
  .wellbeing-scorecard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.counter-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  box-sizing: border-box;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  min-height: 90px;
}

.counter-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
}

body.light .counter-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.02);
}

.counter-title {
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}

body.light .counter-title {
  color: #64748b;
}

.counter-value {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.3;
}

body.light .counter-value {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ─── SEGMENTED VIEW TABS ─── */
.view-tabs {
  position: relative;
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 18px;
}

body.light .view-tabs {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.08);
}

.tab-indicator {
  position: absolute;
  top: 4px;
  height: calc(100% - 8px);
  left: 0;
  width: 0;
  background: var(--tool-emerald);
  border-radius: 8px;
  box-shadow: 0 4px 14px var(--tool-emerald-glow);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 1;
}

.view-tab-btn {
  position: relative;
  z-index: 2;
  flex: 1;
  padding: 9px 12px;
  background: transparent !important;
  border: none;
  border-radius: 8px;
  color: var(--text-2);
  font-family: 'Outfit', sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.25s ease;
  text-align: center;
  box-shadow: none !important;
  white-space: nowrap;
}

body.light .view-tab-btn {
  color: #64748b;
}

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

/* ─── RESULTS CARDS & AUDIT PANES ─── */
.results-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  width: 100%;
}

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

.result-card {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.2s ease;
}

body.light .result-card {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03) !important;
}

.result-label {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

body.light .result-label {
  color: #64748b;
}

.result-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

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

/* ─── SCORE BANNER ─── */
.score-banner-card {
  margin-bottom: 20px;
  padding: 22px 26px;
  background: var(--tool-emerald-soft);
  border: 1px solid var(--tool-emerald-glow);
  border-radius: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

body.light .score-banner-card {
  background: rgba(5, 150, 105, 0.05) !important;
  border-color: rgba(5, 150, 105, 0.18) !important;
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.04);
}

.score-badge {
  padding: 8px 18px;
  border-radius: 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 800;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ─── CATEGORY PROGRESS BAR ─── */
.cat-progress-wrapper {
  margin-bottom: 12px;
}

.cat-progress-header {
  display: flex;
  justify-content: space-between;
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-2);
}

body.light .cat-progress-header {
  color: #475569;
}

.cat-progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

body.light .cat-progress-bar {
  background: #e2e8f0;
}

.cat-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

/* ─── DETOX TIPS & ACTION ITEMS ─── */
.detox-item-card {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 10px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

body.light .detox-item-card {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02) !important;
}

.detox-icon {
  font-size: 22px;
  flex-shrink: 0;
  margin-top: 2px;
}

.detox-title {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

body.light .detox-title {
  color: #0f172a;
}

.detox-desc {
  font-family: 'Figtree', sans-serif;
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.45;
}

body.light .detox-desc {
  color: #475569;
}

/* ─── 7-DAY CHALLENGE CHECKLIST ─── */
.challenge-item-card {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

body.light .challenge-item-card {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02) !important;
}

.challenge-item-card.completed {
  border-color: var(--tool-emerald-glow) !important;
  background: var(--tool-emerald-soft) !important;
}

body.light .challenge-item-card.completed {
  background: rgba(5, 150, 105, 0.08) !important;
  border-color: rgba(5, 150, 105, 0.25) !important;
}

.challenge-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #ffffff;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

body.light .challenge-checkbox {
  border-color: rgba(15, 23, 42, 0.2);
}

.challenge-item-card.completed .challenge-checkbox {
  background: var(--tool-emerald);
  border-color: var(--tool-emerald);
}

.challenge-day-tag {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 800;
  color: var(--tool-emerald);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

body.light .challenge-day-tag {
  color: #059669;
}

.challenge-title {
  font-family: 'Outfit', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}

body.light .challenge-title {
  color: #0f172a;
}

/* ─── TOOLBOX BUTTONS ─── */
.toolbox-btn {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  font-family: 'Figtree', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.toolbox-btn:hover {
  border-color: var(--tool-emerald-glow);
  background: var(--tool-emerald-soft);
  color: var(--tool-emerald);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.12);
}

body.light .toolbox-btn {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: #334155;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

body.light .toolbox-btn:hover {
  background: var(--tool-emerald-soft);
  border-color: var(--tool-emerald);
  color: var(--tool-emerald);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.1);
}

/* ─── MOBILE RESPONSIVENESS OVERRIDES ─── */
@media (max-width: 768px) {
  .container {
    padding: 0 14px 60px;
  }

  .view-tabs {
    flex-wrap: wrap;
    gap: 4px;
  }

  .view-tab-btn {
    flex: 1 1 45%;
    font-size: 11px;
    padding: 8px 4px;
  }
}
