/**
 * Balenie hotových jedál (zatavovanie-informacie) — design layer.
 *
 * Content is 1:1 from the legacy bionela.eu page; the look is the shared eco
 * long-form shell (pages/ekomaterialy.css), which this sheet depends on. Only
 * what the shell does not already cover lives here: the product cut-out gallery
 * strip, the YouTube embed card, the video+form row, and the restyle of the
 * embedded Contact Form 7 form (id 2139140).
 *
 * Scoped under .zatav so the generic names never leak. Tokens only — no raw hex
 * for tokenized colours.
 */

/* ---- Gallery strip (the legacy [woodmart_gallery] columns="4") ------------ */
/*
 * All seven tiles are product cut-outs shot on white, so they are contained,
 * never cover-cropped — cropping a cut-out eats the product (the same reasoning
 * as .es-gallery on Eko štart and .br-gallery on Branding). The legacy element
 * was 4 columns and seven images, so the last row is deliberately short.
 */
.zatav .zat-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
}
.zatav .zat-gallery__cell {
  margin: 0;
  padding: var(--space-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg);
  overflow: hidden;
  aspect-ratio: 1 / 1;
}
/*
 * height is declared, not left to WP: wp_get_attachment_image() prints a height
 * attribute and the global reset only sets img { max-width:100% }, so that
 * attribute would win as a presentational hint and the cell's aspect-ratio crop
 * would be silently ignored.
 */
.zatav .zat-gallery__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ---- Video + enquiry form row (the legacy 1/3 + 2/3 columns) -------------- */
.zatav .zat-contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: var(--space-6);
  align-items: start;
}
.zatav .zat-h3 {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--ink);
  margin: 0 0 var(--space-3);
}

/* Embedded video (responsive 16:9).
 * The same aspect-ratio-card pattern pages/kontakt.css uses for its Google Maps
 * embeds (.kontakt-loc__map) — restated here because that sheet is scoped under
 * .kontakt, so this page inherits none of it. The dark backdrop covers the beat
 * before the lazy iframe paints. */
.zatav .zat-video {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--dark-1);
  aspect-ratio: 16 / 9;
}
.zatav .zat-video iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---- Contact Form 7, id 2139140 ("00 - Zatavovanie jedál") ---------------- */
/*
 * The CF7 restyle in pages/kontakt.css is scoped under .kontakt, so none of it
 * reaches this page and the rules are restated here. They are not a copy: this
 * form's markup differs from form 3498's. It has no textarea (no .textsprava),
 * and its .row cells are .col-md-6 / .col-md-12 rather than thirds — hence the
 * 12-column grid below instead of kontakt's repeat(3, 1fr), which would leave a
 * half-width field sitting in a third of the row.
 */
/*
 * The panel. CF7's own .wpcf7 wrapper is the form's box, restyled in place (the
 * pages/odstupenie.css precedent) rather than nested inside a second card.
 *
 * This is not decoration for its own sake: this page's WPBakery post meta
 * (_wpb_post_custom_css) is injected into wp_head as <style
 * data-type="vc_custom-css"> and gives a bare .wpcf7 a raw box-shadow / 10px
 * radius / 15px padding card. Leaving that in place would put the form's look
 * outside the token system and make it depend on js_composer still injecting
 * page CSS — the same dependency the inlined markup exists to shed. Restating it
 * here in tokens takes ownership: .zatav .wpcf7 (0,2,0) outranks that sheet's
 * .wpcf7 (0,1,0) on specificity, so no !important is needed and the panel
 * survives WPBakery being switched off. Teal-50 on the white .eko-content card
 * is the shell's own in-card panel recipe (.eko-callout), and the white inputs
 * read against it.
 */
.zatav .wpcf7 {
  margin: 0;
  padding: var(--space-5);
  border: 1px solid var(--teal-line-soft);
  border-radius: var(--radius-lg);
  background: var(--teal-50);
  box-shadow: none;
}

/* CF7 runs the form through wpautop, so every cell's label+input is wrapped in a
 * <p>. Reset those; only the form's own top-level rows (the submit) get spacing. */
.zatav .wpcf7-form p { margin: 0; }

.zatav .wpcf7-form .row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0 var(--space-4);
}
.zatav .wpcf7-form .row > .col-md-6 { grid-column: span 6; }
.zatav .wpcf7-form .row > .col-md-12 { grid-column: span 12; }
.zatav .wpcf7-form .row .wpcf7-form-control-wrap { display: block; }

/* Field labels. Scoped to .row so the acceptance/radio labels — which are
 * clickable wrappers around a control, not field captions — keep their own rule
 * below. kontakt.css exempts .col-md-12 wholesale, which on this form would also
 * flatten the real "Telefónne číslo" label. */
.zatav .wpcf7-form .row label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  margin: 0 0 var(--space-1);
}

.zatav .wpcf7-form input[type="text"],
.zatav .wpcf7-form input[type="email"],
.zatav .wpcf7-form input[type="tel"] {
  width: 100%;
  padding: 11px var(--space-4);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.3;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.zatav .wpcf7-form input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-50);
}

/* Acceptance + newsletter rows. Both are direct children of the form (outside
 * any .row), so the child combinator keeps this off the phone field's cell. */
.zatav .wpcf7-form > .col-md-12 {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}
.zatav .wpcf7-form > .acceptance { margin-bottom: var(--space-3); }

/* The radio pair renders "Nie" / "Áno" side by side, with the newsletter
 * sentence running on after it. */
.zatav .wpcf7-form .wpcf7-radio {
  display: inline-flex;
  gap: var(--space-4);
}
.zatav .wpcf7-form .wpcf7-list-item { margin: 0; }
/* Last of the label rules on purpose: it ties with the .row rule on specificity,
 * so source order decides if a checkbox ever lands inside a .row. */
.zatav .wpcf7-form .wpcf7-list-item label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-weight: 500;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
}
.zatav .wpcf7-form input[type="checkbox"],
.zatav .wpcf7-form input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
  vertical-align: middle;
}
.zatav .wpcf7-form a { color: var(--teal); font-weight: 600; }

/* Submit — teal primary, overriding the legacy .btn-color-black. */
.zatav .wpcf7-form > p { margin: var(--space-2) 0 0; }
.zatav .wpcf7-form .btn-color-black,
.zatav .wpcf7-form input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px var(--space-7);
  border: 0;
  border-radius: var(--radius);
  background: var(--teal);
  color: var(--bg);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: background .15s ease, transform .1s ease;
}
.zatav .wpcf7-form .btn-color-black:hover,
.zatav .wpcf7-form input[type="submit"]:hover { background: var(--teal-600); }
.zatav .wpcf7-form .btn-color-black:active,
.zatav .wpcf7-form input[type="submit"]:active { transform: translateY(1px); }

/* CF7 feedback + validation. */
.zatav .wpcf7-response-output {
  margin: var(--space-4) 0 0 !important;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  border-left-width: 4px;
  font-size: 14px;
}
.zatav .wpcf7 form.sent .wpcf7-response-output { border-left-color: var(--green); }
.zatav .wpcf7 form.invalid .wpcf7-response-output,
.zatav .wpcf7 form.failed .wpcf7-response-output { border-left-color: var(--danger); }
.zatav .wpcf7-not-valid-tip { color: var(--danger); font-size: 12px; }
.zatav .wpcf7-form .wpcf7-not-valid { border-color: var(--danger); }

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 980px) {
  /* The video is a supporting explainer beside the form; once they stack, the
     card would run the full card width, so it keeps the legacy column's size. */
  .zatav .zat-contact { grid-template-columns: 1fr; }
  .zatav .zat-contact__video { max-width: 460px; }

  /* Stacked, the shell hands .mat-media the full card width. This intro graphic
     is only 545px wide, so it would upscale and dominate the page; cap it near
     the 320px track it occupies on desktop and centre it. Scoped to .zatav, so
     the other shell pages keep their own behaviour. */
  .zatav .mat-block.has-media .mat-media {
    max-width: 360px;
    margin-inline: auto;
  }
}

@media (max-width: 700px) {
  .zatav .zat-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
  .zatav .zat-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .zatav .wpcf7-form .row > .col-md-6 { grid-column: span 12; }
}
