/* Dual-mode engine: mode selector, FAB drink wheel, SOS craving overlay */

/* ── Mode Select ─────────────────────────────────────────────────────────────── */

.mode-container { max-width: 640px; margin: 0 auto; text-align: center; }
.mode-eyebrow {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}
.mode-title {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.mode-desc { font-size: 16px; color: var(--fg-muted); line-height: 1.65; margin-bottom: 40px; }

#mode-form { text-align: left; }

.mode-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 32px; }

.mode-card {
  display: block;
  cursor: pointer;
}
.mode-card input[type="radio"] { display: none; }
.mode-card-inner {
  background: var(--cream);
  border: 2px solid var(--border);
  border-radius: 18px;
  padding: 28px 24px;
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  height: 100%;
  box-sizing: border-box;
}
.mode-card:hover .mode-card-inner { border-color: var(--accent); transform: translateY(-2px); }
.mode-card.selected .mode-card-inner {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(183,126,81,0.12);
}

.mode-icon { font-size: 44px; margin-bottom: 12px; }
.mode-card-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 10px;
}
.mode-card-desc { font-size: 14px; color: var(--fg-muted); line-height: 1.6; margin-bottom: 16px; }
.mode-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.mode-tag {
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  background: var(--bg-alt);
  border-radius: 12px;
  color: var(--fg-muted);
}

.mode-actions { display: flex; justify-content: center; }
.btn-large { padding: 14px 36px; font-size: 16px; }

.mode-footer-note { font-size: 13px; color: var(--fg-muted); margin-top: 24px; }

/* ── FAB + Radial Drink Wheel ────────────────────────────────────────────────── */

.fab-wrap {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 100;
}

.fab-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(183,126,81,0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}
.fab-btn:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(183,126,81,0.5); }
.fab-btn:active { transform: scale(0.96); }

.drink-wheel-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(28,23,20,0.45);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.drink-wheel-overlay.open { opacity: 1; pointer-events: all; }

.drink-wheel {
  position: relative;
  width: 320px;
  height: 320px;
}
.wheel-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  background: var(--cream);
  border: 3px solid var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  z-index: 1;
  font-weight: 700;
  color: var(--accent);
  transition: background 0.15s;
}
.wheel-center:hover { background: var(--accent); color: #fff; }

.wheel-option {
  position: absolute;
  width: 76px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.wheel-option:hover .wheel-option-label { color: var(--accent); }
.wheel-option-icon {
  width: 52px;
  height: 52px;
  background: var(--cream);
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  transition: border-color 0.15s, transform 0.15s;
}
.wheel-option:hover .wheel-option-icon {
  border-color: var(--accent);
  transform: scale(1.1);
}
.wheel-option-label { font-size: 11px; color: var(--fg-muted); font-weight: 500; }

.wheel-close {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 36px;
  height: 36px;
  background: var(--cream);
  border: 2px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--fg-muted);
  transition: border-color 0.15s, color 0.15s;
}
.wheel-close:hover { border-color: var(--accent); color: var(--accent); }

/* Mood / trigger quick-select after drink selection */
.quick-mood-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(28,23,20,0.55);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.quick-mood-overlay.open { opacity: 1; pointer-events: all; }

.quick-mood-card {
  background: var(--cream);
  border-radius: 20px;
  padding: 28px 32px;
  max-width: 400px;
  width: 90%;
  text-align: center;
}
.quick-mood-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 6px;
}
.quick-mood-sub { font-size: 14px; color: var(--fg-muted); margin-bottom: 20px; }
.quick-mood-options { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 20px; }
.mood-chip {
  padding: 8px 18px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--cream);
}
.mood-chip:hover { border-color: var(--accent); color: var(--accent); }
.mood-chip.selected { background: var(--accent); color: #fff; border-color: var(--accent); }

.quick-trigger-options { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 20px; }
.trigger-chip {
  padding: 6px 14px;
  background: var(--bg-alt);
  border-radius: 12px;
  font-size: 12px;
  cursor: pointer;
  color: var(--fg-muted);
  transition: all 0.15s;
}
.trigger-chip:hover { background: var(--border); }
.trigger-chip.selected { background: var(--accent); color: #fff; }

.quick-actions { display: flex; gap: 12px; justify-content: center; }

/* ── SOS Craving Overlay ─────────────────────────────────────────────────────── */

.sos-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #1A1614;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.sos-overlay.open { opacity: 1; pointer-events: all; }

.sos-header { text-align: center; margin-bottom: 40px; }
.sos-intro {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}
.sos-sub { font-size: 16px; color: rgba(255,255,255,0.6); }

/* Breathing animation */
.sos-breathe-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 32px;
}
.sos-breathe-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(183,126,81,0.3);
  border: 3px solid rgba(183,126,81,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: breathe 8s ease-in-out infinite;
}
.sos-breathe-text { font-size: 14px; color: rgba(255,255,255,0.7); margin-top: 12px; }

@keyframes breathe {
  0%, 100% { transform: scale(0.85); border-color: rgba(183,126,81,0.4); }
  50% { transform: scale(1.15); border-color: rgba(183,126,81,0.9); box-shadow: 0 0 40px rgba(183,126,81,0.2); }
}

/* 20-minute countdown */
.sos-timer {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
  text-align: center;
}
.sos-timer-label { font-size: 14px; color: rgba(255,255,255,0.5); margin-bottom: 32px; }

/* SOS chat */
.sos-chat {
  width: 100%;
  max-width: 540px;
  max-height: 280px;
  overflow-y: auto;
  background: rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sos-msg { font-size: 15px; line-height: 1.55; color: rgba(255,255,255,0.85); }
.sos-msg.user { color: var(--accent); text-align: right; }

.sos-input-row { display: flex; gap: 10px; width: 100%; max-width: 540px; }
.sos-input {
  flex: 1;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1.5px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 15px;
  font-family: var(--font-body);
}
.sos-input::placeholder { color: rgba(255,255,255,0.35); }
.sos-input:focus { outline: none; border-color: var(--accent); }

.sos-send {
  padding: 14px 20px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s;
}
.sos-send:hover { opacity: 0.85; }

.sos-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 22px;
  cursor: pointer;
  padding: 8px;
  transition: color 0.15s;
}
.sos-close:hover { color: #fff; }

/* Pulsing SOS nav button */
.sos-nav-btn-wrap { margin-left: 12px; }
.sos-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid #E53E3E;
  background: rgba(229,62,62,0.12);
  color: #FC8181;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  animation: sos-pulse 2s ease-in-out infinite;
  transition: background 0.15s;
}
.sos-nav-btn:hover { background: rgba(229,62,62,0.22); }

@keyframes sos-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229,62,62,0.0); transform: scale(1); }
  50% { box-shadow: 0 0 0 6px rgba(229,62,62,0.15); transform: scale(1.03); }
}

.sos-heartbeat { font-size: 16px; }

/* Responsive */
@media (max-width: 600px) {
  .mode-cards { grid-template-columns: 1fr; }
  .mode-title { font-size: 30px; }
  .fab-wrap { bottom: 20px; right: 20px; }
  .drink-wheel { width: 280px; height: 280px; }
  .sos-intro { font-size: 22px; }
  .sos-timer { font-size: 36px; }
}