/* css/11-auto-menu.css — Auto Menu Generator (B3) */

/* the sheet body */
.am-body { padding: 4px 0 12px; display: flex; flex-direction: column; gap: 18px; }

/* intro */
.am-intro {
  display: flex; gap: 14px; align-items: center;
  background: linear-gradient(160deg, #FDF2F8 0%, #FCE7F3 100%);
  border: 1px solid rgba(244,114,182,0.30);
  border-radius: 18px;
  padding: 14px 16px;
}
.am-intro-emoji { font-size: 36px; line-height: 1; flex: 0 0 auto; }
.am-intro h3 { margin: 0 0 4px; font-size: 17px; font-weight: 800; color: #831843; letter-spacing: -0.01em; }
.am-intro p  { margin: 0; font-size: 12.5px; color: #9F1239; line-height: 1.5; }

/* section headers */
.am-section-h {
  font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase;
  font-weight: 700; color: var(--muted);
  margin: 2px 4px;
}

/* clean level cards */
.am-clean-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.am-clean-card {
  position: relative;
  background: var(--surface);
  border: 1.5px solid var(--border-soft);
  border-radius: 16px;
  padding: 14px 10px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: pointer; font-family: inherit;
  transition: transform .12s ease, border-color .15s, box-shadow .2s;
  overflow: hidden;
}
.am-clean-card::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(160deg, color-mix(in oklab, var(--c1) 10%, transparent), color-mix(in oklab, var(--c2) 6%, transparent));
  opacity: 0; transition: opacity .2s;
  pointer-events: none;
}
.am-clean-card:hover { transform: translateY(-1px); border-color: color-mix(in oklab, var(--c1) 40%, var(--border)); }
.am-clean-card.is-active {
  border-color: var(--c1);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--c1) 18%, transparent);
}
.am-clean-card.is-active::before { opacity: 1; }
.am-clean-emoji { font-size: 24px; line-height: 1; position: relative; z-index: 1; }
.am-clean-name { font-size: 13.5px; font-weight: 800; color: var(--text); letter-spacing: -0.005em; position: relative; z-index: 1; }
.am-clean-sub  { font-size: 10.5px; color: var(--muted); text-align: center; line-height: 1.3; position: relative; z-index: 1; }
.am-clean-card.is-active .am-clean-name { color: color-mix(in oklab, var(--c1) 70%, black 30%); }

/* dish type cards */
.am-dish-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.am-dish-card {
  background: var(--surface);
  border: 1.5px solid var(--border-soft);
  border-radius: 14px;
  padding: 12px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: pointer; font-family: inherit;
  transition: transform .12s ease, border-color .15s, background .15s;
}
.am-dish-card:hover { transform: translateY(-1px); border-color: var(--primary-soft); background: var(--surface-tint); }
.am-dish-card.is-active {
  background: var(--text); color: #fff; border-color: var(--text);
}
.am-dish-emoji { font-size: 22px; line-height: 1; }
.am-dish-name { font-size: 12.5px; font-weight: 700; }

/* optional card */
.am-opt-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 14px 16px;
}
.am-opt-row { display: flex; justify-content: space-between; align-items: center; }
.am-opt-label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.am-opt-value { font-size: 14px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 4px; }
.am-opt-input {
  width: 64px; height: 36px;
  border: 1px solid var(--border); border-radius: 10px;
  text-align: right; font-size: 14px; font-weight: 700;
  font-variant-numeric: tabular-nums; padding: 0 8px;
  font-family: inherit; background: var(--surface);
}
.am-opt-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.am-opt-slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px; margin-top: 10px;
  background: linear-gradient(to right, var(--primary-soft), var(--primary));
  border-radius: 999px; outline: none;
}
.am-opt-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; border: 2px solid var(--primary);
  box-shadow: 0 2px 5px rgba(0,0,0,0.15); cursor: pointer;
}

/* toggle */
.am-opt-toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.am-opt-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.am-opt-toggle-track {
  width: 40px; height: 24px; background: var(--bg-deep);
  border-radius: 999px; position: relative;
  transition: background .18s;
}
.am-opt-toggle-dot {
  position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.18);
  transition: transform .18s;
}
.am-opt-toggle input:checked ~ .am-opt-toggle-track { background: var(--primary); }
.am-opt-toggle input:checked ~ .am-opt-toggle-track .am-opt-toggle-dot { transform: translateX(16px); }
.am-opt-toggle-label { font-size: 13px; font-weight: 600; color: var(--text-2); }

/* CTA */
.am-cta {
  width: 100%; height: 56px;
  border: 0; border-radius: 18px;
  background: linear-gradient(135deg, #F472B6 0%, #BE185D 100%);
  color: #fff; font-size: 16px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  cursor: pointer; font-family: inherit;
  letter-spacing: -0.005em;
  box-shadow: 0 12px 28px -10px rgba(190,24,93,0.5);
  transition: transform .12s, box-shadow .2s;
}
.am-cta > span:first-child { font-size: 22px; transition: transform .4s cubic-bezier(.4,.0,.2,1); }
.am-cta:hover { transform: translateY(-1px); box-shadow: 0 16px 32px -12px rgba(190,24,93,0.6); }
.am-cta:active { transform: scale(0.97); }
.am-cta.is-rolling > span:first-child { animation: am-roll .38s cubic-bezier(.4,.0,.2,1); }
@keyframes am-roll {
  0%   { transform: rotate(0deg) scale(1); }
  50%  { transform: rotate(360deg) scale(1.4); }
  100% { transform: rotate(720deg) scale(1); }
}

/* result */
.am-result {
  margin-top: 4px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  overflow: hidden;
  animation: am-result-in .36s cubic-bezier(.16,1,.3,1) both;
  box-shadow: 0 16px 36px -16px rgba(15,23,42,0.12);
}
@keyframes am-result-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.am-result-head {
  background: linear-gradient(135deg, var(--c1) 0%, var(--c2) 100%);
  color: #fff;
  padding: 18px 20px 18px;
}
.am-result-eyebrow {
  font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.04em; opacity: 0.85;
  text-transform: uppercase;
}
.am-result-name { font-size: 22px; font-weight: 800; margin: 4px 0 0; letter-spacing: -0.01em; line-height: 1.2; }

.am-result-block { padding: 16px 18px; border-top: 1px solid var(--border-soft); }
.am-result-block:first-of-type { border-top: 0; }
.am-block-h { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700; color: var(--muted); margin: 0 0 10px; }

/* ingredients list */
.am-ing-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.am-ing-list li {
  display: grid; grid-template-columns: auto 1fr auto;
  gap: 10px; align-items: center;
  padding: 8px 10px;
  background: var(--surface-tint);
  border-radius: 10px;
}
.am-ing-bullet {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--primary);
}
.am-ing-name { font-size: 13.5px; font-weight: 600; color: var(--text); }
.am-ing-qty  { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; font-weight: 600; }
.am-swap-note {
  margin-top: 10px;
  font-size: 12px; color: var(--primary-ink);
  background: var(--primary-soft);
  padding: 8px 12px; border-radius: 10px;
}

/* macros */
.am-macro-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.am-macro {
  text-align: center;
  background: var(--surface-tint);
  border-radius: 12px;
  padding: 10px 6px;
}
.am-macro-v { font-size: 17px; font-weight: 800; color: var(--text); letter-spacing: -0.01em; }
.am-macro-u { font-size: 11px; font-weight: 700; margin-left: 1px; }
.am-macro-l { font-size: 11px; color: var(--muted); margin-top: 2px; font-weight: 600; }

/* meters */
.am-meter { display: flex; flex-direction: column; gap: 10px; }
.am-meter-row {
  display: grid; grid-template-columns: 76px 1fr 74px;
  gap: 10px; align-items: center;
}
.am-meter-label { font-size: 12.5px; font-weight: 700; color: var(--text); }
.am-meter-label small { display: block; font-size: 9.5px; font-weight: 500; color: var(--muted); letter-spacing: 0.02em; }
.am-meter-bar {
  position: relative;
  height: 8px; background: var(--bg-deep); border-radius: 999px;
  overflow: visible;
}
.am-meter-fill {
  display: block; height: 100%;
  background: linear-gradient(to right, #10B981, #047857);
  border-radius: 999px;
  transition: width .35s cubic-bezier(.4,.0,.2,1);
}
.am-meter-fill.is-warn { background: linear-gradient(to right, #FBBF24, #D97706); }
.am-meter-knob {
  position: absolute; top: 50%; transform: translate(-50%, -50%);
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 3px solid var(--primary);
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.am-meter-knob.is-bad { border-color: var(--danger); }
.am-meter-val {
  font-size: 12.5px; font-weight: 800;
  color: var(--text); text-align: right;
}
.am-meter-val.is-ok  { color: var(--primary-ink); }
.am-meter-val.is-bad { color: var(--danger-ink); }

/* taste pills */
.am-taste-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.am-taste-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-tint);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11.5px;
}
.am-taste-k { font-weight: 700; color: var(--text-2); }
.am-taste-bars { color: #BE185D; letter-spacing: -0.5px; font-size: 9px; }

/* why */
.am-why {
  margin: 0 18px 6px;
  background: var(--surface-tint);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 10px 14px;
}
.am-why summary {
  font-size: 13px; font-weight: 700; color: var(--text);
  cursor: pointer; list-style: none;
  display: flex; align-items: center; justify-content: space-between;
}
.am-why summary::after { content: "▾"; color: var(--muted); transition: transform .2s; }
.am-why[open] summary::after { transform: rotate(180deg); }
.am-why ul { margin: 10px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--text-2); line-height: 1.6; }
.am-why li + li { margin-top: 4px; }

/* foot */
.am-result-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px 18px;
  border-top: 1px solid var(--border-soft);
}
.am-cost { font-size: 14px; color: var(--text-2); display: inline-flex; align-items: center; gap: 4px; }
.am-cost strong { font-size: 19px; font-weight: 800; color: var(--text); }
.am-roll-again {
  height: 42px; padding: 0 18px;
  border-radius: 12px;
  background: var(--text); color: #fff;
  border: 0; font-size: 13.5px; font-weight: 700;
  cursor: pointer; font-family: inherit;
}
.am-roll-again:hover { background: #1F2937; }

/* error */
.am-err-card {
  padding: 28px 22px;
  text-align: center;
}
.am-err-emoji { font-size: 44px; margin-bottom: 4px; }
.am-err-card h4 { font-size: 16px; color: var(--text); margin: 8px 0 6px; font-weight: 800; }
.am-err-card p  { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.5; }
