/**
 * Selection értesítő: a hős „Értesítést kérek” gombja és a felugró ablak.
 *
 * A gomb a hős sötét hátterén a főoldali világos körvonalas gomb (home-cta
 * --light) mása, saját osztállyal, hogy ne függjön attól, melyik Etch-stílus
 * van az oldalon. A dialógus a korhatár-kapu kinézetét követi. px, mert az
 * ACSS miatt 1rem = 10px.
 */

/* ------------------------------------------------------------- a gomb */

.sel-ert {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-block-start: 4px;
}

.sel-page .sel-ert__open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
  padding: 13px 22px;
  border: 1px solid #fff;
  border-radius: var(--iw-btn-radius, 0);
  background-color: transparent;
  background-image: linear-gradient(#B3161E, #B3161E);
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 0% 100%;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-size .4s cubic-bezier(.2, .7, .2, 1), border-color .25s ease;
}

.sel-page .sel-ert__open:hover,
.sel-page .sel-ert__open:focus-visible {
  border-color: #B3161E;
  background-size: 100% 100%;
}

.sel-page .sel-ert__open:focus-visible {
  outline: 2px solid #E8C77A;
  outline-offset: 3px;
}

.sel-ert__icon {
  flex: none;
  color: #E8C77A;
  transition: color .25s ease;
}

.sel-ert__open:hover .sel-ert__icon,
.sel-ert__open:focus-visible .sel-ert__icon {
  color: #fff;
}

.sel-page .sel-ert__hint {
  color: #8a8a8a;
  font-size: 13px;
  line-height: 1.4;
}

@media (width <= 480px) {
  .sel-page .sel-ert__open {
    inline-size: 100%;
  }
}

/* ---------------------------------------------------------- a dialógus */

/* A hős `color: #fff`-ét a dialógus örökölné: a top layerben is a DOM-fa
   gyereke marad. */
.sel-ert__dialog {
  box-sizing: border-box;
  inline-size: min(520px, calc(100vw - 32px));
  max-inline-size: none;
  max-block-size: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: #111;
  box-shadow: 0 24px 64px rgb(17 18 22 / 28%);
  font-family: inherit;
  text-align: start;
}

.sel-ert__dialog::backdrop {
  background: rgb(17 18 22 / 72%);
  backdrop-filter: blur(3px);
}

html:has(.sel-ert__dialog[open]) {
  overflow: hidden;
}

.sel-ert__dialog:focus {
  outline: none;
}

/* Az innowine-a11y.css a sötét hősben fehérre állítja a fókuszkeretet; a
   dialógus a hős gyereke, de fehér alapon van, ott a piros kell. */
.sel-hero .sel-ert__dialog :is(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline-color: #B3161E;
}

.sel-ert__dialog[open] {
  animation: sel-ert-in .22s cubic-bezier(.2, .7, .2, 1);
}

@keyframes sel-ert-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sel-ert__dialog[open] {
    animation: none;
  }

  .sel-page .sel-ert__open {
    transition: none;
  }
}

.sel-ert__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 40px 40px 32px;
}

@media (width <= 480px) {
  .sel-ert__inner {
    padding: 36px 20px 24px;
  }
}

:is(.sel-page, .sel-ert-hely) .sel-ert__close {
  position: absolute;
  inset-block-start: 10px;
  inset-inline-end: 10px;
  display: grid;
  place-items: center;
  inline-size: 40px;
  block-size: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #6b6b6b;
  cursor: pointer;
}

:is(.sel-page, .sel-ert-hely) .sel-ert__close:hover,
:is(.sel-page, .sel-ert-hely) .sel-ert__close:focus-visible {
  background: #f3f0ea;
  color: #111;
}

:is(.sel-page, .sel-ert-hely) .sel-ert__close:focus-visible {
  outline: 2px solid #B3161E;
  outline-offset: 0;
}

.sel-ert__eyebrow {
  color: #8a6d2c;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: .14em;
  text-transform: uppercase;
}

:is(.sel-page, .sel-ert-hely) .sel-ert__title {
  padding-inline-end: 28px;
  color: #111;
  font-size: clamp(24px, 3vw, 28px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -.01em;
  text-wrap: balance;
}

:is(.sel-page, .sel-ert-hely) .sel-ert__lead {
  margin-block-end: 8px;
  color: #4a4a4a;
  font-size: 15px;
  line-height: 1.55;
  text-wrap: pretty;
}

/* ---------------------------------------- az űrlap: egymás alatti sorok */

.iw-form--sel fieldset {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  border: 0;
}

.iw-form--sel .sel-ert__input {
  box-sizing: border-box;
  inline-size: 100%;
  min-block-size: 48px;
  margin: 0;
  padding: 13px 14px;
  border: 1px solid #111;
  border-radius: var(--iw-btn-radius, 0);
  background: #fff;
  color: #111;
  font-family: inherit;
  font-size: 15px;
}

.iw-form--sel .ff_submit_btn_wrapper {
  display: flex;
  margin: 0;
}

.iw-form--sel .ff-btn.sel-ert__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 100%;
  min-block-size: 48px;
  margin: 0;
  padding: 14px 22px;
  border: 1px solid #B3161E;
  border-radius: var(--iw-btn-radius, 0);
  background-color: #B3161E;
  background-image: linear-gradient(#7d0f15, #7d0f15);
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 0% 100%;
  box-shadow: none;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-size .4s cubic-bezier(.2, .7, .2, 1), border-color .25s ease;
}

.iw-form--sel .ff-btn.sel-ert__submit:hover,
.iw-form--sel .ff-btn.sel-ert__submit:focus-visible {
  border-color: #7d0f15;
  background-size: 100% 100%;
  color: #fff;
  opacity: 1;
}

.iw-form--sel .ff-btn.sel-ert__submit:focus-visible {
  outline: 2px solid #B3161E;
  outline-offset: 2px;
}

.iw-form--sel .iw-form__note {
  margin: 0;
}

/* ------------------------------------- a főoldal Selection sávja (világos) */

/* `[innowine_selection_ertesito hely='fooldal']`: a sötét körvonalas kis gomb
   (home-cta--outline --sm mása), a termékek alatt az „Összes Selection”
   mellett. A két gomb egy Etch div-ben (`.home-head__gombok`) van; a
   `.home-head` szétbomlik (innowine-reszponziv.css 17.), ezért a sor a
   blokk oszlopának végére áll, középre. */
.home-picks .home-stack > .home-head > .home-head__gombok {
  order: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 12px;
  align-self: center;
}

.home-head__gombok > .home-cta {
  margin: 0;
}

.sel-ert-hely--fooldal .sel-ert {
  margin: 0;
}

/* A gomb felirata itt magáért beszél, a magyarázó sor nem kell. */
.sel-ert-hely--fooldal .sel-ert__hint {
  display: none;
}

.sel-ert-hely--fooldal .sel-ert__open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
  padding: 11px 18px;
  border: 1px solid #111;
  border-radius: var(--iw-btn-radius, 0);
  background-color: transparent;
  background-image: linear-gradient(#B3161E, #B3161E);
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 0% 100%;
  color: #111;
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-size .4s cubic-bezier(.2, .7, .2, 1), border-color .25s ease, color .25s ease;
}

.sel-ert-hely--fooldal .sel-ert__open:hover,
.sel-ert-hely--fooldal .sel-ert__open:focus-visible {
  border-color: #B3161E;
  background-size: 100% 100%;
  color: #fff;
}

.sel-ert-hely--fooldal .sel-ert__open:focus-visible {
  outline: 2px solid #B3161E;
  outline-offset: 2px;
}

.sel-ert-hely--fooldal .sel-ert__icon {
  color: #B3161E;
}

@media (width <= 480px) {
  .home-picks .home-stack > .home-head > .home-head__gombok {
    flex-direction: column;
    align-items: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sel-ert-hely--fooldal .sel-ert__open {
    transition: none;
  }
}

/* 2026-11-27: mobilon (767px alatt) a főoldalon az „Összes Selection” mellett
   csak a harang látszik, négyzetes ikongombként. A felirat a képernyőolvasónak
   megmarad (vizuálisan rejtett), ez adja a gomb nevét. */
@media (width <= 767px) {
  body .home-picks .home-stack > .home-head > .home-head__gombok {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 8px;
  }

  body .sel-ert-hely--fooldal,
  body .sel-ert-hely--fooldal .sel-ert {
    display: flex;
  }

  body .sel-ert-hely--fooldal .sel-ert__open {
    gap: 0;
    padding: 0;
    min-inline-size: 40px;
    aspect-ratio: 1;
  }

  body .sel-ert-hely--fooldal .sel-ert__icon {
    inline-size: 18px;
    block-size: 18px;
  }

  body .sel-ert-hely--fooldal .sel-ert__open > span {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}
