/* Eating out sheet and Meal plan redesign (FUEL_DINE_PLAN_V2_ENABLED; Jake-approved mockups, Nov 15; build note F6).
   Linked in <head> (never injected late). Every rule is scoped to .fdp-sheet (the Eating out sheet) or .mp2 (the
   member meal planner), which exist only while the flag is on, so with the flag off this file matches nothing.
   Builds on fuel-v3.css (.fv3 tokens, cards, ring, bars, band, sheet). Theme tokens only: Pearl by day, Smoke by night
   from app.css. Every image box has its size before the image loads (rule 3). */

/* ---------- Eating out ---------- */
.fdp-sheet .fp-head { border-bottom: 0; padding-bottom: 4px; }
.fdp-sheet .fp-title { font: 400 28px/1 var(--fv3-display); letter-spacing: .04em; }
.fdp-sheet .fp-head [data-act="close"] { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--glass-strong); color: var(--ink); font-size: 18px; }
.fdp-sheet .fp-head [data-act="close"] svg { width: 18px; height: 18px; }
.fdp-sheet .fp-body { gap: 12px; padding-top: 6px; }
.fdp-sub { font-size: 15px; line-height: 1.45; }
.fdp-left { gap: 10px; }
.fdp-lrow { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; }
.fdp-ring { position: relative; width: 96px; height: 96px; }
.fdp-ring svg { position: absolute; inset: 0; }
.fdp-rc { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.fdp-rc b { font: 400 30px/1 var(--fv3-display); }
.fdp-rc span { font: 9px/1.2 var(--fv3-label); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-top: 3px; }
.fdp-macros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fdp-macros div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fdp-macros b { font: 400 28px/1 var(--fv3-display); }
.fdp-macros b small { font: 11px var(--fv3-label); color: var(--ink-3); margin-left: 2px; }
.fdp-macros span { font: 10px var(--fv3-label); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.fdp-macros div:first-child b { color: var(--fv3-primary); }
.fdp-sk-left { height: 152px; }
.fdp-sk-hero { height: 296px; border-radius: 24px; }
.fdp-sk-pick { height: 136px; border-radius: 24px; }

.fdp-places { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fdp-place { position: relative; height: 88px; border-radius: 20px; overflow: hidden; border: 1px solid var(--hair); box-shadow: var(--shadow); padding: 0; cursor: pointer; background: var(--sand-soft); text-align: left; }
.fdp-pimg, .fdp-pimg img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.fdp-shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, color-mix(in srgb, var(--espresso) 78%, transparent) 100%); pointer-events: none; }
.fdp-place b { position: absolute; left: 12px; right: 12px; bottom: 10px; font: 400 12px/1.15 var(--fv3-label); letter-spacing: .08em; text-transform: uppercase; color: var(--ivory); }
:root[data-theme="night"] .fdp-place b { color: var(--ink); }
.fdp-place[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ivory), 0 0 0 4px var(--fv3-primary), var(--shadow); }
.fdp-ok { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; background: var(--fv3-primary); color: var(--fv3-on); display: grid; place-items: center; }
:root[data-theme="night"] .fdp-pimg img, :root[data-theme="night"] .fdp-hi img, :root[data-theme="night"] .fdp-th img, :root[data-theme="night"] .mp2 .mp2-thumb img { filter: brightness(.86); }

.fdp-search:focus-within { border-color: var(--fv3-primary); }
.fdp-sheet .fdp-searchbtn { width: 100%; color: var(--ink-3); font: 16px var(--font-body); cursor: pointer; text-align: left; }
.fdp-chains { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 4px; overscroll-behavior-x: contain; }
.fdp-chains::-webkit-scrollbar { display: none; }
.fdp-sheet .fdp-chain { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 14px; border-radius: 999px; border: 1px solid var(--hair); background: var(--glass-strong); font: 11px var(--fv3-label); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); cursor: pointer; white-space: nowrap; }
.fdp-chain:has(.fdp-cimg) { padding-left: 4px; }
.fdp-chain[aria-pressed="true"] { border-color: var(--fv3-primary); box-shadow: inset 0 0 0 1px var(--fv3-primary); }
.fdp-cimg { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; flex: 0 0 auto; background: var(--sand-soft); }
.fdp-cimg img { width: 34px; height: 34px; display: block; object-fit: cover; aspect-ratio: 1 / 1; }

.fdp-hero { padding: 0; gap: 0; overflow: hidden; }
.fdp-himg { position: relative; display: block; height: 132px; flex: 0 0 auto; }
.fdp-hi, .fdp-hi img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; background: var(--sand-soft); }
.fdp-himg .fdp-fit { position: absolute; left: 14px; top: 14px; background: var(--ivory); color: var(--sand-text) !important; }
.fdp-hero.fdp-nophoto { padding-top: 14px; }
.fdp-hero.fdp-nophoto > .fdp-fit { align-self: flex-start; margin-left: 16px; }
.fdp-body, .fdp-tx { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fdp-body { padding: 12px 16px 16px; }
.fdp-brand { font: 11px/1.1 var(--fv3-label); letter-spacing: .14em; text-transform: uppercase; color: var(--sand-text); }
.fdp-item { font: 18px/1.25 var(--font-body); color: var(--ink); }
.fdp-rest { font-size: 14px; color: var(--ink-2); }
.fdp-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 2px; }
.fdp-pro { display: flex; align-items: baseline; gap: 6px; }
.fdp-pro b { font: 400 34px/1 var(--fv3-display); color: var(--fv3-primary); }
.fdp-pro small { font: 13px var(--fv3-label); color: var(--fv3-primary); margin-left: -3px; }
.fdp-pro span { font: 11px var(--fv3-label); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.fdp-pill { min-height: 44px; border-radius: 999px; border: 0; background: var(--fv3-primary); color: var(--fv3-on) !important; font: 12px/1 var(--fv3-label) !important; letter-spacing: .1em; text-transform: uppercase; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; cursor: pointer; }
.fdp-pill[disabled] { opacity: .6; cursor: default; }
.fdp-pill.fdp-done { background: transparent; color: var(--sand-text) !important; border: 1px solid var(--hair); cursor: default; }
.fdp-pick { flex-direction: row; padding: 10px; gap: 12px; align-items: stretch; }
.fdp-th { width: 104px; flex: 0 0 104px; min-height: 116px; border-radius: 16px; overflow: hidden; position: relative; background: var(--sand-soft); }
.fdp-th img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.fdp-pick .fdp-tx { flex: 1; gap: 4px; padding: 2px 0; }
.fdp-pick.fdp-nophoto .fdp-tx { padding: 4px 6px; }
.fdp-pick .fdp-item { font-size: 16px; line-height: 1.2; }
.fdp-pick .fdp-rest { font-size: 13px; }
.fdp-pick .fdp-foot { margin-top: auto; }
.fdp-pick .fdp-pro b { font-size: 26px; }
.fdp-pick .fdp-pill { min-height: 40px; padding: 0 14px; font-size: 11px !important; }

.fdp-guide { flex-direction: row; align-items: center; gap: 12px; padding: 12px; color: var(--ink); }
.fdp-stack { display: flex; flex: 0 0 auto; }
.fdp-simg { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; border: 2px solid var(--glass-strong); margin-left: -12px; position: relative; background: var(--sand-soft); }
.fdp-simg:first-child { margin-left: 0; }
.fdp-simg img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 1 / 1; }
.fdp-gt { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fdp-gt b { font: 400 13px var(--fv3-label); letter-spacing: .08em; text-transform: uppercase; }
.fdp-gt span { font-size: 15px; color: var(--ink-2); }
.fdp-src { margin: 0 2px; }
.fdp-sheet .fp-toast .fp-link { font: 12px var(--fv3-label); letter-spacing: .12em; text-transform: uppercase; color: var(--sand); }

/* ---------- Meal plan (member view) ---------- */
/* The page ends with the view's shared bottom inset (app.css, docs/design/bottom-gap.md): a fixed-height spacer that
   no longer moves as the planner fills in, so the planner adds no bottom space of its own. */
.mp2 { gap: 12px; padding-bottom: 0; }
.mp2 .mp2-hidden { display: none !important; }
.mp2-top { display: block; }
/* The planner's own .mpb .vbtn look is replaced by the Fuel segment look (paper pill on sand). */
.mp2 .mp2-seg button.vbtn { min-height: 40px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font: 12px var(--fv3-label) !important; letter-spacing: .1em; text-transform: uppercase; box-shadow: none; }
.mp2 .mp2-seg button.vbtn.active { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px var(--hair), var(--shadow-sm); }
.mp2 .mp2-icon { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--glass-strong); color: var(--ink); display: grid; place-items: center; cursor: pointer; flex: 0 0 auto; }
.mp2-icon.mp2-fwd svg { transform: scaleX(-1); }
.mp2 .mp2-seg button { min-height: 36px; }
.mp2 .mpb-view { display: flex; flex-direction: column; gap: 12px; }
.mp2-date { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 8px; }
.mp2-date b { text-align: center; font: 13px var(--fv3-label); letter-spacing: .12em; text-transform: uppercase; font-weight: 400; }
.mp2-hero { cursor: default; }
.mp2-sk-ring { height: 330px; border-radius: 24px; }
.mp2-sk-meal { height: 220px; border-radius: 24px; }
.mp2-sk-week { height: 290px; border-radius: 24px; }
.mp2-sk-rows { height: 460px; border-radius: 24px; }
.mp2-slot { display: flex; flex-direction: column; gap: 8px; }
.mp2-sect { padding: 2px 2px 0; }
.mp2-sv { display: inline-flex; align-items: center; gap: 8px; }
.mp2 .mp2-del { padding: 0; min-height: 32px; font-size: 13px; }
.mp2-meal { padding: 0; gap: 0; overflow: hidden; }
.mp2 .mp2-mimg { margin: 0; aspect-ratio: 800 / 270; }
.mp2 .mp2-mimg img { aspect-ratio: 800 / 270; }
.mp2-mrow { display: flex; align-items: center; gap: 10px; padding: 12px 16px 14px; }
.mp2-mt { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mp2-mt b { font: 18px/1.25 var(--font-body); font-weight: 400; }
.mp2-mt > span { font-size: 14px; color: var(--ink-2); }
.mp2-mt strong { font: 13px var(--fv3-label); letter-spacing: .06em; color: var(--fv3-primary); font-weight: 400; }
.mp2 .mp2-add { min-height: 72px; width: 100%; border-radius: 24px; border: 1.5px dashed var(--hair); background: transparent; color: var(--sand-text); font: 12px var(--fv3-label); letter-spacing: .12em; text-transform: uppercase; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.mp2 .mp2-add.hidden { display: none; }
.mp2 #mpb-addmeal-form { padding: 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mp2-ab { flex-direction: row; align-items: center; justify-content: space-between; padding: 12px 16px; min-height: 64px; }
.mp2-ab .fv3-eye { color: var(--ink); font-size: 12px; }
.mp2-switch { width: 52px; height: 32px; border-radius: 999px; border: 0; background: var(--sand-soft); position: relative; cursor: pointer; flex: 0 0 auto; padding: 0; }
.mp2-switch i { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: var(--paper, var(--ivory)); box-shadow: var(--shadow-sm); transition: transform .18s ease-out; }
.mp2-switch[aria-checked="true"] { background: var(--fv3-primary); }
.mp2-switch[aria-checked="true"] i { transform: translateX(20px); }
.mp2-switch[disabled] { opacity: .55; }
.mp2 .mp2-reset, .mp2 .mp2-copy { align-self: center; font-size: 14px; }
.mp2 .fv3-week i { cursor: default; }
.mp2-rows { gap: 8px; }
.mp2-drow { min-height: 64px; gap: 12px; }
.mp2-drow.mp2-today { border-color: var(--fv3-primary); }
.mp2-dl { width: 52px; flex: 0 0 52px; }
.mp2-dl span { font-size: 13px; }
.mp2-thumbs { display: flex; flex: 1; min-width: 0; }
.mp2-thumb { width: 34px; height: 34px; border-radius: 10px; overflow: hidden; border: 2px solid var(--glass-strong); margin-left: -8px; background: var(--sand-soft); flex: 0 0 auto; }
.mp2-thumb:first-child { margin-left: 0; }
.mp2-thumb img { width: 100%; height: 100%; display: block; object-fit: cover; aspect-ratio: 1 / 1; }
.mp2-dv { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.mp2-dv b { font: 13px var(--fv3-label); font-weight: 400; letter-spacing: .04em; color: var(--fv3-primary); }
.mp2-dv span { font-size: 13px; }
.mp2-msg { font-size: 15px; color: var(--ink-2); }
.mp2-scrim .mp2-mpb { padding: 0; display: block; }
.mp2-scrim .mp2-mpb .meal-card { margin: 0; }
/* Ingredients and Method in the meal popup (r3d): the Recipe Book's fold style, compact for a sheet. The sheet opens
   at its natural height; on the first expand its top edge is pinned (meal-plan-builder.js), it grows downward only,
   then the body scrolls inside with Done fixed below it. */
.mp2-scrim .mp2-fold { padding: 4px 16px; border-radius: 20px; box-shadow: none; gap: 0; }
.mp2-scrim .mp2-fold > summary { min-height: 48px; }
.mp2-scrim .mp2-fold > summary h2 { font-size: 17px; }
.mp2-scrim .mp2-fold > .rb-list, .mp2-scrim .mp2-fold > .rb-steps { margin: 2px 0 14px; }
.mp2-scrim .mp2-fold .rb-list li, .mp2-scrim .mp2-fold .rb-steps li { overflow-wrap: anywhere; }
.mp2-scrim .mp2-fold > summary:focus-visible { outline: 2px solid var(--fv3-primary); outline-offset: 2px; border-radius: 12px; }
.mp2-scrim .fv3-sheet { overflow: hidden; }
.mp2-scrim .fv3-sheet > .mp2-pbody { flex: 0 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 12px; }
.mp2-scrim .mp2-pbody > * { flex-shrink: 0; }
@media (prefers-reduced-motion: reduce) { .mp2-switch i { transition: none; } }
