/* Food cost calculator page: one-dish and whole-menu tools, results card, app band, video facade.
   The shared blocks (intro, fields, results card, app band, video facade, mobile summary bar) mirror
   /calculators/recipe-cost-calculator/css/recipe-cost.css; see the hub note about moving them into calculators.css. */

.intro { padding-top: 28px; padding-bottom: 18px; }
.lead { font-size: clamp(1rem, 1.3vw, 1.12rem); color: #2c2c45; max-width: 70ch; margin-top: 12px; }
.intro-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }

.calc-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; padding-bottom: 24px; }
.calc, .results { background: var(--card); border: 2px solid #000; border-radius: var(--radius); box-shadow: var(--shadow); }
.calc { padding: 20px; }

.field { display: flex; flex-direction: column; gap: 4px; font-size: 0.75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.field input, .field select, .line input, .line select {
  font: inherit; font-size: 0.95rem; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 10px; background: #fff; width: 100%; min-width: 0;
}
.field input:focus, .line input:focus, .line select:focus, .field select:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px rgba(1,3,79,0.12); }
.calc-head { display: grid; grid-template-columns: 1fr 110px 130px; gap: 12px; margin-bottom: 16px; }


/* results */
.results { padding: 20px; position: sticky; top: 84px; background: var(--navy); color: #fff; }
.results h3 { color: #fff; font-size: 1.4rem; text-transform: uppercase; margin-bottom: 10px; }
.results dl > div[hidden] { display: none; }
.results dl > div { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,0.14); }
.results dt { font-size: 0.86rem; color: rgba(255,255,255,0.78); }
.results dd { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 1.05rem; text-align: right; }
.results .big dd { font-family: var(--font-head); font-size: 1.9rem; font-weight: 600; color: var(--yellow); }
.results .warn { margin-top: 10px; font-size: 0.8rem; color: #ffd2c2; }
.res-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.results .btn-small { background: var(--orange); border-color: var(--orange); }
.results .btn-small.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.5); }

/* app band */
.app-band { background: #fff; border-top: 2px solid #000; border-bottom: 2px solid #000; margin-top: 32px; padding: 48px 0; }
.app-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 36px; align-items: center; }
.app-band h2 { margin-bottom: 12px; }
.app-band p { color: #2c2c45; }
.ticks { list-style: none; margin: 14px 0 20px; }
.ticks li { padding-left: 26px; position: relative; margin: 6px 0; font-weight: 600; font-size: 0.95rem; }
.ticks li::before { content: '✓'; position: absolute; left: 0; color: var(--green); font-weight: 900; }
.app-cta { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.qr { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 0.72rem; color: var(--muted); font-weight: 700; }
.qr-svg { width: 112px; height: 112px; border: 2px solid #000; border-radius: 10px; }
.sheet { border: 2px solid #000; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #fff; }
.sheet figcaption { font-size: 0.82rem; color: var(--muted); padding: 10px 14px; border-top: 1px solid var(--line); }

/* video facade (same pattern as the business plan page) */
.video { margin: 32px 0 8px; aspect-ratio: 16 / 9; border: 2px solid #000; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--navy); }
.video iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-facade { position: relative; width: 100%; height: 100%; display: block; }
.vf-poster { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(1,3,79,0.25), rgba(1,3,79,0.9)), url('../images/calculators_food-cost-calculator-taco-truck-menu-sheet.webp') center / cover no-repeat; display: flex; align-items: flex-end; padding: 24px; }
.vf-title { font-family: var(--font-head); color: #fff; font-size: clamp(1.3rem, 3vw, 2.3rem); text-transform: uppercase; line-height: 1; text-align: left; }
.vf-play { position: absolute; left: 50%; top: 50%; width: 84px; transform: translate(-50%, -50%); transition: transform .2s; }
.video-facade:hover .vf-play { transform: translate(-50%, -50%) scale(1.1); }


/* phones/tablets: sticky summary while the ingredient list is on screen and the results card is not */
.mini { display: none; }
@media (max-width: 1080px) {
  .calc-wrap { grid-template-columns: 1fr; }
  .results { position: static; }
  .mini:not([hidden]) { display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; gap: 14px; align-items: center; justify-content: space-between;
    background: var(--navy); color: #fff; text-decoration: none; border: 2px solid #000; border-radius: 14px; box-shadow: 4px 4px 0 #000; padding: 10px 14px; font-size: 0.82rem; }
  .mini b { color: var(--yellow); font-size: 1rem; font-variant-numeric: tabular-nums; margin-left: 4px; }
  .mini-go { font-weight: 700; color: rgba(255,255,255,0.8); white-space: nowrap; }
}
@media (max-width: 880px) {
  .app-grid { grid-template-columns: 1fr; }
}


/* tool tabs */
.tabs { display: flex; gap: 6px; margin-bottom: 16px; border-bottom: 1.5px solid var(--line); }
.tabs button { padding: 10px 16px; font-weight: 800; font-size: 0.92rem; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1.5px; }
.tabs button[aria-selected="true"] { color: var(--navy); border-bottom-color: var(--orange); }
.tabs button:hover { color: var(--navy); }
[role="tabpanel"][hidden] { display: none; }
.hint { font-size: 0.82rem; color: var(--muted); margin: 10px 0 0; }
.hint a { color: var(--navy); font-weight: 700; }
.line-head, .line { font-variant-numeric: tabular-nums; }
.line-head { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); border-bottom: 1.5px solid var(--line); padding-bottom: 8px; }
.line { display: grid; gap: 8px; align-items: center; padding: 6px 0; }
.line input, .line select { font: inherit; font-size: 0.95rem; font-weight: 500; color: var(--ink); border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 10px; background: #fff; width: 100%; min-width: 0; }
.line input:focus, .line select:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px rgba(1,3,79,0.12); }
.line .pair { display: grid; grid-template-columns: 1fr 74px; gap: 4px; }
.line .pair select { padding-left: 6px; padding-right: 2px; }
.line .cost, .line .num-out { text-align: right; font-weight: 800; color: var(--navy); }
.line .cost.err, .line .num-out.err { color: var(--error); font-size: 0.72rem; font-weight: 700; line-height: 1.2; }
.line .num-out.over { color: var(--error); }
.line .rm { width: 30px; height: 30px; border-radius: 50%; color: var(--muted); font-size: 1.1rem; line-height: 1; }
.line .rm:hover { background: #f3eee4; color: var(--error); }
.line .mlabel { display: none; }
.r { text-align: right; }
.line-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.verdict { margin-top: 10px; font-size: 0.85rem; color: #fff; background: rgba(255,255,255,0.1); border-radius: 10px; padding: 8px 10px; }
.verdict[hidden] { display: none; }
.verdict b { color: var(--yellow); }
.sheet.tall { max-width: 400px; justify-self: center; }

/* one dish: name | price | per qty+unit | amount+unit | cost | remove */
.calc-head { grid-template-columns: 1fr 180px 120px; align-items: end; }
.calc-head .tabs { margin-bottom: 0; align-self: end; }
#dish-lines .line, .dish-head { grid-template-columns: minmax(110px, 1.3fr) 84px minmax(128px, 1fr) minmax(128px, 1fr) 72px 30px; }
/* whole menu: dish | plate cost | price | sold | food cost % | profit | remove */
#menu-lines .line, .menu-head { grid-template-columns: minmax(130px, 1.7fr) 92px 92px 84px 74px 84px 30px; }
.dish-head2 { display: grid; grid-template-columns: 1fr 1fr 130px; gap: 12px; margin-bottom: 16px; }
.pricing { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; border-top: 1.5px solid var(--line); padding-top: 14px; }
@media (max-width: 720px) {
  .intro { padding-top: 18px; padding-bottom: 14px; }
  .intro-actions .btn-orange { display: none; }
  .intro-actions .btn-line { padding: 10px 18px; font-size: 0.88rem; }
  .calc { padding: 14px; }
  .calc-head { grid-template-columns: 1fr 1fr; }
  .calc-head .tabs { grid-column: 1 / -1; }
  .dish-head2 { grid-template-columns: 1fr 1fr; }
  .dish-head2 .grow { grid-column: 1 / -1; }
  .dish-head, .menu-head { display: none; }
  #dish-lines .line, #menu-lines .line { grid-template-columns: 1fr 1fr; gap: 8px 10px; padding: 12px; margin-bottom: 10px; border: 1.5px solid var(--line); border-radius: 12px; position: relative; }
  .line .c-name { grid-column: 1 / -1; padding-right: 34px; }
  .line .mlabel { display: block; font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 3px; }
  #dish-lines .line .cost { grid-column: 1 / -1; font-size: 1.1rem; }
  #menu-lines .line .num-out { text-align: left; font-size: 1rem; }
  .line .rm { position: absolute; top: 8px; right: 8px; }
  .tabs button { padding: 10px 10px; font-size: 0.88rem; }
  .qr { display: none; }
}
@media (hover: none) and (pointer: coarse) { .qr { display: none; } }
@media (max-width: 420px) { .mini-go { display: none; } }
