/* ==========================================================
   Cookie consent card
   ========================================================== */
.cookie {
  --ck-ink: #2b2b2b;
  --ck-muted: #6b6b6b;
  --ck-line: #e6e6e6;
  position: fixed; right: 24px; bottom: 24px; z-index: 95;
  width: min(360px, calc(100vw - 24px));
  background: #fff; color: var(--ck-ink);
  border: 1px solid #ececec; border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .18), 0 2px 6px rgba(0, 0, 0, .06);
  font-family: "HelveticaNeueCyr", "Helvetica Neue", Helvetica, Arial, sans-serif;
  overflow: hidden;
  opacity: 0; transform: translateY(24px) scale(.98);
  transition: opacity .6s cubic-bezier(.22, 1, .36, 1), transform .6s cubic-bezier(.22, 1, .36, 1);
  pointer-events: none;
}
.cookie.is-in { opacity: 1; transform: none; pointer-events: auto; }

.cookie__main { padding: 26px 26px 20px; }
.cookie__title { margin: 0 0 18px; font-size: 32px; font-weight: 500; letter-spacing: -.03em; line-height: 1; }
.cookie__text { margin: 0 0 20px; font-size: 15px; line-height: 1.45; color: #444; }

.cookie__accept { justify-content: center; }
.cookie__link {
  display: block; margin-top: 16px; text-align: center;
  font-size: 14px; color: var(--ck-muted);
  text-decoration: underline; text-underline-offset: 3px;
}
.cookie__link:hover { color: var(--ck-ink); }

/* customize */
.cookie__toggle {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 18px 26px; border: 0; border-top: 1px solid var(--ck-line);
  background: none; color: var(--ck-ink);
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
}
.cookie__toggle svg { width: 14px; height: 14px; transition: transform .4s cubic-bezier(.22, 1, .36, 1); }
.cookie.is-open .cookie__toggle svg { transform: rotate(180deg); }

.cookie__prefs {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .45s cubic-bezier(.22, 1, .36, 1);
}
.cookie.is-open .cookie__prefs { grid-template-rows: 1fr; }
.cookie__prefs > div { overflow: hidden; }
.cookie__list { list-style: none; margin: 0; padding: 0 26px; }
.cookie__list li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--ck-line); }
.cookie__list li:first-child { border-top: 0; }
.cookie__list b { display: block; font-size: 14px; font-weight: 600; }
.cookie__list small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--ck-muted); line-height: 1.35; }
.cookie__save { justify-content: center; width: calc(100% - 52px); margin: 8px 26px 22px; }

/* switch */
.switch { position: relative; flex: none; width: 40px; height: 24px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span {
  position: absolute; inset: 0; border-radius: 999px; background: #d9d9d9;
  transition: background .3s; pointer-events: none;
}
.switch span::after {
  content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
  transition: transform .3s cubic-bezier(.22, 1, .36, 1);
}
.switch input:checked + span { background: #2f2f2f; }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:disabled { cursor: not-allowed; }
.switch input:disabled + span { opacity: .5; }
.switch input:focus-visible + span { outline: 2px solid #ff4a24; outline-offset: 2px; }

@media (max-width: 820px) {
  .cookie { right: 12px; left: 12px; bottom: 84px; width: auto; } /* sits above the floating dock */
  .cookie__main { padding: 22px 20px 18px; }
  .cookie__title { font-size: 28px; }
  .cookie__toggle { padding: 16px 20px; }
  .cookie__list { padding: 0 20px; }
  .cookie__save { width: calc(100% - 40px); margin: 8px 20px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .cookie, .cookie__prefs, .cookie__toggle svg { transition: none; }
}
