/* ============================================================
   floor-picker.css — экран "Выбор этажа"
   Цвета и шрифты взяты из main-style.css проекта застройщика.
   Палитра проекта захардкожена в исходных стилях, поэтому здесь
   собираю её в переменные :root, чтобы переиспользовать.
   ============================================================ */

:root {
  --accent:        #386294; /* основной акцент сайта */
  --accent-dark:   #0f163e; /* тёмный (hover кнопок/текст) */
  --gold:          #d6b864; /* доп. акцент */
  --grey:          #929291; /* вторичный текст/бордеры */
  --bg:            #efeff1; /* фон страницы (body сайта) */
  --line:          #dde1e7; /* светлый разделитель */
  --white:         #ffffff;

  /* производные полупрозрачные (как в main-style.css) */
  --accent-fill:   rgba(56, 98, 148, 0.30);  /* заливка этажа при hover */
  --accent-soft:   rgba(56, 98, 148, 0.10);
  --veil:          rgba(15, 22, 62, 0.50);
  --shadow:        rgba(15, 22, 62, 0.18);
  --sold-fill:     rgba(146, 146, 145, 0.35); /* приглушённая заливка */

  /* ---- статусы квартир/этажей (подкрути под вкус) ----
     free — зелёный, busy (sold/booked) — красный; гармоничны с акцентом #386294 */
  --unit-free:        rgba(34, 153, 84, 0.15);   /* заливка покоя (планировка просвечивает) */
  --unit-free-strong: rgba(34, 153, 84, 0.30);   /* hover */
  --unit-free-line:   #229954;                    /* контур */
  --unit-free-glow:   rgba(34, 153, 84, 0.55);    /* свечение hover */
  --unit-busy:        rgba(199, 56, 56, 0.16);    /* занято — заливка покоя */
  --unit-busy-strong: rgba(199, 56, 56, 0.32);
  --unit-busy-line:   #c73838;
  --unit-busy-glow:   rgba(199, 56, 56, 0.5);

  /* этажи на фасаде — акцент проекта, едва видны в покое */
  --floor-fill:    rgba(56, 98, 148, 0.55);
  --floor-line:    var(--accent);
  --floor-glow:    rgba(56, 98, 148, 0.6);
  --floor-current: rgba(34, 153, 84, 0.13);   /* еле-зелёная подсветка открытого этажа на фоне */
  --floor-num:     var(--accent);   /* цвет номеров этажей на фасаде (#386294) */
  --floor-rest-opacity: 0.26;     /* прозрачность доступного этажа в покое */

  --header-height: 72px;
}

* { box-sizing: border-box; }

/* резервируем место под скроллбар всегда — блокировка скролла (план открыт)
   не вызывает горизонтального сдвига контента */
html { scrollbar-gutter: stable; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--accent-dark);
  font-family: "Open Sans", sans-serif;
  font-weight: 500;
  line-height: 1.2;
}


.header {
        z-index: 23;
}

body .modalbg {
    z-index: 22;
}

.footer {
      z-index: 23;
    
}

/* кнопка — копия .site-btn из main-style.css */
.site-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.3s ease all;
  font-weight: bold;
  padding: 0 35px;
  background-color: var(--accent);
  color: var(--white);
  border-radius: 25px;
  height: 50px;
  font-size: 16px;
  border: none;
  text-decoration: none;
  font-family: inherit;
}
.site-btn:hover { background-color: var(--accent-dark); }
.site-btn.border {
  background-color: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}
.site-btn.border:hover {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}
.site-btn.small { height: 40px; font-size: 14px; padding: 0 18px; }

/* ---------- Заголовок страницы ---------- */
.fp-intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 15px;
  width: 1400px;
  max-width: calc(100% - 30px);
  margin: 26px auto 14px;
}
.fp-intro__title {
  margin: 0 0 6px;
  font-size: 30px;
  font-weight: 800;
  color: var(--accent-dark);
}
.fp-intro__subtitle {
  margin: 0;
  font-size: 16px;
  color: var(--grey);
}

/* ---------- Сцена: фото + SVG-оверлей ---------- */
.fp-stage {
  position: relative;
  width: 1400px;
  max-width: calc(100% - 30px);
  margin: 0 auto 60px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 40px var(--shadow);
  line-height: 0; /* убирает зазор под img */
}
/* обёртка зума/панорамы (transform только в калибровке) */
.fp-stage__zoom {
  position: relative;
  transform-origin: 0 0;
  will-change: transform;
}
/* подложка-картинка */
.fp-stage__img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}
/* SVG точно поверх картинки и совпадает при любом ресайзе */
.fp-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: opacity 0.4s ease;
}
/* на экране плана прячем линии разметки этажей на фоновом фасаде, КРОМЕ еле-зелёной
   подсветки текущего открытого этажа (оверлей квартир на плане не трогаем) */
body.fp-floor-open #overlay-building .floor-poly { opacity: 0; pointer-events: none; }
body.fp-floor-open #overlay-building .floor-poly.is-current {
  opacity: 1;
  fill: var(--floor-current);
  stroke: transparent;
  filter: none;
}

/* ---------- Полигоны этажей ---------- */
.floor-poly {
  fill: transparent;
  stroke: transparent;
  stroke-width: 1;
  cursor: pointer;
  transform-box: fill-box;          /* scale вокруг центра самой фигуры */
  transform-origin: center;
  transition: opacity 0.18s ease-out, filter 0.18s ease-out,
              transform 0.18s ease-out, stroke-width 0.18s ease-out;
}
/* доступный этаж — едва виден в покое (читается как интерактивная зона) */
.floor-poly--free {
  fill: var(--floor-fill);
  stroke: var(--floor-line);
  stroke-width: 1.5;
  opacity: var(--floor-rest-opacity);
}
.floor-poly--free:hover,
.floor-poly--free.is-hl {            /* подсветка от hover этажа ИЛИ его номера */
  opacity: 0.85;
  stroke-width: 2.5;
  filter: drop-shadow(0 0 12px var(--floor-glow));
  transform: scale(1.012);
}
.floor-poly--free.is-hl {            /* подсветка от hover этажа ИЛИ его номера */
  fill: #d6b864;
}
/* этаж без свободных квартир */
.floor-poly--sold {
  fill: var(--sold-fill);
  stroke: var(--grey);
  stroke-width: 1;
  opacity: 0.2;
  cursor: not-allowed;
}
.floor-poly--sold:hover { opacity: 0.4; }

/* волна-«подмигивание» снизу вверх: только opacity/filter/transform (60fps).
   Задержку на каждый этаж задаёт JS (style.animationDelay). */
@keyframes fp-floor-wave {
  0%, 100% { opacity: var(--floor-rest-opacity); filter: none; transform: scale(1); }
  45%      { opacity: 0.8; filter: drop-shadow(0 0 12px var(--floor-glow)); transform: scale(1.012); }
}
.floor-poly--free.is-wave { animation: fp-floor-wave var(--wave-step, 900ms) ease-out; }

/* ВСПЫШКА-ВЫБОР при клике на этаж (фаза «выбора» перед зумом) — зелёная, заметная */
.floor-poly.is-selecting {
  opacity: 1;
  fill: var(--unit-free-strong);
  stroke: var(--unit-free-line);
  stroke-width: 2.5;
  filter: drop-shadow(0 0 14px var(--unit-free-glow));
  transition: opacity 0.2s ease, fill 0.2s ease, filter 0.2s ease;
}

/* ПУЛЬСАЦИЯ доступных этажей на экране выбора — деликатное «дыхание» (подсказка
   кликабельности). Только на фасаде (не на плане), не в калибровке. */
@keyframes fp-floor-breathe {
  0%, 100% { opacity: var(--floor-rest-opacity); }
  50%      { opacity: 0.5; }
}
@keyframes fp-badge-breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.07); }
}
@keyframes fp-badge-glow {
  0%, 100% { filter: drop-shadow(0 1px 2px rgba(15, 22, 62, 0.28)); }
  50%      { filter: drop-shadow(0 2px 9px rgba(56, 98, 148, 0.55)); }
}
body.fp-pulse:not(.fp-floor-open):not(.fp-edit) .floor-poly--free {
  animation: fp-floor-breathe 3.2s ease-in-out infinite;
}
/* пульсация кружков-номеров: scale + мягкое свечение, со сдвигом фазы (--bi) —
   волна сверху вниз. Проданные (is-muted) не пульсируют. */
body.fp-pulse:not(.fp-floor-open):not(.fp-edit) .fp-floor-badge:not(.is-muted) {
  transform-box: fill-box;
  transform-origin: center;
  animation: fp-badge-breathe 2.6s ease-in-out infinite;
  animation-delay: calc(var(--bi, 0) * 0.16s);
}
body.fp-pulse:not(.fp-floor-open):not(.fp-edit) .fp-floor-badge:not(.is-muted) .fp-floor-badge__bg {
  animation: fp-badge-glow 2.6s ease-in-out infinite;
  animation-delay: calc(var(--bi, 0) * 0.16s);
}

/* ---------- Номера этажей на фасаде: синяя плашка + белый текст (#386294) ---------- */
.fp-floor-badge {
  cursor: pointer;
  transform-box: fill-box;           /* scale вокруг центра плашки */
  transform-origin: center;
  transition: transform 0.18s ease, filter 0.18s ease, opacity 0.35s ease;
}
/* на экране плана список номеров на фасаде плавно скрыт (его заменяет боковая панель) */
body.fp-floor-open .fp-floor-badge { opacity: 0; pointer-events: none; }
.fp-floor-badge__bg {
  fill: var(--floor-num);            /* #386294 */
  filter: drop-shadow(0 1px 2px rgba(15, 22, 62, 0.28));   /* лёгкая мягкая тень */
}
.fp-floor-badge__t {
  fill: #fff;                        /* белое число — максимальный контраст */
  direction: ltr;
  font-family: "Open Sans", sans-serif;
  font-weight: 600;
  letter-spacing: 0.02em;
  user-select: none;
}
/* недоступные этажи — приглушённая плашка, не кликается, текст светлый */
.fp-floor-badge.is-muted { cursor: default; }
.fp-floor-badge.is-muted .fp-floor-badge__bg { fill: var(--grey); opacity: 0.6; }
.fp-floor-badge.is-muted .fp-floor-badge__t  { opacity: 0.9; }
/* подсветка от hover этажа/плашки — синхронно с полигоном */
.fp-floor-badge.is-hl { transform: scale(1.08); }
.fp-floor-badge.is-hl .fp-floor-badge__bg { filter: drop-shadow(0 2px 7px rgba(56, 98, 148, 0.55)); }
/* прямой hover по кружку — заметная реакция (это кнопка); пульсация уступает */
.fp-floor-badge:not(.is-muted):hover {
  animation: none !important;
  transform: scale(1.16);
  cursor: pointer;
}
.fp-floor-badge:not(.is-muted):hover .fp-floor-badge__bg {
  animation: none !important;
  fill: var(--accent-dark);
  filter: drop-shadow(0 3px 11px rgba(56, 98, 148, 0.6));
}
/* prefers-reduced-motion: пульсацию выключить, hover-реакция остаётся */
@media (prefers-reduced-motion: reduce) {
  .fp-floor-badge, .fp-floor-badge__bg, .floor-poly--free { animation: none !important; }
}

/* ---------- Тултип ---------- */
.fp-tooltip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  min-width: 150px;
  max-width: 260px;
  padding: 12px 14px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 8px 28px var(--shadow);
  border-top: 3px solid var(--accent);
  pointer-events: none;
  opacity: 0;
  /* изящное появление: лёгкий подъём + scale (позиция — через left/top) */
  transform: translateY(8px) scale(0.96);
  transform-origin: top left;
  transition: opacity 0.18s ease-out, transform 0.18s ease-out;
}
.fp-tooltip.is-visible { opacity: 1; transform: translateY(0) scale(1); }
.fp-tooltip.is-sold { border-top-color: var(--grey); }
.fp-tooltip__price {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 800;
  color: var(--accent);
}
.fp-tooltip.is-sold .fp-tooltip__price { color: var(--grey); }
.fp-tooltip.is-booked .fp-tooltip__price { color: var(--gold); }

.fp-tooltip__floor {
  font-size: 17px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 6px;
}
.fp-tooltip.is-sold .fp-tooltip__floor { color: var(--grey); }

/* ---------- Иерархия номера квартиры «№N»: префикс мелкий/серый, число — акцент ---------- */
.fp-no__pfx {
  font-size: 0.62em;
  font-weight: 400;
  color: var(--grey);
  margin-inline-end: 0.2em;
  vertical-align: 0.1em;
}
.fp-no__num {
  font-weight: 700;
  color: var(--accent);
}
.fp-tooltip.is-sold .fp-no__num { color: var(--grey); }

.fp-tooltip__row {
  font-size: 14px;
  color: var(--accent-dark);
  margin-top: 3px;
}
.fp-tooltip__row b { color: var(--accent); font-weight: 700; }
.fp-tooltip__empty {
  font-size: 14px;
  color: var(--grey);
  font-style: italic;
}

/* ============================================================
   Режим калибровки (?edit=1)
   ============================================================ */
.fp-edit .floor-poly {            /* в калибровке все полигоны видны */
  fill: var(--accent-soft);
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-dasharray: 6 4;
  opacity: 1;                       /* сброс статусной прозрачности боевого режима */
  animation: none;                  /* волна не мешает калибровке */
  vector-effect: non-scaling-stroke; /* линии не толстеют при зуме */
}
.fp-edit .floor-poly--sold {
  fill: rgba(146, 146, 145, 0.18);
  stroke: var(--grey);
}

/* перетаскиваемые вершины */
.fp-handle {
  fill: var(--white);
  stroke: var(--accent);
  stroke-width: 2;
  cursor: grab;
  vector-effect: non-scaling-stroke;
}
.fp-handle:hover { fill: var(--gold); }
.fp-handle.is-drag { cursor: grabbing; fill: var(--accent); }

/* маркеры середин рёбер — сплошные, визуально отличны от вершин; двигают линию */
.fp-edge-handle {
  fill: var(--accent);
  stroke: var(--white);
  stroke-width: 1.5;
  cursor: move;
  vector-effect: non-scaling-stroke;
  opacity: 0.85;
}
.fp-edge-handle:hover { fill: var(--gold); opacity: 1; }
.fp-edge-handle.is-drag { fill: var(--accent-dark); }

/* в калибровке вся фигура тянется целиком (drag внутри) */
.fp-edit .fp-poly { cursor: move; }
.fp-edit .fp-poly.is-drag { cursor: grabbing; }

/* подпись номера этажа в калибровке */
.fp-edit-label {
  fill: var(--accent-dark);
  font-size: 22px;
  font-weight: 800;
  font-family: "Open Sans", sans-serif;
  paint-order: stroke;
  stroke: var(--white);
  stroke-width: 4px;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

/* курсоры панорамы (перекрывают курсор ручек) */
.fp-stage.is-pan-ready, .fp-stage.is-pan-ready * { cursor: grab !important; }
.fp-stage.is-panning,  .fp-stage.is-panning *  { cursor: grabbing !important; }
/* в калибровке жесты не должны прокручивать страницу */
.fp-edit .fp-stage { touch-action: none; }

/* ---------- Выезжающая Debug-панель ---------- */
.fp-debug {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 300px;
  max-width: 85vw;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  background: var(--white);
  box-shadow: -10px 0 40px var(--shadow);
  border-inline-start: 1px solid var(--line);
  transform: translateX(100%);          /* спрятана за правым краем */
  transition: transform 0.25s ease;
  overflow-y: auto;
}
.fp-debug.is-open { transform: translateX(0); }

.fp-debug__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.fp-debug__title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--accent-dark);
}
.fp-debug__title::before {
  content: "🐞";
  margin-inline-end: 6px;
}
.fp-debug__close {
  border: none;
  background: var(--bg);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: var(--grey);
}
.fp-debug__close:hover { background: var(--line); color: var(--accent-dark); }

/* тумблер "Режим калибровки" */
.fp-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: 12px;
  user-select: none;
}
.fp-switch input { position: absolute; opacity: 0; pointer-events: none; }
.fp-switch__slider {
  position: relative;
  flex: 0 0 auto;
  width: 42px;
  height: 24px;
  border-radius: 12px;
  background: var(--grey);
  transition: background 0.2s ease;
}
.fp-switch__slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}
.fp-switch input:checked + .fp-switch__slider { background: var(--accent); }
.fp-switch input:checked + .fp-switch__slider::after { transform: translateX(18px); }
.fp-switch__label { font-size: 15px; font-weight: 700; color: var(--accent-dark); }

/* инструменты — кнопки на всю ширину */
.fp-debug__tools {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fp-debug__tools .site-btn { width: 100%; }
.fp-debug__tools[hidden] { display: none; }

.fp-debug__status {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  min-height: 18px;
}
.fp-debug__legend {
  font-size: 12px;
  line-height: 1.5;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 10px 12px;
}
.fp-debug__legend[hidden] { display: none; }
.fp-debug__hint {
  margin-top: auto;             /* прижать к низу панели */
  font-size: 12px;
  color: var(--grey);
}
.fp-debug__hint b { color: var(--accent); }
.fp-debug__kbd {
  font-size: 11px;
  color: var(--grey);
}
.fp-debug__kbd code {
  background: var(--bg);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--accent-dark);
}

/* плашка ошибки загрузки (например, открыто по file:// без сервера) */
.fp-error {
  width: 1400px;
  max-width: calc(100% - 30px);
  margin: 0 auto 40px;
  padding: 18px 20px;
  background: #fff4f4;
  border: 1px solid #f0c9c9;
  border-radius: 12px;
  color: #8a2b2b;
  font-size: 15px;
  line-height: 1.5;
}
.fp-error code {
  background: rgba(0,0,0,0.06);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 14px;
}

/* ============================================================
   УРОВЕНЬ 2 — план этажа: плейсхолдер-подложка + квартиры
   ============================================================ */
.fp-view[hidden] { display: none; }
/* кроссфейд входа уровня */
.fp-view { transition: opacity 0.28s ease; }
.fp-view.is-entering { opacity: 0; }

/* Переход здание↔план: уезжающий/приезжающий вид кладём фикс-оверлеем поверх,
   чтобы слои ПЕРЕКРЫВАЛИСЬ во времени (никакого чёрного провала между ними). */
.fp-view--over {
  position: fixed;
  inset: 0;
  z-index: 60;
  overflow: hidden;
}
/* во время GSAP-перехода свой CSS-transition отключаем, чтобы он не «дрался»
   с покадровой анимацией opacity (иначе рывок/залипание) */
body.fp-animating .fp-view { transition: none !important; }

/* пока план открыт: фасад остаётся в потоке ЗА фикс-оверлеем плана; скролл
   заблокирован (нет скачка страницы, фасад-задник не сдвигается) */
body.fp-floor-open { overflow: hidden; }

/* шапка плана: кнопка "Назад" + заголовок */
.fp-intro--floor {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.fp-intro--floor .fp-intro__title { width: auto; margin: 0; }
.fp-intro--floor .fp-intro__subtitle { flex-basis: 100%; }
.fp-back { flex: 0 0 auto; }

/* ненавязчивая подсказка про выход кликом вне плана */
.fp-exit-hint {
  font-size: 11px;
  color: var(--grey);
  text-align: center;
  line-height: 1.3;
  margin: 0;
}

/* ---------- Панель переключения этажей — белая карточка рядом с планом ----------
   Содержит: заголовок этажа קומה N, список мини-пилюль, кнопку «Назад», подсказку.
   inset-inline-start в RTL — у правого края, примыкает к плану. */
.fp-floornav {
  position: absolute;
  inset-inline-start: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 90vh;
  width: auto;
  min-width: 92px;
  max-width: 150px;
  padding: 12px 10px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 10px 30px var(--shadow);
}
.fp-floornav__head { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.fp-floornav__floor {                /* текущий этаж — заголовок панели */
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--accent-dark);
  text-align: center;
  white-space: nowrap;
}
.fp-floornav__head .fp-back {        /* компактная кнопка «Назад» по ширине панели */
  width: 100%;
  height: 34px;
  padding: 0 10px;
  font-size: 12.5px;
  white-space: nowrap;
}
.fp-floornav__list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  overflow: auto;
  padding: 2px 0;
  scrollbar-width: none;
}
.fp-floornav__list::-webkit-scrollbar { display: none; }
.fp-floornav .fp-exit-hint { max-width: 86px; }

.fp-floornav__item {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: var(--floor-num);      /* #386294 */
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(15, 22, 62, 0.22);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.fp-floornav__item:hover { transform: scale(1.1); box-shadow: 0 2px 8px rgba(56, 98, 148, 0.5); }
.fp-floornav__item.is-active {       /* текущий этаж — акцент + рамка + крупнее */
  background: var(--accent-dark);
  transform: scale(1.16);
  box-shadow: 0 3px 11px rgba(56, 98, 148, 0.6);
  outline: 2px solid #fff;
  outline-offset: -3px;
}
.fp-floornav__item.is-muted {        /* недоступные — приглушены, не кликаются */
  background: var(--grey);
  opacity: 0.5;
  cursor: default;
}
.fp-floornav__item.is-muted:hover { transform: none; box-shadow: 0 1px 4px rgba(15, 22, 62, 0.22); }
@media (max-width: 768px) {          /* адаптив — компактнее, но тап-таргеты ≥40px */
  .fp-floornav { inset-inline-start: 6px; min-width: 92px; gap: 6px; padding: 9px 8px; }
  .fp-floornav__floor { font-size: 13px; }
  .fp-floornav__head .fp-back { font-size: 11px; padding: 0 6px; }
  .fp-floornav__item { width: 40px; height: 40px; font-size: 14px; }   /* удобный тап */
  .fp-floornav__item.is-active { transform: scale(1.1); }
}

/* ---------- План этажа в один экран (без скролла) ----------
   Только боевой режим (не .fp-edit) — калибратор сохраняет своё поведение.
   #view-floor — flex-колонка на 100vh; сцена вписывает картинку по высоте,
   zoom-обёртка обтягивает картинку, поэтому SVG-оверлей остаётся совмещён. */
body:not(.fp-edit) #view-floor:not([hidden]) {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}
body:not(.fp-edit) #view-floor .fp-intro--floor { flex: 0 0 auto; margin: 8px auto; }
body:not(.fp-edit) #view-floor .fp-stage {
  flex: 1 1 auto;
  min-height: 0;
  width: auto;
  max-width: 100%;
  margin: 0 auto 10px;
  /* отступ со стороны панели этажей (RTL inline-start) — план под неё не заходит */
  padding-inline-start: 150px;
  padding-inline-end: 20px;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (max-width: 768px) {
  body:not(.fp-edit) #view-floor .fp-stage { padding-inline-start: 108px; padding-inline-end: 8px; }
}
body:not(.fp-edit) #view-floor .fp-stage__zoom {
  display: inline-flex;            /* обтянуть картинку -> box == картинка */
  max-width: 100%;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 40px var(--shadow);
}
body:not(.fp-edit) #view-floor .fp-stage__img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 40px);  /* высота экрана минус шапка/отступы */
}
/* плейсхолдер плана (ground/top без картинки) — тоже вписать по высоте */
body:not(.fp-edit) #view-floor .fp-stage.is-noimg .fp-plan-ph {
  width: auto;
  height: calc(100vh - 40px);
  max-width: 100%;
}

/* плейсхолдер плана — показывается только если картинка не загрузилась */
.fp-plan-ph {
  display: none;
  width: 100%;
  aspect-ratio: 1448 / 1086;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  color: #8b909c;
  font-size: 18px;
  font-weight: 700;
  background-color: #e7e9ee;
  background-image:
    repeating-linear-gradient(45deg,
      rgba(146,146,145,0.10) 0, rgba(146,146,145,0.10) 12px,
      transparent 12px, transparent 24px);
  user-select: none;
}
.fp-stage.is-noimg #plan-img    { display: none; }
.fp-stage.is-noimg .fp-plan-ph  { display: flex; }

/* ---------- Премиум-«наезд»: затемнение подложки задаёт JS (GSAP/inline) ---------- */
.fp-poly.is-diving {            /* выбранный этаж/квартира «вспыхивает» поверх затемнения */
  fill: var(--accent-fill);
  stroke: var(--accent);
  stroke-width: 3;
  opacity: 1;                   /* поверх статусной прозрачности боевого режима */
  filter: drop-shadow(0 0 16px rgba(56, 98, 148, 0.7));
  transition: fill 0.3s ease, filter 0.3s ease;
}

/* ---------- Ненавязчивая иконка-подсказка на плане ---------- */
.fp-hint {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  z-index: 6;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  cursor: help;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px var(--shadow);
  transition: background 0.2s ease, transform 0.2s ease;
}
.fp-hint:hover { background: var(--accent-dark); transform: scale(1.06); }
.fp-hint__bubble {
  position: absolute;
  top: 40px;
  inset-inline-end: 0;
  width: 210px;
  padding: 10px 12px;
  background: var(--white);
  border-radius: 10px;
  border-top: 3px solid var(--accent);
  box-shadow: 0 8px 24px var(--shadow);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--accent-dark);
  text-align: start;
  opacity: 0;
  transform: translateY(-6px) scale(0.97);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.fp-hint:hover .fp-hint__bubble,
.fp-hint:focus-visible .fp-hint__bubble,
.fp-hint.is-show .fp-hint__bubble { opacity: 1; transform: translateY(0) scale(1); }

/* ---------- Полигоны квартир (та же база, что у этажей) ---------- */
.fp-poly { vector-effect: non-scaling-stroke; }

.unit-poly {
  stroke-width: 1.5;
  cursor: pointer;
  transform-box: fill-box;          /* scale вокруг центра квартиры */
  transform-origin: center;
  transition: fill 0.18s ease-out, stroke 0.18s ease-out,
              filter 0.18s ease-out, transform 0.18s ease-out, stroke-width 0.18s ease-out;
}
/* свободна — зелёная заливка покоя, планировка просвечивает */
.unit-poly--free {
  fill: var(--unit-free);
  stroke: var(--unit-free-line);
}
.unit-poly--free:hover {
  fill: var(--unit-free-strong);
  stroke-width: 2.5;
  filter: drop-shadow(0 0 10px var(--unit-free-glow));
  transform: scale(1.01);
}
/* занято: забронировано — красный с пунктиром (кликабельно), продано — сплошной красный */
.unit-poly--booked {
  fill: var(--unit-busy);
  stroke: var(--unit-busy-line);
  stroke-dasharray: 8 5;
}
.unit-poly--booked:hover {
  fill: var(--unit-busy-strong);
  stroke-width: 2.5;
  filter: drop-shadow(0 0 10px var(--unit-busy-glow));
  transform: scale(1.01);
}
.unit-poly--sold {              /* продано — не кликается */
  fill: var(--unit-busy);
  stroke: var(--unit-busy-line);
  opacity: 0.9;
  cursor: not-allowed;
}
.unit-poly--sold:hover { fill: var(--unit-busy-strong); }
/* в калибровке все квартиры видны */
.fp-edit .unit-poly {
  fill: var(--accent-soft);
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-dasharray: 6 4;
  opacity: 1;                       /* сброс статусной прозрачности боевого режима */
}

/* ---------- Метка №+статус на квартире (на плане) ---------- */
.fp-unit-label { pointer-events: none; }   /* клик идёт к полигону квартиры */
.fp-edit .fp-unit-label { display: none; } /* в калибровке скрыты */
.fp-unit-label__bg {
  fill: rgba(255, 255, 255, 0.82);
  stroke: rgba(15, 22, 62, 0.12);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.fp-unit-label__no {
  font-family: "Open Sans", sans-serif;
  font-weight: 700;
  fill: var(--accent-dark);
  direction: ltr;
}
.fp-unit-label__st {
  font-family: "Open Sans", sans-serif;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.fp-unit-label--free   .fp-unit-label__st { fill: var(--unit-free-line); }   /* зелёный */
.fp-unit-label--booked .fp-unit-label__st { fill: var(--gold); }
.fp-unit-label--sold   .fp-unit-label__st { fill: var(--grey); }
.fp-unit-label--sold   .fp-unit-label__bg { fill: rgba(241, 241, 243, 0.85); }
.fp-unit-label--sold   .fp-unit-label__no { fill: var(--grey); }

/* тултип: статусные акценты */
.fp-tooltip.is-booked { border-top-color: var(--gold); }
.fp-tooltip.is-booked .fp-tooltip__floor { color: var(--gold); }
.fp-tooltip__free   { color: var(--accent); font-weight: 700; }
.fp-tooltip__booked { color: var(--gold);   font-weight: 700; }

/* ============================================================
   УРОВЕНЬ 3 — карточка квартиры (модальное окно)
   ============================================================ */
.fp-card-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: var(--veil);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  perspective: 1200px;                 /* для 3D-появления карточки */
  animation: fp-scrim-in 0.3s ease;    /* плавное затемнение фона */
}
.fp-card-overlay[hidden] { display: none; }
@keyframes fp-scrim-in { from { opacity: 0; } to { opacity: 1; } }

.fp-card {
  position: relative;
  width: 560px;
  max-width: 100%;
  max-height: 90vh;
  overflow: auto;
  background: var(--white);
  border-radius: 18px;
  padding: 26px;
  box-shadow: 0 24px 70px var(--veil);
  transform-origin: center bottom;
  animation: fp-card-in 0.32s cubic-bezier(.2,.7,.2,1);
}
/* лёгкое 3D: из перспективы (наклон + отдаление) в плоскость */
@keyframes fp-card-in {
  from { opacity: 0; transform: translateY(26px) translateZ(-80px) rotateX(8deg); }
  to   { opacity: 1; transform: translateY(0) translateZ(0) rotateX(0); }
}
/* Крестик — основной способ закрыть. В RTL inset-inline-end = левый угол. */
.fp-card__x {
  position: absolute;
  top: 16px;
  inset-inline-end: 16px;
  z-index: 2;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  font-size: 30px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  color: var(--accent-dark);
  box-shadow: 0 2px 10px var(--shadow);
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}
.fp-card__x:hover {
  background: var(--accent);
  color: #fff;
  transform: scale(1.08) rotate(90deg);
}
.fp-card__x:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.fp-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.fp-card__title {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  color: var(--accent-dark);
}
.fp-card__badge {
  font-size: 14px;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: 20px;
}
/* свободно — зелёный статус */
.fp-card__badge--free   { background: #e3f6e9; color: #1c8a4e; }
.fp-card__badge--booked { background: rgba(214,184,100,0.18); color: #8a6d1f; }
.fp-card__badge--sold   { background: #f1f1f3; color: var(--grey); }

/* плитки параметров — компактные, один ряд равной ширины */
.fp-card__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.fp-card__cell {
  background: var(--bg);
  border-radius: 10px;
  padding: 8px 6px;
  text-align: center;
  align-self: start;          /* не растягиваться на всю высоту */
}
.fp-card__cell-val {
  display: block;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--accent);
}
.fp-card__cell-key {
  display: block;
  font-size: 10px;
  color: var(--grey);
  margin-top: 2px;
}

.fp-card__meta {
  font-size: 15px;
  color: var(--accent-dark);
  margin-bottom: 10px;
}
.fp-card__meta b { color: var(--accent); }


.fp-card__price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding: 16px;
  background: var(--accent-soft);
  border-radius: 12px;
  margin-bottom: 18px;
}
.fp-card__price[hidden] { display: none; }   /* скрытие цены флагом SHOW_PRICES */
.fp-card__price-old {
  font-size: 16px;
  color: var(--grey);
  text-decoration: line-through;
}
.fp-card__price-now {
  font-size: 26px;
  font-weight: 800;
  color: var(--accent);
}
.fp-card__price-note {
  flex-basis: 100%;
  font-size: 12px;
  color: var(--grey);
}

.fp-card__plan {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  border-radius: 12px;
  overflow: hidden;
  font: inherit;
  background: #fff;
}
/* состояние БЕЗ картинки — рамка-плейсхолдер с пропорцией и штриховкой */
.fp-card__plan:not(.has-img) {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px;
  color: #8b909c;
  font-size: 15px;
  font-weight: 700;
  background-color: #e7e9ee;
  background-image:
    repeating-linear-gradient(45deg,
      rgba(146,146,145,0.10) 0, rgba(146,146,145,0.10) 10px,
      transparent 10px, transparent 20px);
}
.fp-card__plan.has-img { cursor: zoom-in; }
/* КРУПНО: картинка заполняет область без полей-обрезков, пропорции сохранены */
.fp-card__plan-img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 72vh;
  margin: 0 auto;
  background: #fff;
  transition: transform 0.3s ease;
}
.fp-card__plan-img[hidden] { display: none; }
.fp-card__plan.has-img:hover .fp-card__plan-img { transform: scale(1.02); }
/* подсказка-зум в углу (видна только при наличии картинки) */
.fp-card__plan-zoom {
  position: absolute;
  inset-block-start: 10px;
  inset-inline-end: 10px;
  width: 34px;
  height: 34px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(56, 98, 148, 0.9);
  color: #fff;
  font-size: 18px;
  box-shadow: 0 2px 8px var(--shadow);
  transition: transform 0.18s ease;
}
.fp-card__plan.has-img .fp-card__plan-zoom { display: flex; }
.fp-card__plan.has-img:hover .fp-card__plan-zoom { transform: scale(1.1); }

/* ---------- Фолбэк-галерея (если GLightbox не загрузился) ---------- */
.fp-lb {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: rgba(16, 26, 40, 0.92);   /* тёмный scrim под проект */
  opacity: 0;
  transition: opacity 0.22s ease;
}
.fp-lb.is-open { opacity: 1; }
.fp-lb__img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.5);
  transform: scale(0.94);
  transition: transform 0.22s ease;
}
.fp-lb.is-open .fp-lb__img { transform: scale(1); }
.fp-lb__nav {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  transition: background 0.16s ease;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 34px;
  line-height: 1;
}
.fp-lb__nav:hover { background: var(--accent); }
.fp-lb__prev { inset-inline-start: 18px; }
.fp-lb__next { inset-inline-end: 18px; }

/* ---------- Единый крестик закрытия: слева вверху, белый круг с тёмным ×
   (как в карточке квартиры — .fp-card__x). Применяется и к фолбэк-галерее,
   и к GLightbox. ---------- */
.fp-lb__close,
.glightbox-clean .gclose {
  position: absolute;
  top: 16px !important;
  left: 16px !important;
  right: auto !important;
  inset-inline-end: auto;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white) !important;
  color: var(--accent-dark);
  font-size: 28px;
  line-height: 1;
  opacity: 1 !important;
  cursor: pointer;
  box-shadow: 0 2px 10px var(--shadow);
  transition: background 0.16s ease, transform 0.16s ease;
}
.fp-lb__close:hover,
.glightbox-clean .gclose:hover { background: var(--accent) !important; transform: scale(1.08); }
.glightbox-clean .gclose svg { width: 20px; height: 20px; }
.glightbox-clean .gclose svg * { fill: var(--accent-dark) !important; stroke: var(--accent-dark) !important; }
.glightbox-clean .gclose:hover svg * { fill: #fff !important; stroke: #fff !important; }

/* ---------- Тема GLightbox под проект (стрелки — акцент) ---------- */
.glightbox-clean .gslide-description { background: var(--white); }
.goverlay { background: rgba(16, 26, 40, 0.92) !important; }
.glightbox-clean .gnext,
.glightbox-clean .gprev { background: rgba(56, 98, 148, 0.9); border-radius: 50%; }
.glightbox-clean .gnext:hover,
.glightbox-clean .gprev:hover { background: var(--accent-dark); }

/* ---------- Двухколоночная раскладка карточки (mobile-first) ----------
   Мобайл: одна колонка, планировка сверху (order:-1), данные+форма снизу.
   Десктоп (≥721px): две колонки — данные+форма | планировка.
   Логические св-ва/grid сами учитывают RTL: в иврите данные справа, план слева. */
.fp-card__body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}
.fp-card__col--media { order: -1; }             /* план сверху на мобильном */
/* две колонки — только на десктоп/планшет ≥769px (≤768 = bottom-sheet в одну колонку) */
@media (min-width: 769px) {
  .fp-card--wide { width: 940px; }
  /* медиа-колонка (план) шире — план главный визуал попапа */
  .fp-card__body { grid-template-columns: 0.86fr 1.24fr; gap: 24px; }
  .fp-card__col--media { order: 0; position: sticky; top: 0; }
}

/* ---------- Форма заявки (lead) ----------
   Контейнер #lead-form-host можно целиком заменить на встраиваемый код
   внешнего сервиса форм (Formit/Formitable). */
.fp-card__form {
  margin-bottom: 18px;
  padding: 18px;
  border-radius: 14px;
  background: var(--bg);
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.lead-form__title {
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 800;
  color: var(--accent-dark);
}
.lead-form__field {
  display: block;
  margin-bottom: 12px;
}
.lead-form__label {
  display: block;
  font-size: 13px;
  color: var(--grey);
  margin-bottom: 6px;
}
.lead-form__input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  font: inherit;
  font-size: 15px;
  color: var(--accent-dark);
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.lead-form__input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}


.lead-form__input--phone::placeholder { text-align: right; }
.lead-form__agree {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  color: var(--accent-dark);
  margin-bottom: 12px;
}
.lead-form__agree input { margin-top: 3px; flex: none; }
.lead-form__agree a { color: var(--accent); }
.lead-form__error {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: #c0392b;
}
.lead-form #lead-submit { width: 100%; }

/* нижний "סגור" — вторичная маленькая ссылка (главное действие — שלח в форме) */
.fp-card__actions {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}
.fp-card__close-link {
  border: none;
  background: none;
  padding: 4px 8px;
  font: inherit;
  font-size: 14px;
  color: var(--grey);
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.16s ease;
}
.fp-card__close-link:hover { color: var(--accent-dark); }

/* ---------- Тост ---------- */
.fp-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  z-index: 500;
  padding: 14px 24px;
  background: var(--accent-dark);
  color: #fff;
  font-weight: 700;
  border-radius: 12px;
  box-shadow: 0 12px 40px var(--veil);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.fp-toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Блок "Сетка этажей" в Debug-панели ---------- */
.fp-grid,
.fp-anim {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: var(--bg);
  border-radius: 12px;
}
.fp-grid[hidden] { display: none; }
.fp-anim { margin-top: 4px; }
.fp-anim__status {
  font-size: 12px;
  line-height: 1.5;
  color: var(--accent-dark);
  padding: 8px 10px;
  background: var(--white);
  border-radius: 8px;
}
.fp-anim__status .ok { color: #1c8a4e; }
.fp-anim__status .no { color: #c0392b; }
.fp-grid__title {
  font-size: 14px;
  font-weight: 800;
  color: var(--accent-dark);
}
.fp-grid__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.fp-grid__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 12px;
  color: var(--accent-dark);
}
.fp-grid__row--wide { font-weight: 700; }
.fp-grid__row input,
.fp-grid__row select {
  width: 78px;
  height: 30px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-family: inherit;
  font-size: 13px;
  color: var(--accent-dark);
  background: var(--white);
}
.fp-grid__row--wide input { width: 92px; }
.fp-grid__unit {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--grey);
}
.fp-grid__unit label { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.fp-grid #grid-regen { width: 100%; margin-top: 2px; }
.fp-grid__warn {
  font-size: 11px;
  line-height: 1.4;
  color: #8a6d1f;
  background: rgba(214, 184, 100, 0.15);
  border-radius: 8px;
  padding: 7px 9px;
}

/* ---------- Блок "План этажа" (тип плана, автонумерация, инспектор) ---------- */
.fp-plan {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: var(--bg);
  border-radius: 12px;
}
.fp-plan[hidden] { display: none; }
.fp-plan input,
.fp-plan select {
  width: 96px;
  height: 30px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-family: inherit;
  font-size: 13px;
  color: var(--accent-dark);
  background: var(--white);
}
.fp-plan #num-apply,
.fp-plan #plan-select { width: auto; }
.fp-plan #plan-select { min-width: 130px; }
.fp-plan__inspector {
  border-top: 1px dashed var(--line);
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fp-plan__hint { font-size: 12px; color: var(--grey); line-height: 1.4; }
.fp-ord { display: inline-flex; gap: 4px; }
.fp-ord button {
  width: 28px; height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--accent);
  cursor: pointer;
  font-size: 14px;
}
.fp-ord button:hover { background: var(--accent); color: #fff; }

/* ---------- Блок "Версии разметки" ---------- */
.fp-versions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: var(--bg);
  border-radius: 12px;
}
.fp-versions[hidden] { display: none; }
.fp-ver-row { display: flex; gap: 8px; }
.fp-ver-row #ver-name {
  flex: 1;
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-family: inherit;
  font-size: 13px;
}
.fp-ver-row .site-btn { white-space: nowrap; }
.fp-ver-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.fp-ver-empty { font-size: 12px; color: var(--grey); font-style: italic; }
.fp-ver-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
}
.fp-ver-meta { font-size: 12px; color: var(--accent-dark); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-ver-btns { display: flex; gap: 4px; flex: 0 0 auto; }
.fp-ver-btns button {
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 6px;
  background: var(--bg);
  color: var(--accent);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}
.fp-ver-btns button:hover { background: var(--accent); color: #fff; }

/* ---------- Кнопка-CTA в тултипе (тач) ---------- */
.fp-tooltip.has-cta { pointer-events: auto; }
.fp-tt-cta { width: 100%; margin-top: 10px; }

/* ---------- Debug: мобильное сообщение ---------- */
.fp-debug__mobile {
  display: none;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.lang-he {
    direction: rtl;
}

.lang-he .lead-form__input--phone {
    /* телефон — LTR-контент в RTL-форме: +972… не «прыгает», выровнен по правому краю */
    direction: ltr;
    text-align: right;
}

/* ---------- Адаптив (брейкпоинты проекта 768 / 480) ---------- */
@media (max-width: 768px) {
  .fp-intro__title { font-size: 22px; }
  .fp-intro__subtitle { font-size: 14px; }
  .site-btn { height: 44px; padding: 0 22px; font-size: 14px; }
  /* на узких экранах тултип чуть компактнее */
  .fp-tooltip { min-width: 130px; padding: 10px 12px; }

  /* калибровка — десктоп-онли: прячем контролы, показываем сообщение */
  .fp-debug__body { display: none; }
  .fp-debug__mobile { display: block; }

  /* карточка квартиры — нижний лист (bottom sheet) на всю ширину */
  .fp-card-overlay { align-items: flex-end; padding: 0; }
  .fp-card {
    width: 100%;
    max-width: 100%;
    max-height: 92vh;
    border-radius: 18px 18px 0 0;
    animation: fp-sheet-in 0.25s ease;
  }
  @keyframes fp-sheet-in {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
  }
  .fp-card__actions { flex-direction: column; }
}

/* ---------- Уважение prefers-reduced-motion: переходы мгновенные ---------- */
@media (prefers-reduced-motion: reduce) {
  .fp-view,
  .fp-tooltip,
  .fp-card,
  .fp-card-overlay,
  .fp-poly,
  .fp-stage__img,
  .fp-toast {
    transition: none !important;
    animation: none !important;
  }
}
