/* Sogilex Flyers. The editor reuses the Menus styles (menus.css); this file is the flyer itself.
   Everything below the marker is also embedded in "Save image", so it must stand on its own (no outside urls). */
.flyer-list { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.flyer-list .mselect { flex: 1 1 200px; min-width: 0; }
.sheets .flyer { box-shadow: 0 20px 60px rgba(0, 0, 0, .45); flex: none; }
#print-root .flyer { transform: none !important; box-shadow: none !important; }
.mtext { width: 100%; min-height: 84px; resize: vertical; }

/* ===== flyer page ===== */
.flyer {
  --s: 1; --hsz: 64pt;
  --f-bg: #FBF8F2; --f-ink: #221C18; --f-muted: #6B5D52; --f-accent: #8E3B24; --f-on: #FFFFFF;
  --f-rule: color-mix(in srgb, var(--f-muted) 40%, var(--f-bg));
  --f-body: 'EB Garamond', Georgia, serif; --f-bs: 1;
  --f-head: 'EB Garamond', Georgia, serif; --f-head-tf: none; --f-head-ls: -.005em; --f-head-w: 600; --f-head-lh: 1.02; --f-hs: 1;
  --f-label: 'EB Garamond', Georgia, serif; --f-label-ls: .2em; --f-label-w: 600;
  position: relative; box-sizing: border-box; overflow: hidden;
  width: 8.5in; height: 11in;
  background: var(--f-bg); color: var(--f-ink); font-family: var(--f-body);
  font-size: calc(15pt * var(--s) * var(--f-bs)); line-height: 1.35;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.flyer.size-a4 { width: 210mm; height: 297mm; }
.flyer.size-square { width: 8in; height: 8in; font-size: calc(13pt * var(--s) * var(--f-bs)); }
.flyer *, .flyer *::before, .flyer *::after { box-sizing: border-box; }
.flyer.font-elegant { --f-head: 'Playfair Display', Georgia, serif; --f-head-w: 600; --f-head-ls: -.01em; --f-head-lh: 1.04;
  --f-label: 'Playfair Display', Georgia, serif; --f-label-ls: .14em; }
.flyer.font-modern { --f-body: Inter, system-ui, sans-serif; --f-bs: .88; --f-head: Inter, system-ui, sans-serif; --f-head-ls: -.035em; --f-head-lh: .98; --f-hs: .92;
  --f-label: Inter, system-ui, sans-serif; --f-label-ls: .16em; }
.flyer.font-bold { --f-body: Inter, system-ui, sans-serif; --f-bs: .88; --f-head: 'Bebas Neue', Impact, sans-serif; --f-head-tf: uppercase; --f-head-ls: .01em; --f-head-w: 400; --f-head-lh: .9; --f-hs: 1.3;
  --f-label: Inter, system-ui, sans-serif; --f-label-ls: .16em; }
.flyer.font-warm { --f-body: Fraunces, Georgia, serif; --f-bs: .94; --f-head: Fraunces, Georgia, serif; --f-head-ls: -.02em; --f-head-lh: 1.0;
  --f-label: Fraunces, Georgia, serif; --f-label-ls: .14em; }

.f-inner { min-height: 100%; display: flex; flex-direction: column; gap: calc(22pt * var(--s)); padding: .65in .7in .55in; }
.size-square .f-inner { padding: .55in .6in .45in; gap: calc(16pt * var(--s)); }
.f-brand { display: flex; align-items: center; gap: 10pt; min-height: 0; }
.f-logo { display: block; max-height: calc(54pt * var(--s)); max-width: 2.6in; object-fit: contain; }
.f-bizname { font-family: var(--f-label); font-size: .78em; letter-spacing: var(--f-label-ls); text-transform: uppercase; font-weight: var(--f-label-w); color: var(--f-muted); }
.f-hero { display: flex; flex-direction: column; gap: calc(10pt * var(--s)); }
.f-kicker { margin: 0; font-family: var(--f-label); font-size: .82em; letter-spacing: var(--f-label-ls); text-transform: uppercase; font-weight: var(--f-label-w); color: var(--f-accent); }
.f-head { margin: 0; font-family: var(--f-head); font-weight: var(--f-head-w); text-transform: var(--f-head-tf); letter-spacing: var(--f-head-ls);
  line-height: var(--f-head-lh); font-size: calc(var(--hsz) * var(--s) * var(--f-hs)); overflow-wrap: normal; text-wrap: balance; }
.f-sub { margin: calc(4pt * var(--s)) 0 0; font-size: 1.22em; line-height: 1.3; color: var(--f-muted); text-wrap: pretty; }
.f-offer { margin: 0; font-family: var(--f-head); font-weight: var(--f-head-w); text-transform: var(--f-head-tf); letter-spacing: var(--f-head-ls);
  font-size: calc(var(--hsz) * .62 * var(--s) * var(--f-hs)); line-height: 1; color: var(--f-accent); overflow-wrap: normal; }
.flyer.f-break .f-head, .flyer.f-break .f-offer { overflow-wrap: anywhere; }
.f-info { display: flex; flex-direction: column; gap: calc(8pt * var(--s)); }
.f-row { display: flex; flex-direction: column; gap: 1pt; }
.f-lab { font-family: var(--f-label); font-size: .66em; letter-spacing: var(--f-label-ls); text-transform: uppercase; font-weight: var(--f-label-w); color: var(--f-muted); }
.f-val { font-size: 1.3em; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.f-details { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: calc(5pt * var(--s)); }
.f-details li { overflow-wrap: anywhere; }
.f-cta { align-self: flex-start; margin: 0; padding: calc(9pt * var(--s)) calc(16pt * var(--s)); background: var(--f-accent); color: var(--f-on); font-weight: 600; font-size: 1.08em; border-radius: 4pt; line-height: 1.25; overflow-wrap: anywhere; max-width: 100%; }
.f-mid { display: flex; flex-direction: column; gap: calc(22pt * var(--s)); margin-block: auto; }
.size-square .f-mid { gap: calc(16pt * var(--s)); }
.f-head, .f-offer, .f-val { max-width: 100%; }
.f-foot { display: flex; align-items: center; gap: calc(14pt * var(--s)); padding-top: calc(12pt * var(--s)); border-top: 1px solid var(--f-rule); font-size: .92em; color: var(--f-ink); }
.f-foot p { margin: 0; }
.f-foot-text { min-width: 0; display: flex; flex-direction: column; gap: 2pt; overflow-wrap: anywhere; }
.f-fine { font-size: .86em; font-style: italic; color: var(--f-muted); }
.f-qr { display: flex; align-items: center; gap: 8pt; flex: none; }
.f-qr-code { width: 1in; height: 1in; display: block; border-radius: 3pt; }
.size-square .f-qr-code { width: .85in; height: .85in; }
.f-qr-label { max-width: 1.3in; font-weight: 600; color: var(--f-ink); line-height: 1.25; }
.f-empty { color: var(--f-muted); font-style: italic; }

/* layout: Poster (centred, headline in the middle of the page) */
.layout-poster .f-inner { text-align: center; align-items: stretch; }
.layout-poster .f-brand { justify-content: center; flex-direction: column; gap: 6pt; }
.layout-poster .f-mid { align-items: center; }
.layout-poster .f-hero { align-items: center; align-self: stretch; }
.f-mid > * { max-width: 100%; }
.layout-poster .f-info { align-items: center; }
.layout-poster .f-details { align-items: center; }
.layout-poster .f-cta { align-self: center; }
.layout-poster .f-foot { justify-content: center; text-align: left; }
.layout-poster .f-foot:not(.has-qr) { text-align: center; }

/* layout: Colour block (the headline sits on a band of the accent colour) */
.layout-block .f-band { background: var(--f-accent); color: var(--f-on); margin: -.65in -.7in 0; padding: .65in .7in calc(28pt * var(--s)); display: flex; flex-direction: column; gap: calc(22pt * var(--s)); }
.size-square.layout-block .f-band { margin: -.55in -.6in 0; padding: .55in .6in calc(22pt * var(--s)); gap: calc(16pt * var(--s)); }
.layout-block .f-band .f-kicker, .layout-block .f-band .f-bizname { color: var(--f-on); opacity: .88; }
.layout-block .f-band .f-sub { color: var(--f-on); opacity: .9; }
.layout-block .f-logo-tile { background: #FFFFFF; border-radius: 6pt; padding: 6pt 8pt; display: inline-flex; }
.layout-block .f-cta { background: var(--f-ink); color: var(--f-bg); }

/* layout: Left-aligned (editorial; labelled rows with rules) */
.layout-left .f-inner { border-top: calc(10pt * var(--s)) solid var(--f-accent); }
.layout-left .f-info { gap: 0; border-top: 1px solid var(--f-rule); }
.layout-left .f-row { flex-direction: row; align-items: baseline; gap: 14pt; padding: calc(8pt * var(--s)) 0; border-bottom: 1px solid var(--f-rule); }
.layout-left .f-lab { flex: 0 0 .9in; }
.layout-left .f-details li { padding-left: 14pt; position: relative; }
.layout-left .f-details li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6pt; height: 1.5pt; background: var(--f-accent); }
.layout-left .f-mid { margin-top: 0; }
.layout-left .f-foot { margin-top: auto; }
/* the photo: a fixed height that shrinks with the text, so fitting never waits for the image to load */
.f-photo { --k: 1; --H: calc(var(--ph, 3.1in) * var(--k) * var(--s)); --pg: calc(5pt * var(--s)); display: block; width: 100%; height: var(--H); object-fit: cover; border-radius: 8pt; }
.size-square .f-photo { --k: .742; }
.layout-poster .f-photo { border-radius: 10pt; }
/* Colour block: the photo sits right under the band, edge to edge */
.layout-block .f-photo.pos-below { width: auto; margin: calc(-18pt * var(--s)) -.7in 0; border-radius: 0; }
.layout-block .f-photo { --k: 1.065; }
.size-square.layout-block .f-photo.pos-below { margin: calc(-18pt * var(--s)) -.6in 0; }
.size-square.layout-block .f-photo { --k: .71; }
.layout-block.photo-below .f-band { padding-bottom: calc(20pt * var(--s)); }
.layout-block.photo-below .f-inner { gap: calc(18pt * var(--s)); }
/* No photo: the colour band fills the free space (the message sits at its bottom edge) and the facts follow right
   under it, instead of floating in an empty middle. */
.layout-block:not(.photo-below) .f-band { flex: 1 1 auto; }
.layout-block:not(.photo-below) .f-band > :last-child { margin-top: auto; }
.layout-block:not(.photo-below) .f-mid { margin-block: 0 auto; padding-top: calc(10pt * var(--s)); }
/* Left-aligned: a framed photo with the accent colour on its left edge */
.layout-left .f-photo { border-radius: 0; border-left: calc(8pt * var(--s)) solid var(--f-accent); }
/* story size (Instagram / Facebook stories, 9:16): saved as 1080 x 1920 */
.flyer.size-story { width: 7.5in; height: 13.333in; font-size: calc(15pt * var(--s) * var(--f-bs)); }
.size-story .f-inner { padding: .9in .62in .7in; }
.size-story .f-photo { --k: 1.355; }
.size-story.layout-block .f-band { margin: -.9in -.62in 0; padding: .9in .62in calc(26pt * var(--s)); }
.size-story.layout-block .f-photo.pos-below { margin: calc(-18pt * var(--s)) -.62in 0; }
.size-story.layout-block .f-photo { --k: 1.42; }

/* display lettering for headlines (the @font-face rules are in menus.css; Save image embeds the fonts itself) */
.flyer.font-heavy { --f-body: Inter, system-ui, sans-serif; --f-bs: .88; --f-head: Anton, Impact, sans-serif; --f-head-tf: uppercase; --f-head-ls: .01em; --f-head-w: 400; --f-head-lh: .95; --f-hs: 1.15;
  --f-label: Inter, system-ui, sans-serif; --f-label-ls: .16em; }
.flyer.font-slab { --f-body: Inter, system-ui, sans-serif; --f-bs: .88; --f-head: 'Alfa Slab One', Rockwell, serif; --f-head-ls: 0; --f-head-w: 400; --f-head-lh: 1.02; --f-hs: .86;
  --f-label: Inter, system-ui, sans-serif; --f-label-ls: .16em; }
.flyer.font-western { --f-head: Rye, Georgia, serif; --f-head-ls: .01em; --f-head-w: 400; --f-head-lh: 1.05; --f-hs: .82; }
.flyer.font-script { --f-body: Inter, system-ui, sans-serif; --f-bs: .88; --f-head: Lobster, 'Brush Script MT', cursive; --f-head-ls: 0; --f-head-w: 400; --f-head-lh: 1.05; --f-hs: 1;
  --f-label: Inter, system-ui, sans-serif; --f-label-ls: .16em; }

/* a customer review (Posts): the quote in italics, the name under it */
.is-quote .f-head { font-style: italic; text-transform: none; letter-spacing: 0; line-height: 1.2; text-wrap: pretty; }
.is-quote.font-heavy .f-head, .is-quote.font-slab .f-head, .is-quote.font-western .f-head { font-style: normal; }
.is-quote .f-sub { color: var(--f-accent); font-weight: 600; font-size: 1.05em; }
/* Free trial only: the Sogilex line under everything (paid plans don't have it). */
.f-mark { flex: none; margin: calc(10pt * var(--s)) 0 0; text-align: center; font: 500 9pt/1.3 Inter, system-ui, sans-serif; letter-spacing: .02em; color: var(--f-ink); opacity: .62; }
/* Several photos (2026-12-01): the .f-photo box above keeps its size; the photos share it. */
div.f-photo { display: grid; gap: calc(5pt * var(--s)); overflow: hidden; }
.f-photo.n2 { grid-template-columns: 1fr 1fr; }
.f-photo.n3 { grid-template-columns: 3fr 2fr; grid-template-rows: 1fr 1fr; }
.f-photo.n3 .f-ph:first-child { grid-row: 1 / 3; }
.f-photo.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.f-photo.fill.n2.arr-column { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
.f-photo.fill.n3.arr-row { grid-template-columns: repeat(3, 1fr); grid-template-rows: 1fr; }
.f-photo.fill.n3.arr-row .f-ph:first-child, .f-photo.fill.n3.arr-column .f-ph:first-child { grid-row: auto; }
.f-photo.fill.n3.arr-column { grid-template-columns: 1fr; grid-template-rows: repeat(3, 1fr); }
.f-photo.fill.n4.arr-row { grid-template-columns: repeat(4, 1fr); grid-template-rows: 1fr; }
.f-photo.fill.n4.arr-feature { grid-template-columns: 2fr 1fr; grid-template-rows: repeat(3, 1fr); }
.f-photo.fill.n4.arr-feature .f-ph:first-child { grid-row: 1 / 4; }
/* Whole photos: nothing cut off. The box is as wide as the photos allow at the chosen height (set inline). */
div.f-photo.whole { display: flex; gap: var(--pg); height: auto; max-height: var(--H); margin-inline: auto; border-radius: 0; overflow: visible; }
.layout-left div.f-photo.whole { border-left: 0; }
.f-photo.whole .f-ph { border-radius: calc(5pt * var(--s)); }
.f-photo.whole .f-row-ph { display: flex; gap: var(--pg); }
.f-photo.whole .f-side-ph { display: flex; flex-direction: column; gap: var(--pg); min-width: 0; overflow: hidden; }
.f-photo.whole .f-side-ph .f-ph { flex: none; width: 100%; }
.f-photo.whole .f-side-ph { overflow: visible; }
.layout-block .f-photo.whole.pos-below { margin-inline: auto; }
.f-ph { position: relative; overflow: hidden; min-width: 0; min-height: 0; }
.f-ph img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; }
/* ===== end flyer page ===== */

@media print {
  #print-root .flyer { break-after: page; }
  #print-root .flyer:last-child { break-after: auto; }
}
/* "Use a dish from my menu": a list is as wide as its longest dish, so keep it inside the card, the size of the boxes below. */
#f-dish { flex: 1 1 100%; width: 100%; min-width: 0; max-width: 100%; min-height: 44px; border-radius: 12px; padding: 0 12px; font-size: 15px; text-overflow: ellipsis; }

/* The form's photo picker and adjuster (not part of the flyer itself) */
#f-photo-pick { display: flex; flex-direction: column; gap: 12px; }
.f-chosen { display: flex; flex-wrap: wrap; gap: 10px; }
.f-chip { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.f-chip-ph { position: relative; width: 76px; height: 76px; padding: 0; border: 2px solid var(--ctl); border-radius: 12px; overflow: hidden; background: rgba(255, 255, 255, .04); cursor: pointer; }
.f-chip-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.f-chip.on .f-chip-ph, .f-chip-ph:hover { border-color: var(--lime); }
.f-chip-ph:focus-visible, .f-lib-ph:focus-visible, .f-adj-frame:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.f-chip-n { position: absolute; top: 4px; left: 4px; min-width: 20px; height: 20px; border-radius: 999px; background: rgba(18, 10, 24, .85); color: #fff; font: 600 12px/20px var(--body); text-align: center; }
.f-chip-tools { display: flex; gap: 4px; }
.f-mini { min-width: 30px; min-height: 30px; border-radius: 8px; border: 1px solid var(--ctl); background: transparent; color: var(--mute); font: 14px var(--body); cursor: pointer; padding: 0; }
.f-mini:hover { color: var(--text); border-color: var(--mute); }
.f-lib { display: flex; flex-direction: column; gap: 6px; }
.f-lib .mini { min-height: 0; }
.f-lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.f-lib-ph { aspect-ratio: 1; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: rgba(255, 255, 255, .04); color: var(--mute); font: 12px var(--body); cursor: pointer; }
.f-lib-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.f-lib-ph:hover:not(:disabled) { border-color: var(--lime); }
.f-lib-ph:disabled { opacity: .4; cursor: not-allowed; }
.f-adj { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--lime); border-radius: 12px; }
.f-adj .mini { min-height: 0; }
.f-adj-frame { position: relative; width: 100%; max-height: 260px; overflow: hidden; border-radius: 8px; cursor: grab; touch-action: none; background: #000; }
.f-adj-frame:active { cursor: grabbing; }
.f-adj-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; pointer-events: none; }
.f-adj-row .f-adj-zoom { flex: 1 1 140px; accent-color: var(--lime); }
.f-sets { display: flex; flex-direction: column; gap: 10px; padding: 10px 0 2px; border-top: 1px solid var(--line); }
.f-set .choices { margin-top: 4px; }
.f-set .choice { min-height: 36px; font-size: 13px; }
