/* css/wellness.css — Mira Wellness UI */

/* ─── Breathing Exercise ─── */

#wellness-breathing {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9000;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  pointer-events: auto;
}

#wellness-breathing.active { display: flex; }

.breathing-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--nal-sage), var(--nal-purple));
  opacity: 0.8;
  animation: breathe-478 19s infinite ease-in-out;
  box-shadow: 0 0 40px rgba(158, 200, 167, 0.3);
}

.breathing-text {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--chrome-text);
  opacity: 0.8;
  text-align: center;
  min-height: 20px;
}

/* 4-7-8 breathing: inhale 4s, hold 7s, exhale 8s = 19s cycle */
@keyframes breathe-478 {
  0%       { transform: scale(0.6); opacity: 0.5; }
  21%      { transform: scale(1.0); opacity: 0.9; }  /* inhale 4s */
  58%      { transform: scale(1.0); opacity: 0.9; }  /* hold 7s */
  100%     { transform: scale(0.6); opacity: 0.5; }  /* exhale 8s */
}

/* Box breathing: 4x4s = 16s cycle */
@keyframes breathe-box {
  0%       { transform: scale(0.6); opacity: 0.5; }
  25%      { transform: scale(1.0); opacity: 0.9; }
  50%      { transform: scale(1.0); opacity: 0.7; }
  75%      { transform: scale(0.6); opacity: 0.5; }
  100%     { transform: scale(0.6); opacity: 0.5; }
}

/* Degraded breathing (Act 1+) — irregular */
@keyframes breathe-glitch {
  0%       { transform: scale(0.6); opacity: 0.5; }
  15%      { transform: scale(1.1); opacity: 1.0; }
  20%      { transform: scale(0.9); opacity: 0.6; }
  25%      { transform: scale(1.0); opacity: 0.9; }
  60%      { transform: scale(1.0); opacity: 0.85; }
  65%      { transform: scale(1.05); opacity: 0.95; }
  100%     { transform: scale(0.6); opacity: 0.5; }
}

.breathing-close {
  position: absolute;
  top: -30px;
  right: -30px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: none;
  color: var(--chrome-dim);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─── Mood Tracker ─── */

#wellness-mood {
  display: none;
  padding: 12px 16px;
  border-top: 1px solid hsl(263 12% 22%);
}

#wellness-mood.active { display: block; }

.mood-question {
  font-size: 12px;
  color: var(--chrome-dim);
  margin-bottom: 8px;
}

.mood-options {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.mood-btn {
  font-size: 24px;
  background: none;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  padding: 4px 8px;
  transition: all 0.2s;
  filter: grayscale(0.3);
}

.mood-btn:hover {
  transform: scale(1.2);
  filter: grayscale(0);
  border-color: var(--nal-sage);
}

.mood-btn.selected {
  border-color: var(--nal-sage);
  filter: grayscale(0);
  background: rgba(158, 200, 167, 0.1);
}

/* ─── Ambient Sound Controls ─── */

.wellness-sounds {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 0;
}

.sound-chip {
  padding: 4px 10px;
  background: hsl(263 12% 18%);
  border: 1px solid hsl(263 12% 25%);
  border-radius: 12px;
  color: var(--chrome-dim);
  font-size: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.sound-chip:hover, .sound-chip.active {
  border-color: var(--nal-sage);
  color: var(--nal-sage);
  background: rgba(158, 200, 167, 0.08);
}

/* ─── Visual Calm Canvas ─── */

#wellness-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.15;
}

/* ─── Tips Banner ─── */

.wellness-tip {
  padding: 10px 16px;
  background: linear-gradient(135deg, rgba(126, 105, 155, 0.08), rgba(158, 200, 167, 0.08));
  border-left: 3px solid var(--nal-sage);
  border-radius: 0 8px 8px 0;
  font-size: 12px;
  color: var(--chrome-text);
  line-height: 1.5;
  margin: 8px 0;
}

.wellness-tip .tip-source {
  font-size: 10px;
  color: var(--chrome-dim);
  margin-top: 4px;
}
