.site-cookie-consent {
  --site-cookie-consent-z-banner: 120;
  --site-cookie-consent-z-floating: 115;
  --site-cookie-consent-z-overlay: 135;
  --site-cookie-consent-z-dialog: 140;
  position: relative;
  z-index: var(--site-cookie-consent-z-banner);
}

.site-cookie-consent[data-state="visible"] .site-cookie-consent__banner {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.site-cookie-consent__banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--site-cookie-consent-z-banner);
  padding: 12px;
  transform: translateY(110%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.35s var(--e, cubic-bezier(0.22, 0.8, 0.2, 1)), opacity 0.25s ease, visibility 0s linear 0.35s;
}

.site-cookie-consent__banner-inner {
  max-width: var(--max, 1280px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px 20px;
  align-items: center;
  padding: 18px 20px;
  border-radius: var(--r, 14px);
  border: var(--b, 1px solid #e7eaf0);
  background: color-mix(in srgb, var(--surface, #fff) 96%, transparent);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
  backdrop-filter: saturate(1.1) blur(8px);
}

.site-cookie-consent__title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 700;
  color: var(--text, #0f172a);
}

.site-cookie-consent__description {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--muted, #475569);
}

.site-cookie-consent__privacy-link {
  display: inline-block;
  margin-left: 4px;
  color: var(--brand, #2563eb);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-cookie-consent__privacy-link:hover,
.site-cookie-consent__privacy-link:focus-visible {
  color: color-mix(in srgb, var(--brand, #2563eb) 82%, #000);
}

.site-cookie-consent__actions,
.site-cookie-consent__dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.site-cookie-consent__btn {
  appearance: none;
  border: var(--b, 1px solid #e7eaf0);
  border-radius: 10px;
  padding: 10px 14px;
  min-height: 44px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.site-cookie-consent__btn:focus-visible {
  outline: 2px solid var(--brand, #2563eb);
  outline-offset: 2px;
}

.site-cookie-consent__btn--primary,
.site-cookie-consent__btn--secondary,
.site-cookie-consent__btn--ghost {
  background: var(--surface, #fff);
  color: var(--text, #0f172a);
}

.site-cookie-consent__btn--primary {
  border-color: color-mix(in srgb, var(--brand, #2563eb) 55%, transparent);
  background: color-mix(in srgb, var(--brand, #2563eb) 14%, var(--surface, #fff));
}

.site-cookie-consent__btn--secondary {
  border-color: color-mix(in srgb, var(--text, #0f172a) 18%, transparent);
  background: color-mix(in srgb, var(--text, #0f172a) 4%, var(--surface, #fff));
}

.site-cookie-consent__btn--ghost {
  background: transparent;
}

.site-cookie-consent__btn:hover {
  transform: translateY(-1px);
}

.site-cookie-consent__overlay {
  position: fixed;
  inset: 0;
  z-index: var(--site-cookie-consent-z-overlay);
  background: color-mix(in srgb, var(--bg, #f7f8fb) 70%, rgba(0, 0, 0, 0.45));
  backdrop-filter: blur(3px);
}

.site-cookie-consent__overlay[hidden],
.site-cookie-consent__dialog[hidden] {
  display: none !important;
}

.site-cookie-consent__dialog {
  position: fixed;
  inset: 0;
  z-index: var(--site-cookie-consent-z-dialog);
  display: grid;
  place-items: center;
  padding: 16px;
}

.site-cookie-consent__dialog-panel {
  width: min(640px, 100%);
  max-height: min(88vh, 760px);
  overflow: auto;
  padding: 20px;
  border-radius: calc(var(--r, 14px) + 2px);
  border: var(--b, 1px solid #e7eaf0);
  background: var(--surface, #fff);
  box-shadow: 0 24px 56px rgba(15, 23, 42, 0.22);
}

.site-cookie-consent__dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.site-cookie-consent__dialog-title {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.35;
  color: var(--text, #0f172a);
}

.site-cookie-consent__dialog-close {
  appearance: none;
  border: var(--b, 1px solid #e7eaf0);
  background: var(--surface, #fff);
  color: var(--text, #0f172a);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}

.site-cookie-consent__dialog-description {
  margin: 0 0 16px;
  color: var(--muted, #475569);
  font-size: 0.92rem;
  line-height: 1.55;
}

.site-cookie-consent__categories {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.site-cookie-consent__category {
  padding: 14px;
  border: var(--b, 1px solid #e7eaf0);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg, #f7f8fb) 35%, var(--surface, #fff));
}

.site-cookie-consent__category-head {
  margin-bottom: 6px;
}

.site-cookie-consent__switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.site-cookie-consent__switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.site-cookie-consent__switch-ui {
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted, #475569) 28%, #fff);
  transition: background 0.2s ease;
  flex: 0 0 auto;
}

.site-cookie-consent__switch-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
  transition: transform 0.2s ease;
}

.site-cookie-consent__switch input:checked + .site-cookie-consent__switch-ui {
  background: color-mix(in srgb, var(--brand, #2563eb) 72%, #fff);
}

.site-cookie-consent__switch input:checked + .site-cookie-consent__switch-ui::after {
  transform: translateX(18px);
}

.site-cookie-consent__switch input:disabled + .site-cookie-consent__switch-ui {
  opacity: 0.72;
}

.site-cookie-consent__switch input:focus-visible + .site-cookie-consent__switch-ui {
  outline: 2px solid var(--brand, #2563eb);
  outline-offset: 2px;
}

.site-cookie-consent__category-title {
  font-weight: 600;
  color: var(--text, #0f172a);
  font-size: 0.95rem;
}

.site-cookie-consent__category-description {
  margin: 0;
  color: var(--muted, #475569);
  font-size: 0.86rem;
  line-height: 1.5;
}

.site-cookie-consent__floating {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: var(--site-cookie-consent-z-floating);
  appearance: none;
  border: var(--b, 1px solid #e7eaf0);
  border-radius: 999px;
  padding: 10px 14px;
  min-height: 40px;
  background: color-mix(in srgb, var(--surface, #fff) 94%, transparent);
  color: var(--muted, #475569);
  font: inherit;
  font-size: 0.82rem;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.site-cookie-consent__floating:focus-visible {
  outline: 2px solid var(--brand, #2563eb);
  outline-offset: 2px;
}

.site-cookie-consent__floating[hidden] {
  display: none !important;
}

@media (max-width: 860px) {
  .site-cookie-consent__banner-inner {
    grid-template-columns: 1fr;
  }

  .site-cookie-consent__actions,
  .site-cookie-consent__dialog-actions {
    justify-content: stretch;
  }

  .site-cookie-consent__btn {
    flex: 1 1 calc(50% - 5px);
    min-width: 0;
  }

  .site-cookie-consent__actions .site-cookie-consent__btn--ghost {
    flex-basis: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-cookie-consent__banner,
  .site-cookie-consent__btn,
  .site-cookie-consent__switch-ui,
  .site-cookie-consent__switch-ui::after {
    transition: none !important;
  }
}
