/* Плашка согласия на cookies. Самодостаточна: подключается и к SPA, и к статическим страницам. */
html:not(.elit-cc-enabled) [data-cookie-settings],
html:not(.elit-cc-enabled) [data-cookie-settings-wrap] { display: none !important; }
/* Низ страницы остаётся достижимым прокруткой, пока плашка открыта. */
html.elit-cc-open body { padding-bottom: var(--elit-cc-space, 0px); }
/* Программный фокус после решения: без рамки вокруг всего содержимого. */
[data-elit-cc-focus]:focus { outline: none; }

.elit-cc {
  --cc-ink: #172321;
  --cc-muted: #5e6d6b;
  --cc-line: #d8e0df;
  --cc-brand: #0e5558;
  --cc-brand-deep: #063f43;
  --cc-brand-soft: #eaf1f1;
  position: fixed;
  /* Над шапкой (20) и мобильным меню (60), но под окном оформления заказа (80) и выпадающими списками: плашка не блокирует покупку. */
  z-index: 70;
  left: 24px;
  bottom: 24px;
  box-sizing: border-box;
  width: min(560px, calc(100vw - 48px));
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px 22px;
  border: 1px solid var(--cc-line);
  border-radius: 16px;
  background: #fff;
  color: var(--cc-ink);
  box-shadow: 0 24px 80px rgba(6, 35, 36, .18);
  font: 400 14px/1.5 Inter, Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: left;
  animation: elit-cc-in 180ms ease-out;
}
.elit-cc *, .elit-cc *::before, .elit-cc *::after { box-sizing: border-box; }
.elit-cc p { margin: 0; max-width: none; }
.elit-cc a { color: var(--cc-brand); text-decoration: underline; text-underline-offset: .16em; }
.elit-cc a:hover { color: var(--cc-brand-deep); }
.elit-cc :focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(14, 85, 88, .32); border-radius: 6px; }

.elit-cc__title { margin: 0 0 8px; color: var(--cc-ink); font-size: 18px; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
.elit-cc__title:focus { outline: none; }
.elit-cc__summary { display: grid; gap: 6px; }
.elit-cc__hint { color: var(--cc-muted); font-size: 13px; }

.elit-cc__settings { display: none; gap: 12px; margin-top: 14px; }
.elit-cc--settings .elit-cc__settings { display: grid; }
.elit-cc__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 12px 14px; border: 1px solid var(--cc-line); border-radius: 12px; background: #f7fafa; }
.elit-cc__row-title { display: block; margin: 0 0 2px; color: var(--cc-ink); font-size: 14px; font-weight: 600; }
.elit-cc__row-text { color: var(--cc-muted); font-size: 13px; }
.elit-cc__legal { color: var(--cc-muted); font-size: 12.5px; }

.elit-cc__switch { position: relative; display: inline-flex; flex: none; width: 44px; height: 26px; margin-top: 1px; }
.elit-cc__switch input { position: absolute; inset: -9px; z-index: 1; width: calc(100% + 18px); height: calc(100% + 18px); margin: 0; opacity: 0; cursor: pointer; }
.elit-cc__track { position: relative; width: 44px; height: 26px; border-radius: 999px; background: #b9c5c3; transition: background 180ms ease; }
.elit-cc__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform 180ms ease; }
.elit-cc__switch input:checked + .elit-cc__track { background: var(--cc-brand); }
.elit-cc__switch input:checked + .elit-cc__track::after { transform: translateX(18px); }
.elit-cc__switch--locked input { cursor: not-allowed; }
.elit-cc__switch--locked .elit-cc__track { opacity: .55; }
.elit-cc__switch input:focus-visible + .elit-cc__track { box-shadow: 0 0 0 3px rgba(14, 85, 88, .32); }

.elit-cc__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.elit-cc__btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border: 1px solid var(--cc-brand); border-radius: 10px; font: inherit; font-size: 14px; font-weight: 600; line-height: 1.2; cursor: pointer; transition: background 180ms ease, color 180ms ease; }
.elit-cc__btn--primary { background: var(--cc-brand); color: #fff; }
.elit-cc__btn--primary:hover { background: var(--cc-brand-deep); border-color: var(--cc-brand-deep); }
.elit-cc__btn--secondary { background: #fff; color: var(--cc-brand); }
.elit-cc__btn--secondary:hover { background: var(--cc-brand-soft); }
.elit-cc__link { min-height: 44px; margin-left: auto; padding: 0 4px; border: 0; background: none; color: var(--cc-brand); font: inherit; font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: .16em; cursor: pointer; }

/* Кнопка «Настройки cookies» на статических страницах. */
.cookie-settings-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: .16em; cursor: pointer; }

@media (max-width: 600px) {
  .elit-cc { left: 12px; right: 12px; bottom: 12px; width: auto; max-height: calc(100dvh - 24px); padding: 16px; border-radius: 14px; }
  .elit-cc__title { font-size: 17px; }
  .elit-cc__actions { display: grid; grid-template-columns: 1fr 1fr; }
  .elit-cc__btn { width: 100%; padding: 0 12px; }
  .elit-cc__link { grid-column: 1 / -1; margin-left: 0; justify-self: center; }
}
@media (max-width: 380px) { .elit-cc { padding: 14px; font-size: 13px; } .elit-cc__title { margin-bottom: 6px; font-size: 16px; } .elit-cc__hint { font-size: 12px; } .elit-cc__actions { gap: 8px; margin-top: 12px; } }
@media (max-width: 359px) { .elit-cc__actions { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .elit-cc, .elit-cc__track, .elit-cc__track::after { animation: none; transition: none; } }
@media print { .elit-cc { display: none; } }
@keyframes elit-cc-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
