/* ==========================================================================
   Плашка согласия на cookie (js/cookie.js собирает разметку сам).
   По образцу плашки «Делового клуба» — внизу по центру, значок, заголовок,
   текст со ссылками на политику и согласие, две кнопки «Отклонить» / «Принять» —
   но в нашем стекле: тёмное «ink» с размытием фона (рецепт орбиты: косой
   отсвет, кромка 1 px, блик по верхней кромке), золотая волосяная линия сверху
   (как у попапа заявки) и штатные кнопки сайта (.btn--gold, .btn--ghost).

   Плотность намеренно высокая (.9+): плашка лежит на любом фоне — на белом листе
   и на тёмной полосе — и белый текст должен читаться везде (на белом фоне под
   плашкой итоговый тон ≈ (41 50 64), контраст белого ≥ 12:1). Двигаем только
   transform и opacity: размытие под небольшой плашкой дёшево, но анимировать
   что-то ещё не нужно.
   ========================================================================== */
.cookie {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1200;   /* выше шапки (≈ 900), мобильного меню (850), полосы прогресса (1100); ниже прелоадера (2000) и попапа заявки (3000) */
  display: flex; justify-content: center;
  padding: 0 clamp(12px, 2.4vw, 24px) max(clamp(12px, 2.4vw, 24px), env(safe-area-inset-bottom));
  pointer-events: none;           /* поле вокруг плашки не перехватывает клики */
}
.cookie[hidden] { display: none; }
/* Телефон лёжа (ниже 500 px по высоте): плашка (z-index 1200) лежала поверх открытого меню и закрывала его кнопку и низ барабана —
   пока меню открыто, прячем плашку; после закрытия она на месте (ревью 12.10.2026). В портрете пересечения нет. */
@media (max-height: 500px) {
  html:has(#mobile-menu:not([hidden])) .cookie { visibility: hidden; opacity: 0; pointer-events: none; }
}

.cookie__plate {
  position: relative; isolation: isolate; overflow: hidden;
  width: min(920px, 100%);
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center;
  gap: 16px 22px;
  padding: 20px 24px;
  border-radius: var(--r-xl);
  color: #fff;
  pointer-events: auto;
  background:
    linear-gradient(118deg, rgb(255 255 255 / .17) 0%, rgb(255 255 255 / .04) 34%, rgb(255 255 255 / 0) 54%),
    linear-gradient(180deg, rgb(19 48 76 / .9) 0%, rgb(15 26 44 / .93) 100%);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / .16),
    inset 0 1px 0 rgb(255 255 255 / .3),
    0 26px 60px -24px rgb(4 10 22 / .85);
  /* появление: поднимается снизу и проявляется */
  opacity: 0; transform: translate3d(0, 28px, 0);
  transition: opacity .55s var(--ease-out), transform .75s var(--ease-out);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .cookie__plate { background: linear-gradient(180deg, rgb(19 48 76 / .98) 0%, rgb(15 26 44 / .99) 100%); }
}
.cookie.is-open .cookie__plate { opacity: 1; transform: none; }

/* золотая волосяная линия по верхней кромке — раскрывается от центра */
.cookie__plate::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; z-index: 1;
  background: linear-gradient(90deg, rgb(216 183 129 / 0), var(--c-gold) 38%, var(--c-gold-2) 62%, rgb(216 183 129 / 0));
  transform: scaleX(0); transform-origin: center;
  transition: transform .9s var(--ease-out) .2s;
}
.cookie.is-open .cookie__plate::before { transform: scaleX(1); }

.cookie__icon {
  width: 46px; height: 46px; display: grid; place-items: center; flex: none;
  border-radius: 50%; color: var(--c-gold);
  background: radial-gradient(circle at 32% 26%, rgb(216 183 129 / .26), rgb(216 183 129 / .08) 70%);
  box-shadow: inset 0 0 0 1px rgb(216 183 129 / .5), 0 8px 18px -10px rgb(4 10 22 / .8);
}
.cookie__icon svg { display: block; width: 24px; height: 24px; }

.cookie__body { min-width: 0; }
.cookie__title {
  font-family: var(--f-serif); font-weight: 400; font-size: 20px; line-height: 1.2; color: #fff;
}
.cookie__text { margin-top: 6px; font-size: 13.5px; line-height: 1.6; color: rgb(255 255 255 / .76); }
.cookie__text a {
  color: #e2c795; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgb(226 199 149 / .5);
  transition: color var(--t-fast), text-decoration-color var(--t-fast);
}
@media (hover: hover) { .cookie__text a:hover { color: #fff; text-decoration-color: #fff; } }

.cookie__actions { display: flex; align-items: center; gap: 10px; }
.cookie__actions .btn { justify-content: center; }

/* ≤ 720 (телефоны): компактная плашка (правка заказчика 09.10.2026: «уменьшить плашку с куки»).
   Было: значок слева, заголовок 17 px, текст 13 px в 4–5 строк, кнопки по 40 px — 163–215 px высоты, то есть
   21–32 % экрана. Стало: без значка (он съедал 54 px ширины, и текст шёл в лишнюю строку), заголовок 14 px,
   текст 12 px, кнопки 34 px рядом, меньше поля — около 130–150 px. Текст и ссылки на политику и согласие не
   менялись. Сюда влиты прежние блоки «низкий экран» (сервер, 09.10: плашка закрывала ручку громкости радио на
   390×667) и «≤ 380» — теперь они действуют на всех телефонах. Кнопки 34 px — выше минимума WCAG 2.2 (24 px). */
@media (max-width: 720px) {
  .cookie { padding-inline: 10px; padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .cookie__plate { grid-template-columns: minmax(0, 1fr); padding: 11px 14px 12px; gap: 7px; }
  .cookie__icon { display: none; }
  .cookie__title { font-size: 14px; }
  .cookie__text { margin-top: 2px; font-size: 12px; line-height: 1.42; }
  .cookie__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .cookie__actions .btn { height: 34px; padding-inline: 12px; font-size: 13px; }
}

/* без движения: плашка просто есть, золотая линия сразу целая */
@media (prefers-reduced-motion: reduce) {
  .cookie__plate, .cookie__plate::before { transition: none; transform: none; }
  .cookie__plate::before { transform: scaleX(1); }
}
@media print { .cookie { display: none !important; } }
