/* ─────────────────────────────────────────────────────────────
   Unlock — cookie consent card (site/CookieConsent.jsx).
   Self-contained: the legal pages do not load the landing tokens,
   so every value is local to .ucc. Everything is scoped under .ucc
   and resets what the host pages set globally.
   ───────────────────────────────────────────────────────────── */

.ucc {
  --ucc-brand-600: #2D43D2;
  --ucc-brand-100: #EEF1FF;
  --ucc-grad: linear-gradient(135deg, #2D43D2 0%, #8F31EA 100%);
  --ucc-ink-1000: #0A0F1D;
  --ucc-ink-500: #5B6069;
  --ucc-ink-150: #D7DBE6;
  --ucc-ink-400: #777D8D;
  --ucc-ink-50: #F2F4F8;
  --ucc-border: rgba(10, 15, 29, 0.06);
  /* Ours: a solid brand ring with a white gap (7:1 on white), not the DS
     0.18 glow — that glow is under the 3:1 a focus indicator needs. */
  --ucc-ring: 0 0 0 2px #FFFFFF, 0 0 0 4px #2D43D2;
  --ucc-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ucc-snap: cubic-bezier(0.34, 1.56, 0.64, 1);

  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 1000;
  box-sizing: border-box;
  width: min(460px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  margin: 0;
  padding: 24px;
  background: #FFFFFF;
  border: 1px solid var(--ucc-border);
  border-radius: 20px;
  box-shadow: 0 30px 70px rgba(10, 15, 29, 0.20), 0 8px 20px rgba(10, 15, 29, 0.10);
  font-family: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  color: var(--ucc-ink-1000);
  line-height: normal;
  text-align: left;
  -webkit-font-smoothing: antialiased;
  animation: ucc-in 420ms var(--ucc-ease);
}
.ucc *, .ucc *::before, .ucc *::after { box-sizing: border-box; }
.ucc:focus { outline: none; }

@keyframes ucc-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 560px) {
  .ucc { left: 16px; right: 16px; bottom: 16px; width: auto; max-height: calc(100vh - 32px); }
}

/* ── Banner ───────────────────────────────────────────────── */
.ucc-head { display: flex; gap: 14px; align-items: flex-start; margin: 0 0 16px; }
.ucc-mark {
  width: 40px; height: 40px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--ucc-grad);
  box-shadow: 0 6px 16px rgba(45, 67, 210, 0.28);
}
.ucc-title {
  margin: 0 0 6px;
  padding: 0;
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: normal;
  color: var(--ucc-ink-1000);
}
.ucc-title:focus { outline: none; }
.ucc-title:focus-visible { outline: none; border-radius: 6px; box-shadow: var(--ucc-ring); }
.ucc-text { margin: 0; padding: 0; font-size: 14px; line-height: 1.55; color: var(--ucc-ink-500); }
.ucc-text--sm { font-size: 13.5px; }

.ucc-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ucc-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 16px; }

/* ── Buttons (DS md: 46px) ────────────────────────────────── */
.ucc-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 46px; margin: 0; padding: 0 19px;
  border-radius: 12px;
  font-family: inherit; font-size: 14.5px; font-weight: 500; line-height: 1.25;
  letter-spacing: -0.005em; white-space: nowrap;
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
  /* box-shadow is not animated: the focus ring must appear at once */
  transition-property: transform, background-color, filter;
  transition-duration: 160ms;
  transition-timing-function: var(--ucc-ease);
}
.ucc-btn:focus { outline: none; }
.ucc-btn--brand {
  border: 0;
  color: #FFFFFF;
  background: var(--ucc-grad);
  box-shadow: 0 14px 40px rgba(45, 67, 210, 0.28), 0 4px 12px rgba(45, 67, 210, 0.18);
}
.ucc-btn--ghost {
  border: 1px solid rgba(10, 15, 29, 0.10);
  color: var(--ucc-ink-1000);
  background: transparent;
}
@media (hover: hover) {
  .ucc-btn--brand:hover { filter: brightness(1.05); transform: translateY(-1px); }
  .ucc-btn--ghost:hover { background: var(--ucc-ink-50); }
}
.ucc-btn:active { transform: translateY(1px) scale(0.99); }
.ucc-btn:focus-visible { box-shadow: var(--ucc-ring), 0 4px 14px rgba(10, 15, 29, 0.18); }

/* Her widths: both choices min 140, «Налаштувати» min 130, all flex 1 1 auto. */
.ucc-choice { flex: 1 1 auto; min-width: 140px; }
.ucc-customize { flex: 1 1 auto; min-width: 130px; }
.ucc-save { flex: 1 1 auto; min-width: 150px; }
.ucc-accept-2 { flex: 1 1 auto; min-width: 120px; }

.ucc-link {
  display: inline-flex; align-items: center;
  min-height: 24px; padding: 2px 0;
  font-size: 13px; font-weight: 500; line-height: normal;
  color: var(--ucc-brand-600);
  text-decoration: none; text-underline-offset: 2px;
  border-radius: 6px;
  transition-property: color; transition-duration: 160ms; transition-timing-function: ease;
}
.ucc-link:hover { color: var(--ucc-ink-1000); text-decoration: underline; }
.ucc-link:focus { outline: none; }
.ucc-link:focus-visible { box-shadow: var(--ucc-ring); text-decoration: underline; }

/* ── Settings ─────────────────────────────────────────────── */
.ucc-prefs-head { margin: 0 0 8px; }
.ucc-rows { margin: 10px 0 18px; }
.ucc-row {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 0;
  border-top: 1px solid var(--ucc-border);
}
.ucc-row__text { flex: 1; min-width: 0; }
.ucc-row__title {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 14.5px; font-weight: 500; letter-spacing: -0.01em; line-height: normal;
  color: var(--ucc-ink-1000);
}
.ucc-row__body { margin-top: 3px; font-size: 13px; line-height: 1.5; color: var(--ucc-ink-500); }
.ucc-badge {
  padding: 2px 7px; border-radius: 999px;
  font-size: 10.5px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; line-height: normal;
  color: var(--ucc-brand-600); background: var(--ucc-brand-100);
}

/* Switch: her 44×26 with a 20px knob on the springy curve. */
.ucc-switch {
  position: relative; flex-shrink: 0;
  width: 44px; height: 26px; margin: 0; padding: 0;
  border: 0; border-radius: 999px;
  background: var(--ucc-ink-150);
  /* Ours: an off track of #D7DBE6 on white is 1.4:1 — a 1px ink-400 edge
     keeps the control visible at the 3:1 WCAG asks of UI components. */
  box-shadow: inset 0 0 0 1px var(--ucc-ink-400);
  cursor: pointer;
  transition-property: background-color; transition-duration: 220ms; transition-timing-function: var(--ucc-ease);
}
.ucc-switch::before { /* 44×42 hit area */
  content: ''; position: absolute; left: 0; right: 0; top: -8px; bottom: -8px;
}
.ucc-switch[aria-checked="true"] { background: var(--ucc-grad); box-shadow: none; }
.ucc-switch:disabled { cursor: not-allowed; opacity: 0.55; }
.ucc-switch:focus { outline: none; }
.ucc-switch:focus-visible { box-shadow: var(--ucc-ring); }
.ucc-switch__knob {
  position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(10, 15, 29, 0.25);
  transition-property: transform; transition-duration: 220ms; transition-timing-function: var(--ucc-snap);
}
.ucc-switch[aria-checked="true"] .ucc-switch__knob { transform: translateX(18px); }

/* «Налаштування cookies» on the privacy page — the way back to the choice
   after it was made. Outside .ucc, so it carries its own values. */
.ucc-open {
  display: inline-flex; align-items: center; justify-content: center;
  height: 46px; margin: 4px 0 0; padding: 0 19px;
  border: 1px solid rgba(10, 15, 29, 0.10); border-radius: 12px;
  background: transparent; color: #0A0F1D;
  font-family: inherit; font-size: 14.5px; font-weight: 500; line-height: 1.25;
  cursor: pointer;
  transition-property: background-color; transition-duration: 160ms; transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}
@media (hover: hover) { .ucc-open:hover { background: #F2F4F8; } }
.ucc-open:active { transform: translateY(1px) scale(0.99); }
.ucc-open:focus { outline: none; }
.ucc-open:focus-visible { box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px #2D43D2; }

@media (prefers-reduced-motion: reduce) {
  .ucc { animation: none; }
  .ucc-btn, .ucc-link, .ucc-switch, .ucc-switch__knob { transition-duration: 0ms; }
}

/* Дверь к настройкам в футере: ставится скриптом на каждой странице.
   Кольцо фокуса задано значением, а не переменной .ucc — ссылка живёт вне
   карточки баннера, где переменных нет. */
.ucc-footer-link {
  appearance: none; -webkit-appearance: none; background: none; border: 0; padding: 0;
  margin: 0; font: inherit; font-size: 13.5px; line-height: 1.4; color: inherit;
  opacity: 0.75; cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.ucc-footer-link:hover { opacity: 1; }
.ucc-footer-link:focus { outline: none; }
.ucc-footer-link:focus-visible { outline: none; border-radius: 6px; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #2d43d2; }
.ucc-footer-fallback { padding: 24px 20px; text-align: center; }
