/* Non-critical styles: loaded asynchronously to reduce render blocking.
   These affect UI that is hidden by default or below the fold. */

/* Header search modal (hidden by default) */
#header-search-modal {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
#header-search-modal.hidden {
  display: none !important;
}
#header-search-modal .search-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
#header-search-modal .search-modal-box {
  width: 75vw;
  max-width: 75vw;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-radius: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.04), 0 2px 6px rgba(0,0,0,0.04), 0 16px 40px rgba(0,0,0,0.12), 0 24px 80px rgba(0,0,0,0.16);
  transition: height 0.25s ease-out;
}
#header-search-modal .search-modal-box.search-modal-box--expanded {
  height: 75vh;
  max-height: 75vh;
}
#header-search-modal .search-modal-header {
  font-family: var(--font-heading-serif);
  font-weight: 600;
  color: var(--brand-brown);
  font-size: 1.25rem;
  letter-spacing: 0.01em;
}
#header-search-modal .search-modal-close {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  color: var(--brand-brown);
  background: rgba(97, 42, 14, 0.08);
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
#header-search-modal .search-modal-close:hover {
  background: rgba(97, 42, 14, 0.15);
  color: var(--brand-brown);
}
#header-search-modal .search-modal-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(97, 42, 14, 0.12), transparent);
}
#header-search-modal #header-search-input {
  padding: 1rem 1rem 1rem 3rem;
  border-radius: 1rem;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.9);
  font-size: 1rem;
  transition: box-shadow 0.2s, border-color 0.2s;
}
#header-search-modal #header-search-input::placeholder {
  color: rgba(0,0,0,0.4);
}
#header-search-modal #header-search-input:focus {
  outline: none;
  border-color: rgba(74, 99, 49, 0.5);
  box-shadow: 0 0 0 3px rgba(74, 99, 49, 0.15);
}
#header-search-modal .search-input-wrap {
  position: relative;
}
#header-search-modal .search-input-wrap .search-input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.25rem;
  height: 1.25rem;
  color: rgba(97, 42, 14, 0.5);
  pointer-events: none;
}
#header-search-modal .search-submit-btn {
  padding: 1rem 1.5rem;
  border-radius: 1rem;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-green) 0%, #3F5629 100%);
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(74, 99, 49, 0.35);
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}
#header-search-modal .search-submit-btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #e07c4a 0%, #c45c3e 100%);
  box-shadow: 0 4px 14px rgba(196, 92, 62, 0.4);
}
#header-search-modal .search-preview-area {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  margin-top: 0.5rem;
}
#header-search-preview {
  border-radius: 1rem;
  border: 1px solid rgba(0,0,0,0.06);
  background: rgba(255,255,255,0.95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

/* Cookie consent banner + settings modal (hidden by default).
   Tailwind's v3-only opacity-slash (bg-slate-900/50) and arbitrary-value
   ([90vh], z-[9998]) syntax aren't in the compiled tailwind.min.css (v2),
   so the overlay/z-index/scroll rules are hand-written here instead. */
.cookie-banner {
  z-index: 9998;
}
.cookie-banner-backdrop {
  background: rgba(15, 23, 42, 0.5);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.cookie-banner-box {
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
}
#cookie-settings-float {
  z-index: 9997;
}

/* Header recipes dropdown open state (only affects interaction state) */
.js-receptek-menu-wrap.receptek-dropdown--open .receptek-dropdown {
  display: block;
}
.js-receptek-menu-wrap.receptek-dropdown--open .js-receptek-chevron {
  transform: rotate(180deg);
}

/* Kép lightbox: cikkbe (recept/blog/alapanyag szöveges tartalmába) illesztett képre
   kattintva teljes méretben, sötétített háttér előtt jelenik meg, nyomtatható. */
.prose img,
.recipe-intro img,
.recipe-instructions img,
.ingredient-description img {
  cursor: zoom-in;
}
#image-lightbox {
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem 2rem;
}
#image-lightbox.hidden {
  display: none !important;
}
#image-lightbox .image-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
}
#image-lightbox .image-lightbox-box {
  position: relative;
  max-width: 95vw;
  max-height: 88vh;
  display: flex;
}
#image-lightbox .image-lightbox-controls {
  position: absolute;
  top: -2.75rem;
  right: 0;
  display: flex;
  gap: 0.5rem;
}
#image-lightbox .image-lightbox-print,
#image-lightbox .image-lightbox-close {
  border: none;
  cursor: pointer;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  transition: background 0.2s;
}
#image-lightbox .image-lightbox-print:hover,
#image-lightbox .image-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
}
#image-lightbox .image-lightbox-print {
  padding: 0.5rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 600;
}
#image-lightbox .image-lightbox-close {
  width: 2.25rem;
  height: 2.25rem;
  font-size: 1.25rem;
  line-height: 1;
}
#image-lightbox img {
  max-width: 95vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  background: #fff;
  margin: 0 auto;
}

/* Nyomtatáskor csak a lightboxban megnyitott kép látszódjon, minden más elrejtve,
   a kép pedig egy A4-es lapba (297x210mm, 15mm margóval) férjen bele torzítás nélkül. */
@page {
  size: A4;
  margin: 15mm;
}
body.printing-lightbox-image > *:not(#image-lightbox) {
  display: none !important;
}
body.printing-lightbox-image #image-lightbox {
  position: static;
  padding: 0;
  background: none;
}
body.printing-lightbox-image #image-lightbox .image-lightbox-backdrop,
body.printing-lightbox-image #image-lightbox .image-lightbox-controls {
  display: none !important;
}
body.printing-lightbox-image #image-lightbox .image-lightbox-box {
  max-width: 100%;
  max-height: none;
}
body.printing-lightbox-image #image-lightbox img {
  max-width: 180mm;
  max-height: 267mm;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: none;
}

