/* ---------------------------------------------------------------------------
 * Фея — рукописный слой поверх выгрузки макета.
 * ------------------------------------------------------------------------- */

html { -webkit-text-size-adjust: 100%; }
body { margin: 0; overflow-x: hidden; }
button { font: inherit; }
:where(a, button, [role="button"]):focus-visible { outline: 3px solid var(--brand-500); outline-offset: 3px; }
section[id] { scroll-margin-top: 76px; }

/* Кнопки дизайн-системы: flex-центрирование выравнивает строку целиком, но
   когда длинная подпись переносится на вторую строку, сами строки остаются
   прижатыми влево. text-align выравнивает и их. */
.feya-btn { text-align: center; }

/* Карточка факта: «профессиональных пятновыводителей» длиннее строки и
   вылезает за край карточки. Места переноса расставлены в разметке мягкими
   дефисами (&shy;) — на них полагаться можно везде, тогда как hyphens: auto
   в Chrome ничего не дал: русского словаря переносов в нём нет. Правило
   оставлено ради Firefox и Safari — там сверх наших меток слово переносится
   ещё и по словарю. overflow-wrap намеренно не ставим: он рвёт слово в
   произвольном месте и без дефиса. */
.feya-hyphenate {
  -webkit-hyphens: auto;
  hyphens: auto;
}

/* --- Мобильное меню (в макете его не было вовсе) --- */
.feya-burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: #fff;
  color: var(--color-text);
  cursor: pointer;
}
.feya-mobile-nav {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 8px 20px 16px;
  border-top: 1px solid var(--color-border);
  background: #fff;
}
.feya-mobile-nav a {
  padding: 12px 4px;
  font-weight: 600;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border-subtle, rgba(15, 46, 61, .08));
}
.feya-mobile-nav a:last-child { border-bottom: none; }

@media (max-width: 880px) {
  .feya-mobile-nav:not([hidden]) { display: flex !important; }
  .feya-burger[aria-expanded="true"] { background: var(--brand-500); border-color: var(--brand-500); color: #fff; }
}

/* --- Плашка вместо карты в автономной версии --- */
#feya-ymap-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 32px 20px;
  line-height: 1.5;
}
#feya-ymap-fallback strong { font-size: 17px; color: var(--color-text); }
.feya-map-pin { color: var(--brand-500); display: block; }

/* --- Лайтбокс для сканов наград --- */
.feya-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 46, 61, .86);
}
.feya-lightbox[hidden] { display: none; }
.feya-lightbox__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  cursor: pointer;
}
.feya-lightbox__figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: min(860px, 92vw);
}
.feya-lightbox__figure img {
  max-width: 100%;
  max-height: 76vh;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .4);
}
.feya-lightbox__figure figcaption {
  color: rgba(255, 255, 255, .9);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  max-width: 60ch;
}
[data-scan] { cursor: zoom-in; }

/* --- Точечные правки под узкие экраны --- */
@media (max-width: 880px) {
  /* Карта и список пунктов идут друг под другом. */
  #feya-ymap, [data-map-slot] { min-height: 260px; }
  /* Список пунктов разворачиваем целиком: вложенная прокрутка на телефоне
     обрезает карточки и мешает листать страницу. */
  .feya-points { max-height: none; overflow: visible; padding-right: 0; }
}

@media (max-width: 720px) {
  /* Лента наград листается пальцем, карточка почти во всю ширину. */
  #feya-trust-slider > * { min-width: 76vw; scroll-snap-align: start; }
}

/* --- Карта пунктов приёма --------------------------------------------------
   В автономной версии карты нет: холст остаётся пустым, под ним видна
   статичная плашка. В WordPress тем же холстом владеет assets/map.js. --- */
#feya-ymap { z-index: 1; }
#feya-ymap[data-ymap-state="live"] + #feya-ymap-fallback { display: none; }

/* Метка: круглый бейдж с логотипом и кончиком вниз. */
.feya-pin {
  position: relative;
  display: block;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transform: translate(-50%, calc(-100% - 10px));
  transition: transform .18s ease;
}
.feya-pin__badge {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--brand-500, #3399cc);
  box-shadow: 0 10px 24px rgba(15, 46, 61, .32);
}
.feya-pin__badge img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  background: #fff;
  border-radius: 50%;
  padding: 3px;
}
.feya-pin::after {
  content: "";
  position: absolute;
  bottom: -7px;
  left: calc(50% - 8px);
  width: 16px;
  height: 16px;
  border-right: 3px solid #fff;
  border-bottom: 3px solid #fff;
  background: var(--brand-500, #3399cc);
  transform: rotate(45deg);
}
.feya-pin:hover { transform: translate(-50%, calc(-100% - 14px)); }
.feya-pin.is-active { z-index: 3; transform: translate(-50%, calc(-100% - 10px)) scale(1.14); }
.feya-pin.is-active .feya-pin__badge { background: var(--brand-700, #1e6e96); }
.feya-pin.is-active::after { background: var(--brand-700, #1e6e96); }

/* Карточка выбранного пункта должна читаться как выбранная и по клику с карты. */
[data-point] { cursor: pointer; }

/* Кнопки масштаба: лежат рядом с холстом, потому что сам холст принадлежит
   ymaps3 и очищается при инициализации. Показываем их только на живой карте. */
.feya-map__zoom { display: none; }
#feya-ymap[data-ymap-state="live"] ~ .feya-map__zoom {
  position: absolute;
  z-index: 4;
  top: 14px;
  right: 14px;
  display: grid;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 46, 61, .22);
}
.feya-map__zoom button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  background: #fff;
  color: var(--brand-700, #1e6e96);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.feya-map__zoom button:last-child { border-bottom: 0; font-size: 19px; }
.feya-map__zoom button:hover { background: var(--brand-100, #e8f4fa); }

/* --- Уведомление о cookie --- */
.cookie-notice {
  position: fixed;
  z-index: 70;
  right: 20px;
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  width: min(600px, calc(100% - 32px));
  padding: 16px 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg, 16px);
  background: #fff;
  box-shadow: 0 18px 46px rgba(15, 46, 61, .18);
}
.cookie-notice[hidden] { display: none; }
.cookie-notice p { margin: 0; color: var(--color-text-muted, #4a6470); font-size: 13px; line-height: 1.5; }
.cookie-notice button {
  flex: 0 0 auto;
  padding: 11px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--brand-500, #3399cc);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.cookie-notice button:hover { background: var(--brand-700, #1e6e96); }

@media (max-width: 880px) {
  /* Ниже 880px снизу висит панель «Позвонить / Найти пункт» — не перекрываем её. */
  .cookie-notice { bottom: 92px; }
}

@media (max-width: 620px) {
  .cookie-notice {
    right: 12px;
    left: 12px;
    width: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .cookie-notice button { align-self: flex-start; }
}

/* --- Оговорка о публичной оферте внизу страницы --- */
.legal-offer {
  margin: 0;
  color: rgba(255, 255, 255, .55);
  font-size: var(--fs-caption, 12px);
  line-height: 1.55;
}

/* --- Нижняя строка подвала: знак разработчика и оговорка об оферте ---------
   Знак встаёт слева на ту же строку, где уже стояла оговорка, — отдельной
   строки под себя не занимает. */
.footer-legal-row {
  max-width: 1200px;
  margin: 14px auto 0;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.dev-credit {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: rgba(255, 255, 255, .82);
}
.dev-credit img { flex: 0 0 auto; display: block; width: auto; height: 32px; }
.dev-credit span { font-size: 14px; font-weight: 600; line-height: 1.15; white-space: nowrap;
  /* Выключка своя: подпись стоит в чужой строке подвала и иначе
     наследует её выравнивание — у «Полесья» так уезжала вправо. */
  text-align: left; }
.dev-credit:hover { color: var(--brand-400); }

/* Правая часть строки: копирайт и оговорка об оферте, обе по правому краю.
   Копирайт переехал сюда из отдельной строки подвала, поэтому его собственные
   отступы и разделитель снимаем — разделитель теперь у всей строки. */
.footer-legal-row {
  justify-content: space-between;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .14);
}
.footer-legal-text { display: grid; gap: 4px; text-align: right; }
.footer-legal-text .legal-inline {
  max-width: none;
  margin: 0;
  padding: 0;
  border-top: 0;
}
