/* ══════════════════════════════════════════════════════════════════════════════
   APP HEADER
══════════════════════════════════════════════════════════════════════════════ */
.app-header {
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 7, 48, 0.11);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  /* C#15 (qa4): z-index был 1000 — ровно как у дефолтных leaflet-контролов (.leaflet-top),
     а карта идёт позже в DOM, поэтому кнопки зума «+/−» просвечивали поверх логотипа.
     Поднимаем шапку на 1 выше leaflet (ниже sticky-поиска 1200, панели сравнения 1500,
     полноэкранной карты и модалок). */
  z-index: 1001;
  /* C5/§3.7: безопасные зоны (notch/динамический остров, ландшафтный вырез) */
  padding-top: env(safe-area-inset-top);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.app-header-spacer {
  height: calc(96px + env(safe-area-inset-top));
  flex-shrink: 0;
}

.app-header__inner {
  box-sizing: border-box;
  width: min(var(--fewo-content-max), calc(100% - 2*var(--fewo-gutter)));
  margin: 0 auto;
  min-height: 96px;
  padding-block: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-header__brand {
  width: auto;
  height: 50px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex: 0 0 auto;
  min-width: 0;
}

.app-header__brand-logo {
  width: auto;
  height: 50px; /* UI/UX 1.1: PNG-логотип по высоте, пропорции сохраняются */
  display: block;
  object-fit: contain;
}

.app-header__search {
  flex: 1 1 760px;
  max-width: 792px;
  min-width: 0;
  height: 48px;
  margin: 0 24px;
  padding: 4px;
  display: flex;
  align-items: center;
  gap: 0;
  border-radius: 16px;
  background: #ebeef2;
}

.app-header__search-field {
  flex: 1 1 0; 
  min-width: 0;
  height: 40px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  background: transparent;
}
  
.app-header__search-field--guests {
  flex: 0 0 160px;
}

.app-header__search-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.app-header__search-input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0;
  background: transparent;
  color: #1c398e;
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 14px; /* UI/UX 4.2: компактнее (Airbnb) */
  font-weight: 600;
  line-height: 120%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-header__search-input::placeholder {
  color: #90a1b9;
  opacity: 1;
}

.app-header__search-input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.app-header__search-input[type="number"]::-webkit-outer-spin-button,
.app-header__search-input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.app-header__search-divider {
  width: 1px;
  height: 32px;
  flex: 0 0 1px;
  border-radius: 999px;
  background: #90a1b9;
}

.app-header__search-submit {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border: 0;
  border-radius: 12px;
  background: #145dfc;
  color: #edf6ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  cursor: pointer;
}

.app-header__search-submit svg {
  width: 16px;
  height: 16px;
  fill: none;
}

/* Airbnb-style compact mobile search: summary pill (hidden by default; shown on phones). */
.app-header__search-pill { display: none; }

.app-header__filter-btn {
  cursor: pointer;
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid #52a2ff;
  background: #fff;
  color: #1c398e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 17px;
  font-weight: 500;
  line-height: 120%;
  text-decoration: none;
  white-space: nowrap;
}

.app-header__filter-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  flex-shrink: 0; /* R4-2 (qa5): иконка не сжимается/не обрезается при сужении кнопки */
}

.app-header__filter-btn.has-filters {
  border-color: #145DFC;
  background: #EDF6FF;
}

.app-header__filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  background: #145DFC;
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  padding: 0 5px;
  line-height: 1;
}

.app-header--catalog .app-header__actions {
  gap: 24px;
}

.app-header__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 40px;
  min-width: 0;
}

.app-header__actions-main {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* B2: language + currency switchers */
.app-header__i18n {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.fewo-i18n-select {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid #d7deea;
  border-radius: 9999px;
  background: #f4f6f9;
  color: #1c398e;
  font: 600 14px/1 Inter, system-ui, sans-serif;
  padding: 9px 28px 9px 12px;
  min-height: 40px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%231c398e' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: background-color .18s ease, border-color .18s ease;
}
.fewo-i18n-select:hover { background-color: #e8f2ff; border-color: #b9c7e0; }
@media (max-width: 700px) {
  .fewo-i18n-select { padding: 8px 24px 8px 9px; font-size: 13px; }
  .app-header__i18n { gap: 4px; }
}

/* Befund 13.08.2026: Die Startseite bringt ihre eigene Kopie der Kopfzeilen-
   Stile mit (index.php), und die beiden Kopien waren auseinandergelaufen: Der
   Menüknopf maß dort 36px, hier 40px — auf jeder anderen Seite sprang er also.
   Maßgeblich ist die Startseite; die Staffelung darunter ist an dieselben
   Haltepunkte angeglichen (580px → 34px, 375px → 30px). Auf Mobilgeräten hebt
   der Touch-Target-Block in functions.php die Fläche ohnehin auf 44px. */
.app-header__icon-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #f4f6f9;
  color: #1c398e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  cursor: pointer;
}

.app-header__icon-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.app-header__icon-compare {
  fill: none;
}

.app-header__icon-btn--profile {
  border-radius: var(--radius-full, 9999px);
  border: 1px solid var(--Border-Focus, #52A2FF);
  background: var(--Button-Round-Burger-Default, #F4F6F9);
}

/* ── Profile dropdown ── */
.hd-wrap {
  position: relative;
  display: inline-flex;
}

.hd-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0px 10px 30px rgba(0, 7, 48, 0.11);
  padding: 16px 8px;
  gap: 10px;
  flex-direction: column;
  z-index: 500;
  animation: hd-fade-in 0.15s ease;
}
.hd-dropdown.hd-open {
  display: flex;
}
@keyframes hd-fade-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hd-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.hd-bottom {
  width: 100%;
  padding-top: 8px;
  border-top: 1px solid #E2E8F0;
  margin-top: 4px;
}

.hd-item {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  gap: 10px;
  height: 40px;
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s;
  width: 100%;
  box-sizing: border-box;
}
.hd-item:hover { background: #EDF3FF; }

.hd-item__left {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
}
.hd-item__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}
.hd-item__label {
  font-family: 'Inter', sans-serif;
  font-size: 17px;
  font-weight: 500;
  line-height: 120%;
  color: #1C398E;
  white-space: nowrap;
}
.hd-item__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.12s;
}
.hd-item:hover .hd-item__arrow { opacity: 1; }

/* ── Search dropdowns (same as index.php) ── */
.app-header__search { position: relative; }
.search-dropdown {
  position: absolute;
  left: 0; right: 0;
  top: calc(100% + 8px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0, 7, 48, 0.14);
  z-index: 700;
  overflow: hidden;
  display: none;
  font-family: Inter, system-ui, sans-serif;
}
.search-dropdown--visible { display: block; }
.search-dropdown--city    { left: 0; right: auto; width: 280px; }
.search-dropdown--date    { overflow: visible; left: 0; right: 0; width: auto; } /* full width of the search bar (form is position:relative) */
.search-dropdown--guests  { left: auto; right: 0; width: 300px; }
.search-dropdown__item-name    { font-size: 15px; font-weight: 500; color: #1C398E; }
.search-dropdown__item-country { font-size: 13px; font-weight: 400; color: #6D7580; margin-top: 1px; }
/* Vollbild-Ortsauswahl auf dem Telefon — dieselbe Lösung wie auf der Startseite.
   Vorher hing die Vorschlagsliste am FORMULAR, nicht am Feld: auf 390px steht
   die Suche gestapelt, also erschien die Liste unterhalb von Datum, Gästen und
   der Suchtaste — losgelöst von dem Feld, in das gerade getippt wurde, und bei
   null Treffern als leerer weisser Streifen. Jetzt: eigene Ebene über dem
   Bildschirm, Eingabefeld oben, Liste darunter. */
.search-dropdown__search { display: none; }
.search-dropdown__search-icon { flex: 0 0 18px; width: 18px; height: 18px; color: #6D7580; }
.search-dropdown__search-input {
  flex: 1; min-width: 0; height: 100%; border: 0; padding: 0; background: transparent;
  /* 16px ist Pflicht: darunter zoomt iOS beim Fokus in die Seite hinein. */
  font-size: 16px; font-weight: 600; color: #1C398E;
  box-sizing: border-box; outline: none; font-family: inherit;
}
.search-dropdown__search-input::placeholder { color: #90A1B9; font-weight: 500; opacity: 1; }
.search-dropdown__search-clear {
  flex: 0 0 30px; width: 30px; height: 30px; padding: 0;
  border: 0; border-radius: 50%; background: #E2E8F0; color: #1C398E;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.search-dropdown__search-clear[hidden] { display: none; }
.search-dropdown__empty { padding: 20px; font-size: 15px; line-height: 1.45; color: #6D7580; }
.search-dropdown__list { list-style: none; margin: 0; padding: 8px 0; max-height: 240px; overflow-y: auto; }
/* Punkt 6: Reisezielliste ohne eigene Scrollfläche und mindestens so breit wie
   das Feld darüber — begrenzt wird die Anzahl der Einträge, nicht die Höhe. */
.search-dropdown--city .search-dropdown__list { max-height: none; overflow: visible; }
/* Breite folgt dem Feld "Wohin" darüber (per JS in --fewo-city-dd-w gesetzt) —
   eine schmalere Liste als das Feld sieht nach Versehen aus. */
.search-dropdown--city { width: var(--fewo-city-dd-w, 320px); min-width: 320px; max-width: 100%; }
.search-dropdown__item--focus { background: #DCE8FF; box-shadow: inset 3px 0 0 #145DFC; }
.search-dropdown__item { padding: 10px 16px; cursor: pointer; transition: background 0.1s; display: flex; flex-direction: column; align-items: flex-start; text-align: left; /* UI/UX 2.1 */ }
.search-dropdown__item:hover, .search-dropdown__item--active { background: #EDF3FF; }
.search-dropdown__heading { padding: 10px 16px 4px; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: #6D7580; text-align: left; /* UI/UX 2.1 */ }
/* Calendar (identical to index.php) */
.cal { padding: 24px 28px 4px; } /* M4: breathing room */
/* QA refactoring-3 A#14: стрелки — у строки названия месяца (вверху), не по центру сбоку */
.cal__header { display: flex; align-items: flex-start; gap: 8px; }
.cal__header .cal__nav { margin-top: -2px; }
.cal__nav {
  width: 32px; height: 32px; flex-shrink: 0;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.cal__nav:hover { background: #f5f5f5; border-color: #aaa; }
.cal__months { flex: 1; display: flex; gap: 32px; min-width: 0; } /* M4: gap between the two months */
.cal__month { flex: 1; display: flex; flex-direction: column; }
.cal__month-name { text-align: center; font-size: 15px; font-weight: 600; color: #1a1a2e; padding-bottom: 16px; }
.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal__weekday { height: 36px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 500; color: #aab0bc; }
.cal__day { position: relative; height: 52px; display: flex; align-items: center; justify-content: center; cursor: pointer; user-select: none; }
.cal__day::before { content: ''; position: absolute; inset: 4px 0; background: transparent; z-index: 0; }
.cal__day--in-range::before    { background: #f0f0f0; }
.cal__day--range-start::before { background: #f0f0f0; left: 50%; }
.cal__day--range-end::before   { background: #f0f0f0; right: 50%; }
.cal__day-inner {
  position: relative; z-index: 1; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: 16px; font-weight: 400; color: #1a1a2e; transition: background 0.1s;
}
.cal__day--empty  { pointer-events: none; }
.cal__day--empty .cal__day-inner { color: transparent; }
.cal__day--past   { pointer-events: none; }
.cal__day--past .cal__day-inner { color: #c8cfd8; }
/* M6: real days of neighbouring months, greyed and non-clickable */
.cal__day--adjacent { pointer-events: none; cursor: default; }
.cal__day--adjacent .cal__day-inner { color: #c8cfd8; }
.cal__day--today .cal__day-inner { font-weight: 700; }
.cal__day--selected .cal__day-inner { background: #1a1a2e; color: #fff; }
.cal__day:hover:not(.cal__day--empty):not(.cal__day--past):not(.cal__day--adjacent):not(.cal__day--selected) .cal__day-inner { background: #ebebeb; }
.cal__flex { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 0 8px; }
.cal__flex-btn { height: 36px; padding: 0 16px; border: 1px solid #e2e8f0; border-radius: 20px; background: #fff; font-size: 14px; font-weight: 500; color: #1a1a2e; cursor: pointer; transition: background 0.1s; font-family: inherit; }
.cal__flex-btn:hover { background: #f0f0f0; }
.cal__flex-btn--active { background: #1a1a2e; color: #fff; border-color: #1a1a2e; }
/* Mobile calendar header */
.cal__mobile-header { display: none; align-items: center; justify-content: space-between; padding: 16px 20px 14px; border-bottom: 1px solid #E2E8F0; flex-shrink: 0; position: sticky; top: 0; background: #fff; z-index: 2; }
.cal__mobile-title { font-size: 17px; font-weight: 700; color: #1C398E; margin: 0; }
.cal__mobile-close { width: 32px; height: 32px; border: none; border-radius: 8px; background: #F4F6F9; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.15s; color: #1C398E; }
.cal__mobile-close:hover { background: #e1eaf8; }
/* Guests counter */
.guests-row { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 12px; border-bottom: 1px solid #E2E8F0; }
.guests-row:last-of-type { border-bottom: none; }
.guests-row__info  { display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 3px; } /* M7: label + age hint in one left column */
.guests-row__label { font-size: 16px; font-weight: 600; color: #1C398E; }
.guests-row__sub   { font-size: 13px; font-weight: 500; color: #6D7580; }
.guests-row__link  { font-size: 13px; font-weight: 500; color: #6D7580; text-decoration: underline; cursor: pointer; }
.guests-row__link:hover { color: #1C398E; }
.guests-counter { display: flex; align-items: center; gap: 12px; }
.guests-counter__btn {
  width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid #BFDBFF;
  background: #fff; color: #1C398E; font-size: 20px; font-weight: 400;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background 0.15s, border-color 0.15s; line-height: 1; padding: 0; font-family: inherit;
}
.guests-counter__btn:hover:not(:disabled) { background: #EDF3FF; border-color: #145DFC; }
.guests-counter__btn:disabled { opacity: 0.35; cursor: not-allowed; }
.guests-counter__value { font-size: 17px; font-weight: 600; color: #1C398E; min-width: 24px; text-align: center; }
.guests-age-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; gap: 12px; }
.guests-age-lbl { font-size: 14px; font-weight: 500; color: #1C398E; }
.guests-age-select {
  flex: 0 0 128px; height: 34px; padding: 0 28px 0 10px; border: 1.5px solid #DBE6FF;
  border-radius: 8px; font-size: 14px; color: #1C398E; cursor: pointer;
  appearance: none; outline: none; font-family: inherit;
  background: #F8FAFF url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='M1 3l4 4 4-4' stroke='%231C398E' stroke-width='1.4' stroke-linecap='round' fill='none'/%3E%3C/svg%3E") no-repeat right 8px center;
}
.guests-age-select:focus { border-color: #145DFC; }
.search-dropdown__apply-btn {
  display: block; width: calc(100% - 32px); margin: 0 16px 16px;
  height: 44px; border: none; border-radius: 10px; background: #145DFC; color: #fff;
  font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit; transition: background 0.15s;
}
.search-dropdown__apply-btn:hover { background: #1244e0; }
/* C#10 (qa5): в каталоге календарь тоже показываем ОДНИМ месяцем на планшетном
   диапазоне (581–900px) — два месяца рядом вылезали за край. Раньше это правило было
   только на главной (index.php), в каталог (header.php) не попало. */
@media (min-width: 581px) and (max-width: 900px) {
  .cal__months { gap: 0; }
  .cal__month:nth-child(2) { display: none; }
  .search-dropdown--date { max-height: min(78vh, 620px); overflow-y: auto; }
}
/* Mobile calendar full-screen */
@media (max-width: 580px) {
  .search-dropdown--guests { left: 0; right: 0; width: auto; }
  .search-dropdown--city.search-dropdown--visible {
    position: fixed; inset: 0; top: 0; left: 0;
    width: 100%; min-width: 0; max-width: none;
    height: 100%; max-height: 100dvh;
    border-radius: 0; z-index: 9000; box-shadow: none;
    /* Spalte: Titel und Eingabefeld stehen fest, gescrollt wird nur die Liste. */
    display: flex; flex-direction: column; overflow: hidden;
  }
  .search-dropdown--city.search-dropdown--visible .search-dropdown__search {
    display: flex; align-items: center; gap: 10px; flex: 0 0 auto;
    margin: 14px 20px 6px; padding: 0 14px; height: 52px;
    border: 1px solid #DBE6FF; border-radius: 12px; background: #F8FAFF;
    box-sizing: border-box;
  }
  /* Der Fokusring gehört an den Rahmen: die globale Regel input:focus-visible
     setzt outline-offset 2px, und der lief als zweites, eckiges Rechteck aus
     der abgerundeten Box heraus. */
  .search-dropdown--city.search-dropdown--visible .search-dropdown__search:focus-within {
    border-color: #145DFC; border-width: 2px; padding: 0 13px; background: #fff;
  }
  .search-dropdown--city.search-dropdown--visible .search-dropdown__search-input:focus,
  .search-dropdown--city.search-dropdown--visible .search-dropdown__search-input:focus-visible { outline: none; }
  .search-dropdown--city.search-dropdown--visible .search-dropdown__list {
    flex: 1 1 auto; min-height: 0; max-height: none;
    overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: 24px;
  }
  .search-dropdown--city.search-dropdown--visible .search-dropdown__item {
    flex-direction: row; align-items: center; gap: 14px;
    min-height: 56px; padding: 8px 20px;
  }
  .search-dropdown--city.search-dropdown--visible .search-dropdown__item::before {
    content: ""; flex: 0 0 40px; height: 40px; border-radius: 12px;
    background: #EEF3FF url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M12 13.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Z' stroke='%231C398E' stroke-width='1.6'/%3E%3Cpath d='M12 22c-4-5-8-8.134-8-12a8 8 0 1 1 16 0c0 3.866-4 7-8 12Z' stroke='%231C398E' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat center;
  }
  .search-dropdown--city.search-dropdown--visible .search-dropdown__item-text { min-width: 0; }
  .search-dropdown--city.search-dropdown--visible .search-dropdown__item-name { font-size: 16px; }
  .search-dropdown--city.search-dropdown--visible .search-dropdown__item-country { font-size: 14px; }
  .search-dropdown--city.search-dropdown--visible .search-dropdown__heading { padding: 14px 20px 6px; }
  .search-dropdown--date.search-dropdown--visible {
    position: fixed; inset: 0; width: 100%; height: 100%; max-height: 100dvh;
    border-radius: 0; z-index: 9000; overflow-y: auto; box-shadow: none;
    top: 0; left: 0; display: flex; flex-direction: column;
  }
  .cal__mobile-header { display: flex; }
  .cal { padding: 16px 16px 0; width: 100%; max-width: 440px; margin: 0 auto; box-sizing: border-box; }
  .cal__header { flex-wrap: wrap; justify-content: center; column-gap: 12px; gap: 0; margin-bottom: 4px; }
  .cal__nav--prev { order: 1; } .cal__nav--next { order: 2; }
  .cal__months { order: 3; width: 100%; flex-direction: column; gap: 0; min-width: 0; }
  .cal__month { min-width: 0; max-width: 100%; }
  .search-dropdown--date.search-dropdown--visible { overflow-x: hidden; }
  .cal__grid { width: 100%; min-width: 0; grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .cal__day { min-width: 0; }
  .cal__day-inner { max-width: 100%; }
  .cal__mobile-header, .cal__tabs { max-width: 440px; margin-left: auto; margin-right: auto; width: 100%; box-sizing: border-box; }
}

/* ── Validation error shake ── */
@keyframes hd-shake {
  0%,100% { transform: translateX(0); }
  20%,60% { transform: translateX(-5px); }
  40%,80% { transform: translateX(5px); }
}
.app-header__search-field.is-error { background: #fff0f0 !important; border-radius: 10px; }
.app-header__search-field.is-shake { animation: hd-shake 0.4s ease; }

/* ── Responsive (same width scale as main + footer) ── */
@media (max-width: 1100px) {
  .app-header__search { margin: 0 16px; }
  .app-header__search-input,
  .app-header__filter-btn { font-size: 15px; }
  .app-header__search-field--guests { flex-basis: 132px; }
}
/* C#7 (qa4) + R4-2 (qa6): переносим catalog-поиск на собственную строку во всю ширину.
   Диапазон подняли до ≤1200px: на 1025–1160px круглая кнопка поиска впритык наезжала на
   «Filter» (замерено: зазор 0→7px, комфортный ≥14px только с ~1200px). Перенос на свою
   строку убирает и схлопывание полей (901–1023px), и коллизию поиск/Filter (1024–1160px). */
@media (max-width: 1200px) {
  .app-header--catalog .app-header__inner { flex-wrap: wrap; row-gap: 10px; min-height: 128px; }
  .app-header--catalog .app-header__search { order: 3; flex-basis: 100%; max-width: none; margin: 4px 0 0; }
  .app-header--catalog + .app-header-spacer { height: 128px; }
}
@media (max-width: 900px) {
  .app-header-spacer { height: calc(72px + env(safe-area-inset-top)); }
  .app-header__inner { min-height: 72px; padding-block: 16px; width: calc(100% - 64px); }
  .app-header--catalog + .app-header-spacer { height: 128px; }
  .app-header--catalog .app-header__inner { min-height: 128px; padding-block: 12px; flex-wrap: wrap; row-gap: 10px; }
  .app-header--catalog .app-header__search { order: 3; flex-basis: 100%; max-width: none; margin: 0; }
  .app-header__actions { gap: 16px; }
  .app-header__actions-main { gap: 8px; }
  /* Größe kommt jetzt aus der Grundregel (36px) — hier bleibt nur, was sich
     auf dieser Breite wirklich unterscheidet. */
  .app-header__icon-btn { padding: 8px; }
}
@media (max-width: 580px) {
  .app-header__inner { width: calc(100% - 40px); }
  /* Gleicher Haltepunkt wie auf der Startseite, gleiche Maße. */
  .app-header__icon-btn { width: 34px; height: 34px; padding: 7px; }
  .app-header__icon-btn svg { width: 20px; height: 20px; }
  .app-header--catalog + .app-header-spacer { height: 232px; }
  .app-header--catalog .app-header__inner { min-height: 232px; }
  .app-header--catalog .app-header__search { height: auto; flex-direction: column; align-items: stretch; border-radius: 12px; padding: 6px; }
  .app-header--catalog .app-header__search-field,
  .app-header--catalog .app-header__search-field--guests { flex: 0 0 auto; width: 100%; height: 38px; padding: 0 10px; }
  .app-header--catalog .app-header__search-divider { display: none; }
  .app-header--catalog .app-header__search-submit { width: 100%; height: 38px; margin-top: 4px; border-radius: 8px; }
  .app-header--catalog .app-header__filter-btn span { display: none; }
}
@media (max-width: 375px) {
  .app-header-spacer { height: 56px; }
  .app-header__inner { min-height: 56px; padding-block: 10px; width: calc(100% - 24px); gap: 8px; }
  .app-header--catalog + .app-header-spacer { height: 220px; }
  .app-header--catalog .app-header__inner { min-height: 220px; }
  .app-header__brand { width: auto; height: auto; } .app-header__brand-logo { height: 42px; width: auto; }
  .app-header__actions { gap: 6px; }
  .app-header__actions-main { gap: 4px; }
  .app-header__icon-btn { width: 30px; height: 30px; padding: 6px; }
  .app-header__icon-btn svg { width: 16px; height: 16px; }
  .app-header__icon-btn--profile { font-size: 12px; }
}
@media (max-width: 320px) {
  .app-header__inner { width: calc(100% - 16px); }
  .app-header__brand { width: auto; height: auto; } .app-header__brand-logo { height: 38px; width: auto; }
  .app-header__actions { gap: 4px; }
  .app-header__actions-main { gap: 2px; }
  .app-header__icon-btn { width: 30px; height: 30px; padding: 5px; }
}
/* ── Mobile: collapse the catalog search into a compact pill (placed last so it
      overrides the stacked-search rules above). Tap the pill → full search. ── */
@media (max-width: 580px) {
  .app-header--catalog + .app-header-spacer { height: 128px; }
  .app-header--catalog .app-header__inner { min-height: 128px; }
  .app-header--catalog .app-header__search { display: none; }
  .app-header--catalog.app-header--search-open .app-header__search { display: flex; }
  .app-header--catalog .app-header__search-pill {
    display: flex; order: 3; flex-basis: 100%; align-items: center; gap: 10px;
    width: 100%; min-height: 46px; padding: 10px 16px;
    border: 1px solid #d7deea; border-radius: 9999px; background: #f4f6f9;
    color: #1c398e; cursor: pointer; text-align: left;
    font: 600 15px/1.2 Inter, system-ui, sans-serif; box-shadow: 0 1px 4px rgba(10,30,90,0.06);
  }
  .app-header--catalog .app-header__search-pill svg { width: 18px; height: 18px; flex-shrink: 0; color: #145dfc; }
  .app-header--catalog .app-header__search-pill-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .app-header--catalog.app-header--search-open .app-header__search-pill { display: none; }
}
@media (max-width: 375px) {
  .app-header--catalog + .app-header-spacer { height: 122px; }
  .app-header--catalog .app-header__inner { min-height: 122px; }
}
