/* ── COOK MODE ───────────────────────────────── */

.cook {
  display: flex;
  flex-direction: column;
  height: 100svh;
}

.cook--dark {
  background: #1a1f1e;
  position: relative;
}

/* ── Top bar ──────────────────────────────────── */

.cook__topbar {
  padding: 48px 20px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.cook__recipe-name {
  font-size: 12px;
  font-weight: var(--fw-medium);
  color: rgba(255, 255, 255, 0.38);
  flex: 1;
  text-align: center;
  padding: 0 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cook__timers-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: var(--fw-semibold);
  color: #f5f0e8;
  letter-spacing: var(--ls-tight);
  flex: 1;
  text-align: center;
}

.cook__icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  transition: background var(--duration-fast) var(--ease-standard);
}

.cook__icon-btn:active { background: rgba(255, 255, 255, 0.18); }

.cook__icon-btn--gold {
  background: rgba(212, 168, 48, 0.2);
}

.cook__timer-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  background: #c96f4a;
  border-radius: 999px;
  border: 1.5px solid #1a1f1e;
}

/* ── Progress dots ────────────────────────────── */

.cook__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 20px 16px;
  flex-shrink: 0;
}

/* ── Step content ─────────────────────────────── */

.cook__content {
  flex: 1;
  overflow-y: auto;
  padding: 8px 28px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cook__step-num {
  font-family: var(--font-display);
  font-size: 80px;
  font-weight: var(--fw-bold);
  color: rgba(201, 111, 74, 0.22);
  line-height: 0.9;
  margin-bottom: 10px;
  user-select: none;
}

.cook__step-title {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: var(--fw-semibold);
  color: #f5f0e8;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 18px;
}

.cook__step-desc {
  font-size: 18px;
  color: rgba(245, 240, 232, 0.68);
  line-height: 1.72;
  margin-bottom: 28px;
}

.cook__timer-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(201, 111, 74, 0.18);
  border: 1px solid rgba(201, 111, 74, 0.4);
  border-radius: 999px;
  padding: 11px 20px;
  cursor: pointer;
  align-self: flex-start;
  font-size: 13px;
  font-weight: var(--fw-semibold);
  color: #c96f4a;
  transition: background var(--duration-fast) var(--ease-standard);
}

.cook__timer-btn:active { background: rgba(201, 111, 74, 0.28); }

/* ── Pause overlay ────────────────────────────── */

.cook__pause-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 31, 30, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.cook__pause-icon {
  width: 88px;
  height: 88px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.cook__pause-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: var(--fw-semibold);
  color: #fff;
  margin-bottom: 8px;
}

.cook__pause-sub {
  font-size: var(--text-body-md);
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 36px;
}

.cook__pause-resume {
  background: var(--color-brand-primary);
  color: #fff;
  border: none;
  padding: 18px 44px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: var(--fw-semibold);
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* ── Bottom controls ──────────────────────────── */

.cook__controls {
  flex-shrink: 0;
  padding: 12px 20px 36px;
  display: flex;
  gap: 10px;
  align-items: center;
  background: rgba(20, 25, 24, 0.96);
}

.cook__ctrl-btn {
  height: 54px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: var(--fw-semibold);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--duration-fast) var(--ease-standard);
}

.cook__ctrl-btn:active { transform: scale(0.96); }

.cook__ctrl-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.cook__ctrl-btn--voice {
  width: 54px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
}

.cook__ctrl-btn--prev {
  flex: 1;
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.55);
}

.cook__ctrl-btn--next {
  flex: 2;
  background: var(--color-brand-primary);
  color: #fff;
  box-shadow: 0 4px 16px rgba(61, 90, 64, 0.4);
}

.cook__ctrl-btn--pause {
  width: 54px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
}

/* ── Timers view ──────────────────────────────── */

.cook__timers-body {
  flex: 1;
  overflow-y: auto;
  padding: 4px 20px 20px;
}

.cook__timers-section-label {
  font-size: 10px;
  font-weight: var(--fw-semibold);
  color: rgba(255, 255, 255, 0.32);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 4px;
  margin-bottom: 16px;
}

.cook__timer-card {
  display: flex;
  align-items: center;
  gap: 20px;
}

.cook__timers-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
}

.cook__start-timer-btn {
  margin-top: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: var(--fw-semibold);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
}

.cook__start-timer-btn:active { background: rgba(255, 255, 255, 0.18); }

.cook__timer-reset-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(201, 111, 74, 0.4);
  background: rgba(201, 111, 74, 0.14);
  color: #c96f4a;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--duration-fast) var(--ease-standard);
}

.cook__timer-reset-btn:active { background: rgba(201, 111, 74, 0.28); }

/* ── Snackbar / Toast ─────────────────────────── */

.cook__snack {
  position: absolute;
  top: 64px;
  left: 16px;
  right: 16px;
  background: #2a2f2e;
  border: 1px solid rgba(201, 111, 74, 0.35);
  border-radius: 18px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 30;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  animation: snack-in 0.3s var(--ease-standard);
  touch-action: pan-y;
}

@keyframes snack-in {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes snack-out {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(100%); }
}

.cook__snack-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.cook__snack-body { flex: 1; min-width: 0; }

.cook__snack-title {
  font-size: 14px;
  font-weight: var(--fw-semibold);
  color: #f5f0e8;
  margin-bottom: 1px;
}

.cook__snack-sub {
  font-size: 12px;
  color: rgba(245, 240, 232, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Cook AI view ─────────────────────────────── */

.cook--ai {
  background: #12191a;
}

.cook__ai-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4caf6a;
  box-shadow: 0 0 6px rgba(76,175,106,.6);
}

.cook__ai-ctx {
  margin: 0 20px 10px;
  background: rgba(255,255,255,.055);
  border-radius: 14px;
  padding: 12px 16px;
  flex-shrink: 0;
}

.cook__ai-ctx-label {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,.4);
  text-transform: uppercase;
  letter-spacing: .09em;
  margin-bottom: 4px;
}

.cook__ai-ctx-step {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,.8);
}

.cook__ai-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: none;
}

.cook__ai-msgs::-webkit-scrollbar { display: none; }

.cook__ai-msg {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.cook__ai-msg--user { flex-direction: row-reverse; }

.cook__ai-avatar {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex-shrink: 0;
  overflow: hidden;
}

.cook__ai-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cook__ai-bubble {
  max-width: 78%;
  padding: 12px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.55;
}

.cook__ai-bubble--bot {
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.88);
  border-bottom-left-radius: 4px;
}

.cook__ai-bubble--user {
  background: #3d5a40;
  color: #f5f0e8;
  border-bottom-right-radius: 4px;
}

.cook__ai-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 20px 10px;
  flex-shrink: 0;
  scrollbar-width: none;
}

.cook__ai-chips::-webkit-scrollbar { display: none; }

.cook__ai-chip {
  flex-shrink: 0;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,.7);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--duration-fast) var(--ease-standard);
}

.cook__ai-chip:active { background: rgba(255,255,255,.14); }

.cook__ai-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px 28px;
  flex-shrink: 0;
  background: rgba(0,0,0,.3);
}

.cook__ai-input {
  flex: 1;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 14px;
  color: #f5f0e8;
  outline: none;
}

.cook__ai-input::placeholder { color: rgba(255,255,255,.3); }
.cook__ai-input:focus { border-color: rgba(255,255,255,.28); }

.cook__ai-send {
  width: 44px;
  height: 44px;
  background: #3d5a40;
  border: none;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--duration-fast) var(--ease-standard);
}

.cook__ai-send:active { background: #2d4a30; }

/* Typing indicator */
.cook__ai-typing { display: flex; align-items: center; gap: 5px; padding: 12px 16px; }
.cook__ai-typing span {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,.5);
  animation: cookTyping 1.2s infinite ease-in-out;
}
.cook__ai-typing span:nth-child(2) { animation-delay: .2s; }
.cook__ai-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes cookTyping {
  0%, 80%, 100% { transform: scale(1); opacity: .5; }
  40%            { transform: scale(1.4); opacity: 1; }
}

/* ── Cook Finished view ───────────────────────── */

.cook--finished {
  background: linear-gradient(160deg,#1a2e20 0%,#1a1f1e 55%);
  align-items: center;
  justify-content: center;
  padding: 40px 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cook__fin-bubble {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.cook__fin-bubble--1 {
  width: 260px;
  height: 260px;
  background: rgba(61,90,64,.18);
  top: -80px;
  right: -80px;
}

.cook__fin-bubble--2 {
  width: 180px;
  height: 180px;
  background: rgba(61,90,64,.1);
  bottom: -60px;
  left: -60px;
}

.cook__fin-check {
  width: 72px;
  height: 72px;
  background: #3d5a40;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  box-shadow: 0 0 0 12px rgba(61,90,64,.2), 0 0 0 24px rgba(61,90,64,.08);
  animation: fin-pop .4s var(--ease-standard) both;
}

@keyframes fin-pop {
  from { transform: scale(.5); opacity: 0; }
  to   { transform: scale(1);  opacity: 1; }
}

.cook__fin-title {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 700;
  color: #f5f0e8;
  line-height: 1;
  margin-bottom: 8px;
}

.cook__fin-recipe {
  font-size: 16px;
  color: rgba(255,255,255,.55);
  margin-bottom: 32px;
}

.cook__fin-stats {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(255,255,255,.055);
  border-radius: 18px;
  padding: 20px 24px;
  margin-bottom: 32px;
  width: 100%;
}

.cook__fin-stat {
  flex: 1;
  text-align: center;
}

.cook__fin-stat-val {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: #f5f0e8;
  line-height: 1;
  margin-bottom: 4px;
}

.cook__fin-stat-key {
  font-size: 11px;
  color: rgba(255,255,255,.4);
  font-weight: 500;
}

.cook__fin-stat-divider {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,.1);
}

.cook__fin-rating {
  margin-bottom: 32px;
}

.cook__fin-stars {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 10px;
}

.cook__fin-star {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  transition: transform var(--duration-fast) var(--ease-standard);
}

.cook__fin-star:active { transform: scale(1.2); }

.cook__fin-rating-label {
  font-size: 13px;
  color: rgba(255,255,255,.45);
}

.cook__fin-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.cook__fin-btn {
  width: 100%;
  padding: 16px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity var(--duration-fast) var(--ease-standard);
}

.cook__fin-btn:active { opacity: .8; }

.cook__fin-btn--save {
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.8);
  border: 1px solid rgba(255,255,255,.15);
}

.cook__fin-btn--saved {
  background: rgba(61,90,64,.35);
  color: #8ac48a;
  border-color: rgba(61,90,64,.5);
}

.cook__fin-btn--home {
  background: #3d5a40;
  color: #f5f0e8;
}
