[hidden] {
  display: none !important;
}

#cookie-banner.cookie-banner {
  position: fixed;
  right: 20px;
  bottom: 20px;
  left: 20px;
  z-index: 10000;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--color-border, #d6dfed) 88%, transparent);
  border-radius: 18px;
  background: color-mix(in srgb, var(--color-surface, #fff) 97%, transparent);
  color: var(--color-text, #0f172a);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(14px);
}

.cookie-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 22px;
}

.cookie-banner__copy {
  min-width: 0;
  max-width: 720px;
}

.cookie-banner__copy h2,
.cookie-preferences h2,
.cookie-preferences h3 {
  margin: 0;
  color: var(--color-text, #0f172a);
}

.cookie-banner__copy h2 {
  margin-bottom: 4px;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.cookie-banner__copy p,
.cookie-preferences p {
  margin: 0;
  color: var(--color-muted, #5b667a);
  font-size: 14px;
  line-height: 1.5;
}

.cookie-banner__copy a,
.cookie-preferences a {
  color: var(--color-text, #0f172a);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.cookie-choice-button,
.cookie-configure-button {
  min-height: 42px;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.cookie-choice-button {
  min-width: 170px;
  padding: 0 17px;
  border: 1px solid color-mix(in srgb, var(--color-brand, #1d4ed8) 76%, var(--color-border, #d6dfed));
  background: var(--color-surface, #fff);
  color: var(--color-brand, #1d4ed8);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.cookie-choice-button--accept {
  border-color: var(--color-brand, #1d4ed8);
  background: var(--color-brand, #1d4ed8);
  color: #fff;
  box-shadow: 0 5px 14px color-mix(in srgb, var(--color-brand, #1d4ed8) 24%, transparent);
}

.cookie-choice-button:hover {
  border-color: var(--color-brand, #1d4ed8);
  background: color-mix(in srgb, var(--color-brand, #1d4ed8) 7%, var(--color-surface, #fff));
  transform: translateY(-1px);
}

.cookie-choice-button--accept:hover {
  background: color-mix(in srgb, var(--color-brand, #1d4ed8) 90%, #000 10%);
  color: #fff;
}

.cookie-choice-button:active,
.cookie-configure-button:active {
  transform: translateY(0);
}

.cookie-configure-button {
  padding: 0 13px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--color-text, #0f172a);
  text-decoration: none;
}

.cookie-configure-button:hover {
  border-color: color-mix(in srgb, var(--color-border, #d6dfed) 85%, transparent);
  background: var(--color-surface-alt, #edf2fb);
}

.cookie-choice-button:focus,
.cookie-configure-button:focus,
.cookie-preferences__close:focus {
  outline: none;
}

.cookie-choice-button:focus-visible,
.cookie-configure-button:focus-visible,
.cookie-preferences__close:focus-visible,
.cookie-toggle input:focus-visible + .cookie-toggle__track,
.footer-cookie-preferences:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-brand, #1d4ed8) 28%, transparent);
}

.cookie-preferences-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
}

.cookie-preferences {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 10002;
  width: min(92vw, 620px);
  max-height: min(88vh, 760px);
  overflow-y: auto;
  transform: translate(-50%, -50%);
  border: 1px solid color-mix(in srgb, var(--color-border, #d6dfed) 88%, transparent);
  border-radius: 20px;
  background: var(--color-surface, #fff);
  color: var(--color-text, #0f172a);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.3);
  padding: 0 24px 22px;
}

.cookie-preferences__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin: 0 -24px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid color-mix(in srgb, var(--color-border, #d6dfed) 78%, transparent);
}

.cookie-preferences__header h2 {
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.cookie-preferences__intro {
  margin-top: 5px !important;
}

.cookie-preferences__close {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--color-text, #0f172a);
  font-size: 27px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.cookie-preferences__close:hover {
  border-color: color-mix(in srgb, var(--color-border, #d6dfed) 82%, transparent);
  background: var(--color-surface-alt, #edf2fb);
}

.cookie-preferences__list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.cookie-preference-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 82px;
  padding: 15px 16px;
  border: 1px solid color-mix(in srgb, var(--color-border, #d6dfed) 82%, transparent);
  border-radius: 13px;
  background: color-mix(in srgb, var(--color-surface, #fff) 95%, var(--color-surface-alt, #edf2fb) 5%);
}

.cookie-preference-row h3 {
  margin-bottom: 4px;
  font-size: 16px;
  line-height: 1.3;
}

.cookie-toggle {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  width: 48px;
  height: 28px;
  cursor: pointer;
}

.cookie-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.cookie-toggle__track {
  position: relative;
  display: block;
  width: 48px;
  height: 28px;
  border: 1px solid #b9c5d5;
  border-radius: 999px;
  background: #dce3ec;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.cookie-toggle__track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.25);
  transition: transform 160ms ease;
}

.cookie-toggle input:checked + .cookie-toggle__track {
  border-color: var(--color-brand, #1d4ed8);
  background: var(--color-brand, #1d4ed8);
  box-shadow: none;
}

.cookie-toggle input:checked + .cookie-toggle__track::after {
  transform: translateX(20px);
}

.cookie-toggle:hover input:not(:disabled) + .cookie-toggle__track {
  border-color: var(--color-brand, #1d4ed8);
}

.cookie-toggle input:disabled + .cookie-toggle__track {
  cursor: not-allowed;
  opacity: 0.55;
}

.cookie-toggle--necessary {
  cursor: not-allowed;
}

.cookie-toggle--necessary input:checked + .cookie-toggle__track {
  border-color: color-mix(
    in srgb,
    var(--color-brand, #1d4ed8) 30%,
    var(--color-border, #d6dfed)
  );
  background: color-mix(
    in srgb,
    var(--color-brand, #1d4ed8) 28%,
    var(--color-surface, #fff)
  );
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.05);
}

.cookie-toggle--necessary input:checked + .cookie-toggle__track::after {
  background: color-mix(in srgb, #fff 94%, var(--color-brand, #1d4ed8) 6%);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.16);
}

.cookie-toggle--necessary input:disabled + .cookie-toggle__track {
  cursor: not-allowed;
  opacity: 1;
  filter: saturate(0.72);
}

.cookie-preferences__actions {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid color-mix(in srgb, var(--color-border, #d6dfed) 78%, transparent);
}

.cookie-preferences__actions .cookie-choice-button {
  flex: 1 1 0;
}

.cookie-preferences__legal {
  margin-top: 14px !important;
  text-align: center;
  font-size: 13px !important;
}

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

.footer-cookie-preferences {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--color-muted, #5b667a);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
}

.footer-cookie-preferences:hover {
  color: var(--color-brand-strong, #1e40af);
}

.content .cookie-preferences-link {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.limited-audience-control {
  margin: 16px 0;
  padding: 16px;
  border: 1px solid var(--color-border, #d6dfed);
  border-radius: 10px;
  background: var(--color-surface-alt, #edf2fb);
}

.limited-audience-control p {
  margin: 0 0 10px;
}

@media (max-width: 980px) {
  .cookie-banner__inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .cookie-banner__actions {
    width: 100%;
  }

  .cookie-banner__actions .cookie-choice-button {
    flex: 1 1 0;
  }
}

@media (max-width: 860px) {
  #cookie-banner.cookie-banner {
    right: 12px;
    bottom: 12px;
    left: 12px;
  }

  .cookie-banner__inner {
    padding: 18px;
  }

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

  .cookie-configure-button {
    grid-column: 1 / -1;
    justify-self: center;
  }

  .cookie-choice-button {
    min-width: 0;
  }
}

@media (max-width: 520px) {
  .cookie-banner__actions,
  .cookie-preferences__actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .cookie-configure-button {
    grid-column: auto;
  }

  .cookie-preferences {
    width: calc(100vw - 24px);
    padding-right: 16px;
    padding-left: 16px;
  }

  .cookie-preferences__header {
    margin-right: -16px;
    margin-left: -16px;
    padding-right: 16px;
    padding-left: 16px;
  }

  .cookie-preference-row {
    gap: 12px;
    padding: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #cookie-banner.cookie-banner,
  .cookie-preferences,
  .cookie-preferences-backdrop,
  .cookie-choice-button,
  .cookie-configure-button,
  .cookie-toggle__track,
  .cookie-toggle__track::after {
    scroll-behavior: auto;
    transition: none;
  }
}
