/* =========================================================
   FEWOlution – Suchleiste Startseite
   Alle IDs/Names bleiben identisch (searchplace, lat, long, searchnr,
   pets, searchdatefrom, searchdateto, searchbutton) → bestehendes JS
   inkl. Google Places Autocomplete und codeAddress() läuft weiter.
   ========================================================= */


.fewo-hero {
  --s-blue: #6791A4;
  --s-blue-dark: #3f6f84;
  --s-gold: #D39D2F;
  --s-ink: #213944;
  --s-muted: #5f7580;
  --s-line: rgba(103, 145, 164, .18);

  position: relative;
  
  
  width: 100%;
  margin: 12px 0 4px;
  padding: 28px 10px 20px;
  border-radius: 24px;
  
  /*
  width: min(1480px, 100% - 32px);
  margin: 28px auto 8px;
  padding: clamp(36px, 6vw, 72px) clamp(16px, 4vw, 48px) clamp(28px, 4vw, 44px);
  border-radius: 32px;
  */
  
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(103, 145, 164, .16) 0%, rgba(103, 145, 164, 0) 60%),
    linear-gradient(#f6fafb, #ffffff);
  text-align: center;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--s-ink);
}



.fewo-hero__title {
  margin: 0 auto 10px;
  max-width: none;
  font-size: clamp(28px, 4.2vw, 50px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.04em;
  color: var(--s-gold);
}
.fewo-hero__sub {
  margin: 0 0 30px;
  font-size: clamp(16px, 1.6vw, 20px);
  font-weight: 700;
  color: var(--s-gold);
}

/* ---------- Suchleiste ---------- */
.fewo-search {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) minmax(0, 1fr) auto auto auto;
  align-items: center;
  max-width: 1240px;
  margin: 0 auto;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--s-line);
  border-radius: 999px;
  box-shadow: 0 24px 60px rgba(33, 57, 68, .14), 0 2px 6px rgba(33, 57, 68, .05);
  text-align: left;
}

.fewo-search__field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 20px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color .2s ease;
}
.fewo-search__field + .fewo-search__field::before {
  content: "";
  position: absolute;
  left: 0; top: 22%; bottom: 22%;
  width: 1px;
  background: var(--s-line);
}
.fewo-search__field:hover,
.fewo-search__field:focus-within { background: #f2f7f9; }
.fewo-search__field:hover::before,
.fewo-search__field:focus-within::before,
.fewo-search__field:hover + .fewo-search__field::before,
.fewo-search__field:focus-within + .fewo-search__field::before { opacity: 0; }

.fewo-search__icon { flex: none; width: 20px; height: 20px; color: var(--s-blue); }
.fewo-search__text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.fewo-search__label {
  font-size: 12px;
  font-weight: 700;
  color: var(--s-ink);
  line-height: 1.2;
}

/* Inputs neutralisieren (überschreibt die Inline-Styles) */
.fewo-search input[type="text"],
.fewo-search input[type="date"],
.fewo-search input[type="number"] {
  all: unset;
  box-sizing: border-box;
  width: 100%;
  height: auto !important;
  padding: 2px 0 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  font: 400 15px/1.3 Arial, Helvetica, sans-serif !important;
  color: var(--s-ink) !important;
}
.fewo-search input::placeholder { color: var(--s-muted); opacity: 1; }
.fewo-search input[type="date"] { cursor: pointer; min-height: 20px; }
.fewo-search input[type="date"]:invalid,
.fewo-search input[type="date"][value=""] { color: var(--s-muted) !important; }
.fewo-search input[type="date"]::-webkit-calendar-picker-indicator { opacity: .45; cursor: pointer; }

/* Gäste-Stepper */
.fewo-search__guests { cursor: default; }
.fewo-stepper { display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.fewo-stepper button {
  all: unset;
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid var(--s-line);
  color: var(--s-blue-dark);
  font: 700 16px/1 Arial, sans-serif;
  cursor: pointer;
  transition: background-color .15s, border-color .15s;
}
.fewo-stepper button:hover { background: #fff; border-color: var(--s-blue); }
.fewo-stepper button:focus-visible { outline: 2px solid var(--s-gold); outline-offset: 2px; }
.fewo-search input[type="number"] {
  width: 2.2em;
  text-align: center;
  font-weight: 700 !important;
  -moz-appearance: textfield;
}
.fewo-search input[type="number"]::-webkit-inner-spin-button,
.fewo-search input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* Hund-Toggle */
.fewo-search__pet { padding: 0 8px; cursor: default; }
.fewo-search__pet input {
  position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none;
}
.fewo-search__pet label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--s-line);
  font-size: 14px;
  font-weight: 700;
  color: var(--s-muted);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: all .2s ease;
}
.fewo-search__pet label svg { width: 18px; height: 18px; }
.fewo-search__pet input:checked + label {
  background: rgba(211, 157, 47, .14);
  border-color: rgba(211, 157, 47, .5);
  color: #9b6d10;
}
.fewo-search__pet input:focus-visible + label { outline: 2px solid var(--s-gold); outline-offset: 2px; }
.fewo-search__pet::before { display: none; }

/* Suchen-Button */
.fewo-search__submit {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 56px;
  padding: 0 26px 0 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #6791A4, #3f6f84);
  color: #fff;
  font: 700 16px Arial, Helvetica, sans-serif;
  box-shadow: 0 12px 26px rgba(63, 111, 132, .32);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
.fewo-search__submit svg { width: 20px; height: 20px; }
.fewo-search__submit:hover { transform: translateY(-1px); box-shadow: 0 16px 32px rgba(63, 111, 132, .4); }
.fewo-search__submit:focus-visible { outline: 3px solid var(--s-gold); outline-offset: 3px; }

/* Vorteile unter der Suche */
.fewo-hero__perks {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--s-muted);
}
.fewo-hero__perks li { display: inline-flex; align-items: center; gap: 6px; }
.fewo-hero__perks svg { width: 16px; height: 16px; color: var(--s-blue); }

/* Google Places Dropdown passend gestalten */
.pac-container {
  margin-top: 10px;
  border: 1px solid rgba(103, 145, 164, .18);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(33, 57, 68, .16);
  font-family: Arial, Helvetica, sans-serif;
  overflow: hidden;
}
.pac-item { padding: 8px 14px; border-top-color: rgba(103, 145, 164, .12); cursor: pointer; }
.pac-item:hover, .pac-item-selected { background: #f2f7f9; }

/* ---------- Tablet ----------was 900px */
@media (max-width: 900px) {
  .fewo-search {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 10px;
    border-radius: 26px;
  }
  .fewo-search__where { grid-column: 1 / -1; }
  .fewo-search__field { border-radius: 16px; background: #f6f9fa; padding: 12px 16px; min-height: 64px; box-sizing: border-box; }
  .fewo-search__field::before { display: none; }
  .fewo-search__pet { background: transparent; padding: 0; }
  .fewo-search__pet label { width: 100%; box-sizing: border-box; min-height: 64px; justify-content: center; border-radius: 16px; }
  .fewo-search__submit { grid-column: 1 / -1; width: 100%; margin-top: 4px; }
}

/* ---------- Smartphone ---------- was 600px*/
@media (max-width: 600px) {
  .fewo-hero {
    width: calc(100% - 16px);
    margin: 12px auto 4px;
    padding: 30px 10px 22px;
    border-radius: 24px;
  }
  .fewo-hero__title { font-size: clamp(27px, 8.2vw, 36px); line-height: 1.1; }
  .fewo-hero__sub { font-size: 16px; margin-bottom: 22px; }

  .fewo-search { gap: 6px; padding: 8px; border-radius: 24px; }
  .fewo-search__field { padding: 12px 14px; gap: 10px; min-height: 68px; }
  .fewo-search__label { font-size: 13px; }
  .fewo-search__icon { width: 22px; height: 22px; }
  .fewo-search__guests .fewo-search__icon { display: none; }

  /* 16px verhindert das automatische Hineinzoomen von iOS beim Antippen */
  .fewo-search .fewo-search__field input[type="text"],
  .fewo-search .fewo-search__field input[type="number"] { font-size: 16px !important; }
  .fewo-dp-display { font-size: 16px; }

  .fewo-stepper { gap: 6px; margin-top: 4px; }
  .fewo-stepper button { width: 36px; height: 36px; font-size: 20px; background: #fff; }
  .fewo-search input[type="number"] { font-size: 17px !important; }

  .fewo-search__pet label { min-height: 68px; font-size: 15px; }
  .fewo-search__submit { height: 58px; font-size: 17px; }

  .fewo-hero__perks { flex-direction: column; align-items: flex-start; width: fit-content; margin: 20px auto 0; gap: 8px; }
}
@media (max-width: 440px) {
  .fewo-search__field:not(.fewo-search__where) .fewo-search__icon { display: none; }
}
@media (max-width: 340px) {
  .fewo-search { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .fewo-search__submit, .fewo-search__field, .fewo-search__pet label { transition: none; }
  .fewo-search__submit:hover { transform: none; }
}

/* =========================================================
   Zeitraum-Kalender (fewo-datepicker.js)
   ========================================================= */
.fewo-search { position: relative; }
.fewo-dp-native { display: none !important; }
.fewo-dp-display { display: block; padding-top: 2px; font-size: 15px; line-height: 1.3; color: var(--s-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fewo-dp-display.is-empty { color: var(--s-muted); }
.fewo-search__field:focus-visible { outline: 2px solid var(--s-gold); outline-offset: -2px; }
.fewo-search__field.is-active { background: #fff; box-shadow: 0 6px 22px rgba(33, 57, 68, .14), inset 0 0 0 1.5px var(--s-blue); }
.fewo-search__field.is-active::before,
.fewo-search__field.is-active + .fewo-search__field::before { opacity: 0; }

.fewo-dp {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  z-index: 60;
  width: 660px;
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
  padding: 18px 22px 16px;
  background: #fff;
  border: 1px solid var(--s-line);
  border-radius: 26px;
  box-shadow: 0 30px 70px rgba(33, 57, 68, .2), 0 4px 12px rgba(33, 57, 68, .06);
  font-family: Arial, Helvetica, sans-serif;
  color: var(--s-ink);
  text-align: left;
  animation: fewoDpIn .18s ease-out;
}
.fewo-dp[hidden] { display: none; }
@keyframes fewoDpIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.fewo-dp__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.fewo-dp__hint { font-size: 13px; font-weight: 700; color: var(--s-blue-dark); background: #eef4f7; padding: 6px 12px; border-radius: 999px; }
.fewo-dp__nav { all: unset; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--s-ink); cursor: pointer; transition: background-color .15s; }
.fewo-dp__nav svg { width: 18px; height: 18px; }
.fewo-dp__nav:hover { background: #f2f7f9; }
.fewo-dp__nav:disabled { opacity: .25; cursor: default; background: none; }
.fewo-dp__nav:focus-visible { outline: 2px solid var(--s-gold); }

.fewo-dp__months { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; }
.fewo-dp__title { margin: 0 0 10px; text-align: center; font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.fewo-dp__grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px; }
.fewo-dp__wd { padding: 4px 0 8px; text-align: center; font-size: 11.5px; font-weight: 700; color: var(--s-muted); }

.fewo-dp__day { all: unset; position: relative; display: grid; place-items: center; height: 40px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--s-ink); }
.fewo-dp__day span { position: relative; z-index: 1; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; transition: background-color .12s, color .12s; }
.fewo-dp__day:hover span { box-shadow: inset 0 0 0 1.5px var(--s-ink); }
.fewo-dp__day:focus-visible span { outline: 2px solid var(--s-gold); outline-offset: 1px; }
.fewo-dp__day.is-disabled { color: #b9c6cc; cursor: default; text-decoration: line-through; text-decoration-color: rgba(185, 198, 204, .6); }
.fewo-dp__day.is-disabled:hover span { box-shadow: none; }
.fewo-dp__day.is-today span::after { content: ""; position: absolute; bottom: 5px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--s-gold); }

/* Zeitraum-Band */
.fewo-dp__day.is-range::before,
.fewo-dp__day.has-range::before,
.fewo-dp__day.is-end::before,
.fewo-dp__day.is-preview::before { content: ""; position: absolute; top: 1px; bottom: 1px; background: #e7f0f4; }
.fewo-dp__day.is-range::before { left: 0; right: 0; }
.fewo-dp__day.has-range::before { left: 50%; right: 0; }
.fewo-dp__day.is-end::before,
.fewo-dp__day.is-preview::before { left: 0; right: 50%; }
.fewo-dp__grid > .fewo-dp__day:nth-child(7n + 1).is-range::before { border-radius: 20px 0 0 20px; }
.fewo-dp__grid > .fewo-dp__day:nth-child(7n).is-range::before { border-radius: 0 20px 20px 0; }

.fewo-dp__day.is-start span,
.fewo-dp__day.is-end span { background: linear-gradient(135deg, #6791A4, #3f6f84); color: #fff; box-shadow: 0 6px 14px rgba(63, 111, 132, .35); }
.fewo-dp__day.is-preview span { box-shadow: inset 0 0 0 1.5px var(--s-blue-dark); }

.fewo-dp__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--s-line); }
.fewo-dp__summary { font-size: 13.5px; color: var(--s-muted); }
.fewo-dp__summary b { color: var(--s-ink); }
.fewo-dp__actions { display: flex; gap: 8px; }
.fewo-dp__reset, .fewo-dp__done { all: unset; padding: 9px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.fewo-dp__reset { color: var(--s-blue-dark); text-decoration: underline; text-underline-offset: 3px; }
.fewo-dp__reset:disabled { opacity: .35; cursor: default; }
.fewo-dp__done { background: var(--s-ink); color: #fff; }
.fewo-dp__done:hover { background: var(--s-blue-dark); }
.fewo-dp__reset:focus-visible, .fewo-dp__done:focus-visible { outline: 2px solid var(--s-gold); outline-offset: 2px; }

.fewo-dp-backdrop { display: none; }

/* Kalender auf dem Smartphone: Bottom-Sheet über die ganze Breite */
@media (max-width: 759px) {
  .fewo-dp-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(16, 32, 40, .45);
    animation: fewoDpFade .2s ease-out;
  }
  body.fewo-dp-lock { overflow: hidden; }

  .fewo-dp {
    position: fixed;
    top: auto;
    left: 0 !important;
    right: 0;
    bottom: 0;
    z-index: 10001;
    width: auto;
    max-width: none;
    max-height: 90vh;
    max-height: 90dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 6px 16px 0;
    border: 0;
    border-radius: 26px 26px 0 0;
    box-shadow: 0 -20px 60px rgba(16, 32, 40, .25);
    animation: fewoDpUp .26s cubic-bezier(.2, .8, .2, 1);
  }
  .fewo-dp::before {
    content: "";
    display: block;
    width: 42px; height: 5px;
    margin: 4px auto 8px;
    border-radius: 3px;
    background: #d3dde2;
  }
  .fewo-dp__head { position: sticky; top: -6px; z-index: 2; margin: 0 -4px 4px; padding: 6px 4px; background: #fff; }
  .fewo-dp__hint { font-size: 15px; padding: 8px 14px; }
  .fewo-dp__nav { width: 44px; height: 44px; background: #f2f7f9; }
  .fewo-dp__nav svg { width: 22px; height: 22px; }
  .fewo-dp__months { grid-template-columns: 1fr; }
  .fewo-dp__title { font-size: 18px; margin-bottom: 12px; }
  .fewo-dp__wd { font-size: 13px; }
  .fewo-dp__day { height: 48px; font-size: 16px; }
  .fewo-dp__day span { width: 44px; height: 44px; }
  .fewo-dp__day:hover span { box-shadow: none; }
  .fewo-dp__foot {
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin: 12px -16px 0;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
    background: #fff;
  }
  .fewo-dp__summary { width: 100%; font-size: 15px; text-align: center; }
  .fewo-dp__actions { width: 100%; }
  .fewo-dp__reset { padding: 15px 12px; font-size: 15px; }
  .fewo-dp__done { flex: 1; padding: 15px; text-align: center; font-size: 16px; }
}
@keyframes fewoDpUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fewoDpFade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .fewo-dp, .fewo-dp-backdrop { animation: none !important; } }
