/* ==========================================================================
   Vitamin Horgoš — recipes.css (premium 10, item 5: the recipe as an editorial magazine)
   recepti.html (list) and recept.html (detail + print). Linked after content.css and overrides
   its recipe rules where the magazine layout differs.
   ========================================================================== */

/* ---------- Recepti: list ---------- */
.rlist .section__head { margin-bottom: var(--sp-48); }
.rlist__note { margin-bottom: var(--sp-32); font-size: var(--t-eyebrow); font-weight: var(--fw-semibold); letter-spacing: var(--track-eyebrow); text-transform: uppercase; color: var(--gold-ink); }
.rgrid { gap: var(--sp-64) var(--sp-32); }
.rgrid > .empty { grid-column: 1 / -1; }
.rgrid .empty h3 { font-size: var(--t-h3); }

/* ---------- Recept: hero ---------- */
.rprint, .rprint__foot, .rprint__products { display: none; }
.rhero .phero__title { max-width: 20ch; }
.rhero__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-4) var(--sp-12);
  margin-top: var(--sp-8);
  font-size: var(--t-eyebrow);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--track-eyebrow);
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--on-dark-body);
}
.rhero__meta:empty { display: none; }
.rhero__meta span + span::before { content: "·"; margin-right: var(--sp-12); color: var(--gold); }

/* ---------- Recept: two-column magazine body ---------- */
.recipe__grid {
  display: grid;
  grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
  gap: clamp(var(--sp-48), 7vw, var(--sp-112));
  align-items: start;
}

/* LEFT: sticky ingredient panel on cream. It never grows past the viewport: the list scrolls inside it,
   the heading and the add button stay put, so the whole panel stays in view while the steps scroll. */
.rpanel.ingredients {
  position: sticky;
  top: calc(var(--header-h) + var(--sp-24));
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: calc(100vh - var(--header-h) - var(--sp-48));
  padding: var(--sp-32) var(--sp-32) var(--sp-24);
  border: 0;
  border-top: 1px solid var(--gold);
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--cream);
}
.rpanel .ing-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-16); }
.rpanel .ing-head h2 { font-size: var(--t-h3); font-weight: var(--fw-light); line-height: 1.15; }
.rpanel .ing-progress { font-size: var(--t-eyebrow); font-weight: var(--fw-semibold); letter-spacing: var(--track-eyebrow); color: var(--gold-ink); font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.ing-hint { margin-top: var(--sp-8); font-size: var(--t-card-body); line-height: 1.5; color: var(--ink-body); }
.ing-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: var(--sp-16) calc(-1 * var(--sp-8)) 0;
  padding: 0 var(--sp-8) var(--sp-16);
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 20px), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 20px), transparent);
  scrollbar-width: thin;
  scrollbar-color: var(--gold-ink) transparent;
}
.rpanel .ing-group { margin: var(--sp-24) 0 var(--sp-4); font-family: var(--font-sans); font-size: var(--t-eyebrow); font-weight: var(--fw-semibold); letter-spacing: var(--track-eyebrow); text-transform: uppercase; color: var(--gold-ink); }
.ing-scroll > .ing-group:first-child { margin-top: var(--sp-4); }
.rpanel .ing-list { display: grid; border-top: 0; }
.rpanel .ing-list li { border-bottom: 1px solid var(--line-light); }
.rpanel .ing-list li:last-child { border-bottom: 0; }
.rpanel .ing-list .check { align-items: center; gap: var(--sp-16); min-height: 52px; padding: var(--sp-8) 0; font-size: 1.125rem; line-height: 1.45; color: var(--ink); }

/* gold square bullets that are also the checklist boxes: a small solid square in a hairline frame,
   ticked → a filled bronze square with a cream check */
.rpanel .ing-list .check input {
  flex: none;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin: 0;
  border: 1px solid var(--gold-ink);
  border-radius: 0;
  background: transparent;
  transition: background-color var(--dur-hover) var(--ease-out);
}
.rpanel .ing-list .check input::after {
  content: "";
  width: 8px;
  height: 8px;
  border: 0;
  background: var(--gold-ink);
  transform: none;
  opacity: 1;
  transition: none;
}
.rpanel .ing-list .check input:checked { background: var(--gold-ink); border-color: var(--gold-ink); }
.rpanel .ing-list .check input:checked::after {
  width: 11px;
  height: 6px;
  border: 2px solid var(--cream);
  border-top: 0;
  border-right: 0;
  background: transparent;
  transform: translate(0, -1px) rotate(-45deg);
}
.rpanel .ing-list .check input:checked + span { text-decoration: line-through; text-decoration-color: var(--gold-ink); color: var(--ink-body); }

.rpanel .ing-reset {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-8);
  min-height: var(--tap);
  margin-top: var(--sp-8);
  font-size: var(--t-eyebrow);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--gold-ink);
}
.rpanel .ing-reset .icon { width: 18px; height: 18px; }
.rpanel .ing-reset:hover { text-decoration: underline; text-underline-offset: 5px; }

.ing-foot { flex: none; display: grid; gap: var(--sp-4); padding-top: var(--sp-16); border-top: 1px solid var(--line-light-strong); }
.ing-foot__label { font-size: var(--t-eyebrow); font-weight: var(--fw-semibold); letter-spacing: var(--track-eyebrow); text-transform: uppercase; color: var(--gold-ink); }
.ing-foot__names { font-size: var(--t-card-body); line-height: 1.5; color: var(--ink); }
.ing-foot__names a { text-decoration: underline; text-decoration-color: var(--line-light-strong); text-underline-offset: 4px; }
.ing-foot__names a:hover { text-decoration-color: var(--gold-ink); }
.ing-add { width: 100%; margin-top: var(--sp-12); padding-inline: var(--sp-16); white-space: normal; text-align: center; line-height: 1.3; }
.ing-add .icon { flex: none; }
.ing-add[aria-busy="true"] { opacity: 0.8; cursor: progress; }

/* RIGHT: numbered steps, 72px light serif numerals in bronze, hairlines between */
.rsteps { display: grid; justify-items: start; gap: 0; min-width: 0; }
.rsteps__head { margin-bottom: var(--sp-32); }
.rsteps__head .section__title { font-size: var(--t-h2); }
.rbody .steps-list { width: 100%; margin-top: 0; border-top: 1px solid var(--line-light); counter-reset: none; }
.rbody .steps-list li {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: var(--sp-32);
  align-items: start;
  padding: var(--sp-48) 0;
  border-bottom: 1px solid var(--line-light);
}
.rbody .steps-list__num {
  font-family: var(--font-serif);
  font-size: 4.5rem;
  font-weight: 300;
  line-height: 0.8;
  color: var(--gold-ink);
  font-variant-numeric: lining-nums tabular-nums;
}
.rbody .steps-list p { max-width: 38rem; padding-top: var(--sp-4); font-size: 1.1875rem; line-height: 1.7; color: var(--ink); }
.rbody .recipe__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-12) var(--sp-24); margin-top: var(--sp-32); }

/* not found: the group chips */
.rnf { gap: var(--sp-24); }
.rnf__groups { justify-content: center; }

/* products used: with one or two packs the head sits left of the cards instead of above a mostly empty row */
@media (min-width: 1025px) {
  .rprods--few > .container { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: var(--sp-64); align-items: start; }
  .rprods--few > .container > .shead { grid-column: 1 / -1; }
  .rprods--few .section__head { margin-bottom: 0; }
}

/* similar recipes */
.rmore__link { justify-self: end; }

/* ---------- Responsive: stack, ingredients first ---------- */
@media (max-width: 1024px) {
  .recipe__grid { grid-template-columns: minmax(0, 1fr); gap: var(--sp-64); }
  .rpanel.ingredients { position: static; max-height: none; }
  .ing-scroll { overflow: visible; margin-inline: 0; padding-inline: 0; -webkit-mask-image: none; mask-image: none; }
  .ing-add { width: auto; justify-self: start; }
  .rmore__link { justify-self: start; }
}
@media (max-width: 640px) {
  .rgrid { gap: var(--sp-48); }
  .rpanel.ingredients { padding: var(--sp-24) var(--sp-16) var(--sp-16); }
  .ing-add { width: 100%; }
  .rbody .steps-list li { grid-template-columns: 56px minmax(0, 1fr); gap: var(--sp-16); padding: var(--sp-32) 0; }
  .rbody .steps-list__num { font-size: 3rem; }
  .rhero .phero__actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .rpanel .ing-list .check input { transition: none; }
}

/* ---------- Štampaj recept: A4, logo, title, meta, ingredients | steps, products, address ---------- */
@page { size: A4; margin: 16mm; }
@media print {
  html, body { background: #fff !important; color: #000 !important; }
  body > :not(main), .skip-link, .crumbs, .phero__media, .phero__actions, .phero::after, .phero::before,
  .shead, .ing-hint, .ing-progress, .ing-reset, .ing-foot, .recipe__actions, #r-products-sec, #r-more-sec { display: none !important; }
  main { padding: 0 !important; }
  .container { max-width: none !important; padding: 0 !important; }
  .js [data-reveal], .js .hseq, .js .is-split .hw > span, .js .phero__title { opacity: 1 !important; transform: none !important; animation: none !important; visibility: visible !important; }

  .phero.rhero { display: block; min-height: 0 !important; margin: 0 !important; padding: 0 0 4mm !important; background: none !important; color: #000 !important; text-align: center; overflow: visible; border-bottom: 0.5pt solid #999; }
  .rhero .phero__inner { display: block; }
  .rprint { display: block !important; margin-bottom: 4mm; }
  .rprint__logo { display: block; width: 24mm; height: auto; margin: 0 auto; }
  .rhero .eyebrow, .rhero .eyebrow a { display: block; margin-bottom: 2mm; color: #654A12 !important; font-size: 9pt; text-decoration: none; }
  .rhero .phero__title { max-width: none; margin: 0 0 1.5mm; color: #000 !important; font-size: 24pt; line-height: 1.1; }
  .rhero .phero__lead { max-width: none; margin: 0 0 3mm; color: #333 !important; font-size: 11pt; }
  .rhero .phero__lead { margin-inline: auto; }
  .rhero__meta { justify-content: center; margin: 0; color: #333 !important; font-size: 9pt; }
  .rhero__meta span + span::before { color: #654A12; }

  .section.rbody { padding: 5mm 0 0 !important; background: none !important; content-visibility: visible; }
  .recipe__grid { display: grid !important; grid-template-columns: 60mm minmax(0, 1fr) !important; gap: 8mm !important; align-items: start; }
  .rpanel.ingredients { position: static !important; max-height: none; padding: 0; border: 0; background: none !important; }
  .rpanel .ing-head h2, .rsteps__head .section__title { font-size: 15pt !important; color: #000; }
  .ing-scroll { overflow: visible; margin: 2mm 0 0; padding: 0; -webkit-mask-image: none; mask-image: none; }
  .rpanel .ing-group { margin: 3mm 0 1mm; font-size: 8pt; color: #654A12; }
  .rpanel .ing-list li { border-bottom: 0.5pt solid #ccc; break-inside: avoid; }
  .rpanel .ing-list .check { min-height: 0; gap: 2.5mm; padding: 0.7mm 0; font-size: 10pt; line-height: 1.3; color: #000; }
  .rpanel .ing-list .check input, .rpanel .ing-list .check input:checked { width: 3mm; height: 3mm; border: 0.5pt solid #654A12; background: none !important; }
  .rpanel .ing-list .check input::after { display: none; }
  .rpanel .ing-list .check input:checked + span { text-decoration: none; color: #000; }
  .rsteps__head { margin-bottom: 2mm; }
  .rbody .steps-list li { grid-template-columns: 12mm minmax(0, 1fr); gap: 3mm; padding: 1.6mm 0; border-bottom: 0.5pt solid #ccc; break-inside: avoid; }
  .rbody .steps-list__num { font-size: 22pt; color: #654A12; }
  .rbody .steps-list p { max-width: none; padding: 0; font-size: 10pt; line-height: 1.45; color: #000; }
  .rprint__products { display: block !important; margin-top: 4mm; font-size: 10pt; color: #000; }
  .rprint__products, .rprint__foot { max-width: none !important; }
  .rprint__foot { display: block !important; margin-top: 4mm; break-inside: avoid; text-align: center; padding-top: 2mm; border-top: 0.5pt solid #999; font-size: 8.5pt; color: #333; }
  .brand { font-weight: 600; }
  a { color: inherit !important; text-decoration: none !important; }
}
