.cookie-modal-open {
  overflow: hidden;
}

/* ── COOKIE BANNER ─────────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 999;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition:
    opacity .26s ease,
    transform .26s ease;
}

.cookie-banner.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.cookie-banner__content {
  max-width: 860px;
  margin: 0 auto;
  padding: 14px 16px 14px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.12);

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

[data-theme="dark"] .cookie-banner__content {
  background: rgba(10, 18, 33, 0.96);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.34);
}

.cookie-banner__message {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.cookie-banner__icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cookie-banner__icon .material-symbols-rounded {
  font-size: 22px;
}

.cookie-banner__text {
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.4;
  white-space: nowrap;
}

.cookie-banner__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-banner__link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  white-space: nowrap;
}

.cookie-banner__link:hover {
  color: var(--blue);
}

.cookie-banner__btn {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
}

/* ── COOKIE MODAL ──────────────────────────────────────────── */
.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;

  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.cookie-modal.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.cookie-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 12, 24, 0.48);
  backdrop-filter: blur(4px);
}

.cookie-modal__dialog {
  position: relative;
  width: min(860px, 100%);
  max-height: calc(100vh - 48px);
  margin: 0;
  border-radius: 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(14px) scale(.985);
  transition: transform .24s ease;
}

.cookie-modal.is-visible .cookie-modal__dialog {
  transform: translateY(0) scale(1);
}

.cookie-modal__header {
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cookie-modal__header h2 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.2;
  color: var(--text);
}

.cookie-modal__close {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border2);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    color .15s ease,
    background .15s ease,
    border-color .15s ease;
}

.cookie-modal__close:hover {
  color: var(--text);
  background: var(--surface2);
}

.cookie-modal__close .material-symbols-rounded {
  font-size: 20px;
}

.cookie-modal__body {
  padding: 22px 24px;
  overflow: auto;
}

.cookie-modal__intro {
  margin: 0 0 18px;
  color: var(--text2);
  font-size: 0.9rem;
  line-height: 1.75;
}

.cookie-pref {
  display: block;
  border-top: 1px solid var(--border);
  padding: 18px 0;
}

.cookie-pref:last-child {
  border-bottom: 1px solid var(--border);
}

.cookie-pref__main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}

.cookie-pref h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 0.95rem;
}

.cookie-pref p {
  margin: 0;
  color: var(--text2);
  font-size: 0.84rem;
  line-height: 1.65;
}

.cookie-pref__always {
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

/* ── Toggle ────────────────────────────────────────────────── */
.cookie-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cookie-switch {
  position: relative;
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: var(--border2);
  cursor: pointer;
  transition: background .18s ease;
}

.cookie-switch::before {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
  transition: transform .18s ease;
}

.cookie-toggle:checked + .cookie-switch {
  background: var(--blue);
}

.cookie-toggle:checked + .cookie-switch::before {
  transform: translateX(20px);
}

/* ── Modal footer ──────────────────────────────────────────── */
.cookie-modal__footer {
  padding: 18px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg2);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.cookie-modal__footer .btn {
  min-height: 44px;
  border-radius: 12px;
}

/* ── Mobile ────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .cookie-banner {
    left: 14px;
    right: 14px;
    bottom: 14px;
  }

  .cookie-banner__message{
    flex-direction: column;
    align-items: center;
  }

  .cookie-banner__content {
    max-width: none;
    border-radius: 24px;
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .cookie-banner__text {
    white-space: normal;
  }

  .cookie-banner__actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-banner__link {
    text-align: center;
    min-height: 36px;
  }

  .cookie-banner__btn {
    width: 100%;
  }

  .cookie-modal {
    padding: 10px;
  }

  .cookie-modal__dialog {
    width: 100%;
    max-height: calc(100vh - 20px);
  }

  .cookie-modal__header,
  .cookie-modal__body,
  .cookie-modal__footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .cookie-pref__main {
    grid-template-columns: 1fr;
  }

  .cookie-modal__footer {
    grid-template-columns: 1fr;
  }
}