/* ==========================================================================
   Preisabfrage im Hero der Hotelseiten (Entwurf GF, Nov. 2026)
   Markup: library/booking.php (ajax_form_shortcode), eingebunden über
   template-parts/content-singles-preissuche.php in content-singles-hero.php.
   Globale Theme-/Foundation-Regeln (.site-content button, select, .button)
   werden hier bewusst mit !important übersteuert.
   ========================================================================== */

.single .singles-hero { position: relative; }

.ewtc-suche { --s-coral: #e94547; --s-navy: #192f4f; --s-ink: #3c3c3c; --s-line: #e4e4e4; --s-rand: #d6d6d6; --s-off: #f6f6f6;
  position: relative; z-index: 20; margin: -56px 1.25rem 0; padding: 16px; background: #fff; border-radius: 8px;
  box-shadow: 0 12px 36px rgba(25, 47, 79, .22); display: flex; flex-direction: column; gap: 12px; color: var(--s-ink); text-align: left; }

.ewtc-suche__hotel { margin: 0; font-size: 1.125rem; font-weight: 700; line-height: 1.25; color: var(--s-navy); }
.ewtc-suche .lbl { display: block; margin: 0; font-size: 13px; font-weight: 400; line-height: 1.2; color: var(--s-ink); }

/* Reisezeitraum */
.ewtc-suche__datum { width: 100%; min-height: 56px; margin: 0; display: flex; flex-direction: column; justify-content: center; gap: 4px;
  padding: 10px 14px; background: #fff; border: 1px solid var(--s-rand); border-radius: 6px; cursor: pointer; }
.ewtc-suche__datum-zeile { display: flex; align-items: center; gap: 10px; min-height: 28px; }
.ewtc-suche__datum svg { flex: none; }
.ewtc-suche #zeitraum { border: 0 !important; box-shadow: none !important; background: transparent !important; margin: 0 !important; padding: 0 !important;
  height: auto !important; font-size: 17px; font-weight: 600; color: var(--s-ink); width: 100%; min-width: 0; cursor: pointer; outline: none; }
.ewtc-suche #zeitraum::placeholder { color: var(--s-ink); font-weight: 600; opacity: 1; }

/* Erwachsene / Kinder */
.ewtc-suche__zaehler { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ewtc-suche.nur-erwachsene .ewtc-suche__zaehler { grid-template-columns: 1fr; }
.ewtc-suche__feld { border: 1px solid var(--s-rand); border-radius: 6px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ewtc-suche .plus-minus-input { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin: 0; padding: 0; background: none; height: auto; }
.ewtc-suche .plus-minus-input button { width: 44px !important; height: 44px !important; min-width: 0 !important; flex: none; margin: 0 !important; padding: 0 !important;
  display: flex; align-items: center; justify-content: center; border: 1px solid var(--s-rand) !important; border-radius: 50% !important;
  background: #fff !important; box-shadow: none !important; color: var(--s-coral) !important; font-size: 0 !important; line-height: 0 !important; cursor: pointer; }
.ewtc-suche .plus-minus-input button::before, .ewtc-suche .plus-minus-input button::after { content: none !important; display: none !important; }
.ewtc-suche .plus-minus-input button svg { flex: none; display: block; }
.ewtc-suche .plus-minus-input button:not([disabled]):hover { background: var(--s-off) !important; }
.ewtc-suche .plus-minus-input button[disabled] { opacity: .4; cursor: default; }
.ewtc-suche .plus-minus-input input { width: 2.5rem !important; min-width: 20px; margin: 0 !important; padding: 0 !important; border: 0 !important; box-shadow: none !important;
  background: transparent !important; text-align: center; font-size: 20px; font-weight: 600; height: auto !important; color: var(--s-ink); -moz-appearance: textfield; pointer-events: none; }
.ewtc-suche .plus-minus-input input::-webkit-outer-spin-button, .ewtc-suche .plus-minus-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Alter der Kinder (Auswahllisten, von ewtcAgeFields() in booking.php erzeugt) */
.ewtc-suche #childrenContainer { display: grid !important; gap: 12px; margin: 0 !important; padding: 0 !important; list-style: none !important; position: static; }
.ewtc-suche #childrenContainer:empty { display: none !important; }
.ewtc-suche #childrenContainer li { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; width: auto !important; }
.ewtc-suche #childrenContainer select { height: 52px !important; margin: 0 !important; border: 1px solid var(--s-rand) !important; border-radius: 6px !important;
  padding: 0 2.25rem 0 14px !important; font-size: 17px !important; background-color: #fff !important; box-shadow: none !important; color: var(--s-ink) !important; }

/* Preise prüfen */
.ewtc-suche .ewtc-suche__cta { height: 54px !important; width: 100%; margin: 0 !important; padding: 0 28px !important; border: 0; border-radius: 6px !important;
  background: var(--s-coral) !important; color: #fff !important; display: flex !important; align-items: center; justify-content: center; gap: 10px;
  line-height: 1 !important; cursor: pointer; }
.ewtc-suche .ewtc-suche__cta, .ewtc-suche .ewtc-suche__cta .button-text { font-weight: 600 !important; font-size: 19px !important; color: #fff !important; }
/* Ladezustand: weißer Kringel statt Lupe und Text (ewtc-booking.js blendet .button-text aus, .spinner ein) */
.ewtc-suche .ewtc-suche__cta .spinner { position: static !important; top: auto !important; }
.ewtc-suche .ewtc-suche__cta .loader { display: block; width: 22px; height: 22px; margin: 0; border: 3px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; }
.ewtc-suche .ewtc-suche__cta:has(.button-text[style*="none"]) > svg { display: none; }

/* Hinweise (Kinder-/Personengrenzen, keine Preise) */
.ewtc-suche__hinweis, .ewtc-suche .hotel-booking-hints { display: flex; align-items: flex-start; gap: 10px; margin: 0 !important; padding: 10px 12px; border-radius: 6px;
  background: #f9d4e0; font-size: 14px; line-height: 1.4; color: var(--s-ink); }
.ewtc-suche .hotel-booking-hints { display: block; }
.ewtc-suche .hotel-booking-hints .cell { padding: 0 !important; text-align: left !important; }
.ewtc-suche__hinweis[hidden] { display: none !important; }
.ewtc-suche__hinweis svg { flex: none; margin-top: 1px; }
.ewtc-suche__hinweis a { display: block; width: fit-content; padding: 6px 0 0; font-size: inherit !important; line-height: inherit !important; font-weight: 600; color: var(--s-navy); text-decoration: underline; }

@media screen and (min-width: 40em) and (max-width: 63.9375em) {
  .ewtc-suche { max-width: 34rem; margin-left: auto; margin-right: auto; }
}

@media screen and (max-width: 63.9375em) {
  .single .singles-hero:has(.hero-preissuche) { height: auto !important; max-height: none !important; }
  .single .singles-hero:has(.hero-preissuche) .ewtc-hero-scroll { display: none; }
  .single .singles-hero:has(.hero-preissuche) .swiper-pagination { bottom: 4.5rem !important; }
  .hero-preissuche { padding-bottom: 1rem; }
}

@media screen and (min-width: 64em) {
  .single .singles-hero:has(.hero-preissuche) .ewtc-hero-scroll { display: none; }
  .single .singles-hero:has(.hero-preissuche) .swiper-pagination { bottom: 8rem !important; }
  /* Bild füllt den Hero (sonst heller Streifen bei niedrigen Fenstern) */
  .single .singles-hero .swiper-slide picture, .single .singles-hero .swiper-slide img { height: 100% !important; width: 100%; object-fit: cover; }

  .ewtc-suche { position: absolute; left: 50%; bottom: 32px; transform: translateX(-50%); width: calc(100% - 64px); max-width: 800px; margin: 0; padding: 0; gap: 0;
    display: grid; grid-template-columns: 1.5fr 1fr 1fr auto; align-items: stretch; overflow: hidden; box-shadow: 0 16px 48px rgba(25, 47, 79, .22); }
  .ewtc-suche.nur-erwachsene { grid-template-columns: 1fr 1fr auto; }
  .ewtc-suche__hotel { display: none; }
  .ewtc-suche__zaehler { display: contents; }
  .ewtc-suche__datum, .ewtc-suche__feld { border: 0; border-right: 1px solid var(--s-line); border-radius: 0; padding: 9px 20px; gap: 4px; justify-content: center; grid-row: 1; }
  .ewtc-suche__datum { grid-column: 1; }
  .ewtc-suche__datum-zeile { min-height: 32px; }
  .ewtc-suche .plus-minus-input { gap: 12px; }
  .ewtc-suche .plus-minus-input button { width: 32px !important; height: 32px !important; }
  .ewtc-suche .ewtc-suche__cta { grid-column: -2; grid-row: 1; width: auto; height: auto !important; min-height: 50px; margin: 10px !important; }
  .ewtc-suche .ewtc-suche__cta, .ewtc-suche .ewtc-suche__cta .button-text { font-size: 17px !important; }
  .ewtc-suche .ewtc-suche__cta { min-width: 11.5rem; } /* Breite bleibt im Ladezustand gleich */
  .ewtc-suche #childrenContainer { grid-column: 1 / -1; grid-row: 2; padding: 14px 20px !important; border-top: 1px solid var(--s-line); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  .ewtc-suche__hinweis, .ewtc-suche .hotel-booking-hints { grid-column: 1 / -1; border-radius: 0; padding: 10px 20px; align-items: center; }
  .ewtc-suche__hinweis a { display: inline; margin-left: auto; padding: 0; }
  /* Leiste wächst nach oben (Kinderalter, Hinweise): Swiper-Punkte nicht überdecken */
  .single .singles-hero:has(#childrenContainer li, .ewtc-suche__hinweis:not([hidden]), .hotel-booking-hints) .swiper-pagination { display: none; }
}

/* ==========================================================================
   Kompakte Sticky-Leiste (erscheint, sobald die Suchleiste aus dem Bild ist)
   Oben unter der Kopfzeile (Desktop: unter der angehefteten Seitennavigation) – seit 06.11.2026 auch am Handy
   ========================================================================== */
.ewtc-suche-sticky { --s-coral: #e94547; --s-navy: #192f4f; --s-ink: #3c3c3c; --s-rand: #d6d6d6;
  position: fixed; left: 0; right: 0; top: var(--ewtc-sticky-oben, 50px); bottom: auto; z-index: 98; background: #fff; box-shadow: 0 8px 24px rgba(25, 47, 79, .14);
  padding: 8px 12px; transform: translateY(-10px); opacity: 0; visibility: hidden;
  transition: transform .25s ease, opacity .25s ease, visibility 0s linear .25s; }
.ewtc-suche-sticky.ist-sichtbar { transform: none; opacity: 1; visibility: visible; transition: transform .25s ease, opacity .25s ease; }
.ewtc-suche-sticky__innen { display: flex; align-items: center; gap: 10px; max-width: 800px; margin: 0 auto; }
.ewtc-suche-sticky button { margin: 0 !important; box-shadow: none !important; line-height: 1.2 !important; height: auto !important; cursor: pointer; }
.ewtc-suche-sticky .ewtc-suche-sticky__info { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 10px 12px !important;
  background: #fff !important; border: 1px solid var(--s-rand) !important; border-radius: 6px !important; color: var(--s-ink) !important; text-align: left; }
.ewtc-suche-sticky__info svg { flex: none; }
.ewtc-suche-sticky__text { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ewtc-suche-sticky__stift { color: #8a8a8a; }
.ewtc-suche-sticky .ewtc-suche-sticky__cta { flex: none; display: flex; align-items: center; gap: 8px; padding: 12px 16px !important;
  background: var(--s-coral) !important; border: 0 !important; border-radius: 6px !important; color: #fff !important; font-size: 16px !important; font-weight: 600 !important; }
.ewtc-suche-sticky__cta span { color: #fff !important; }
@media screen and (max-width: 39.9375em) {
  .ewtc-suche-sticky__cta span { font-size: 15px !important; }
}
/* Handy/Tablet: Telefon-Button (fest bei top 100px) unter die Sticky-Leiste rücken, solange sie zu sehen ist */
@media screen and (max-width: 63.9375em) {
  body.ewtc-suche-sticky-aktiv #sticky-contact-box { top: 124px; }
}
@media screen and (min-width: 64em) {
  .ewtc-suche-sticky { padding: 8px 32px; }
  /* so breit wie die Inhaltsblöcke darunter (.single-leistungen .grid-container 60rem abzüglich Zellenabstand) */
  .ewtc-suche-sticky__innen { max-width: calc(60rem - 1.875rem); }
  .ewtc-suche-sticky .ewtc-suche-sticky__info { padding: 8px 14px !important; }
  .ewtc-suche-sticky .ewtc-suche-sticky__cta { padding: 10px 22px !important; }
}

/* Sticky: Ladezustand */
.ewtc-suche-sticky__kringel { display: none; width: 20px; height: 20px; border: 3px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; animation: spin 1s linear infinite; }
.ewtc-suche-sticky.laedt .ewtc-suche-sticky__cta svg, .ewtc-suche-sticky.laedt .ewtc-suche-sticky__cta-text { visibility: hidden; }
.ewtc-suche-sticky.laedt .ewtc-suche-sticky__cta { position: relative; pointer-events: none; }
.ewtc-suche-sticky.laedt .ewtc-suche-sticky__kringel { display: block; position: absolute; left: 50%; top: 50%; margin: -10px 0 0 -10px; }

/* ===== Kalender der Hotel-Preisabfrage auf Handys ===== */
/* Abdunkeln hinter dem Kalender (Bottom-Sheet hochkant und Querformat) */
body.ewtc-kal-modal::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9999;
    opacity: 1;            /* body::after ist in ewtc-main.css (Menü) standardmäßig ausgeblendet */
    visibility: visible;
    pointer-events: none;
}
