/* ===== Cook Mode ===== */

#cook-mode-sheet {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #F8F8F8;
  z-index: 10004;
  flex-direction: column;
  font-family: 'Quicksand', sans-serif;
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.2, 0, 0, 1);
  padding-top: env(safe-area-inset-top, 0px);
  box-sizing: border-box;
}

#cook-mode-sheet.open { transform: translateY(0); }

.cook-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 10px 16px;
  flex-shrink: 0;
}

.cook-close-btn,
.cook-ingredients-btn {
  width: 38px !important; height: 38px !important;
  padding: 0 !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  background: #FFFFFF !important;
  color: #2D2D2D !important;
  border: none !important;
  border-radius: 50% !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1) !important;
  font-size: 15px !important;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}
#cook-mode-sheet .cook-close-btn:active,
#cook-mode-sheet .cook-ingredients-btn:active { background: #F0EDE9 !important; }
#cook-mode-sheet .cook-close-btn:hover, #cook-mode-sheet .cook-close-btn:focus,
#cook-mode-sheet .cook-ingredients-btn:hover, #cook-mode-sheet .cook-ingredients-btn:focus {
  background: #FFFFFF !important; color: #2D2D2D !important; outline: none !important;
}

.cook-header-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.cook-title {
  font-size: 15.5px;
  font-weight: 700;
  color: #2D2D2D;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.cook-step-count {
  font-size: 12px;
  font-weight: 600;
  color: #A09A90;
}

.cook-progress {
  height: 4px;
  background: #ECE7E1;
  border-radius: 2px;
  margin: 0 16px 4px 16px;
  overflow: hidden;
  flex-shrink: 0;
}

.cook-progress-fill {
  height: 100%;
  width: 0%;
  background: #F7941D;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.cook-ingredients-panel {
  margin: 8px 16px 0 16px;
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  max-height: 38vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex-shrink: 0;
}

.cook-ing-row {
  padding: 11px 16px;
  font-size: 14.5px;
  font-weight: 500;
  color: #2D2D2D;
  border-bottom: 1px solid #F4F1ED;
}
.cook-ing-row:last-child { border-bottom: none; }

.cook-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
}

.cook-step-card {
  background: #FFFFFF;
  border-radius: 24px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.07);
  padding: 32px 26px 34px 26px;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

/* Big numbered anchor so the step card has weight and the screen never reads
   as empty. */
.cook-step-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(247, 148, 29, 0.12);
  flex-shrink: 0;
}
.cook-step-badge-num {
  font-size: 30px;
  font-weight: 800;
  color: #E07A10;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.cook-step-text {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.5;
  color: #2D2D2D;
  text-align: center;
  margin: 0;
}

.cook-timer-chip {
  padding: 12px 22px !important;
  background: rgba(247, 148, 29, 0.12) !important;
  color: #E07A10 !important;
  border: 1.5px solid #F7941D !important;
  border-radius: 22px !important;
  font-family: 'Quicksand', sans-serif !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  box-shadow: none !important;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  font-variant-numeric: tabular-nums;
}
#cook-mode-sheet .cook-timer-chip:hover,
#cook-mode-sheet .cook-timer-chip:focus {
  background: rgba(247, 148, 29, 0.12) !important;
  color: #E07A10 !important;
  outline: none !important;
}
#cook-mode-sheet .cook-timer-chip.running {
  background: #F7941D !important;
  color: #FFFFFF !important;
}
#cook-mode-sheet .cook-timer-chip.finished {
  background: #4CAF50 !important;
  border-color: #4CAF50 !important;
  color: #FFFFFF !important;
}

.cook-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 20px;
}
.cook-done-emoji { font-size: 56px; }
.cook-done-title { font-size: 21px; font-weight: 700; color: #2D2D2D; }
.cook-done-sub { font-size: 14px; font-weight: 500; color: #8A8A8A; }

.cook-footer {
  display: flex;
  gap: 12px;
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px)) 16px;
  flex-shrink: 0;
}

.cook-nav-btn {
  flex: 1;
  padding: 16px !important;
  border-radius: 18px !important;
  font-family: 'Quicksand', sans-serif !important;
  font-size: 16.5px !important;
  font-weight: 700 !important;
  cursor: pointer;
  border: none !important;
  -webkit-tap-highlight-color: transparent !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}
.cook-prev {
  background: #FFFFFF !important;
  color: #6B6B6B !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08) !important;
  flex: 0 0 32% !important;
}
.cook-next {
  background: #F7941D !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 12px rgba(247, 148, 29, 0.32) !important;
}
#cook-mode-sheet .cook-prev:active { background: #F0EDE9 !important; }
#cook-mode-sheet .cook-next:active { background: #E07A10 !important; }
#cook-mode-sheet .cook-prev:hover, #cook-mode-sheet .cook-prev:focus {
  background: #FFFFFF !important; color: #6B6B6B !important; outline: none !important;
}
#cook-mode-sheet .cook-next:hover, #cook-mode-sheet .cook-next:focus {
  background: #F7941D !important; color: #FFFFFF !important; outline: none !important;
}

/* Cook entry: a compact pill on the Method section header (the old full-width
   fixed banner floated over content and read as hectic). */
.method-cook-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 13px;
  background: #F7941D;
  color: #FFFFFF;
  border-radius: 13px;
  font-family: 'Quicksand', sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  flex: none;
  box-shadow: 0 3px 8px -2px rgba(247, 148, 29, 0.55);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}
.method-cook-pill:active { background: #E07A10; }
