#cookie-consent {
  position: fixed !important;
  z-index: 11000;
  inset: auto auto max(16px, env(safe-area-inset-bottom)) 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  width: min(760px, calc(100vw - 48px));
  margin: 0;
  padding: 20px 24px;
  transform: none;
  border: 1px solid var(--bs-line-dark, #606060);
  border-radius: 8px;
  background: var(--bs-ink, #171717);
  box-shadow: 0 16px 48px rgb(0 0 0 / 32%);
  color: var(--bs-paper, #f5f2ec);
  font: 400 14px/1.55 Inter, sans-serif;
}

#cookie-consent[hidden] {
  display: none !important;
}

.cookie-consent__copy {
  min-width: 0;
  padding-right: 18px;
}

.cookie-consent__copy p {
  margin: 0 0 6px;
  color: var(--bs-paper, #f5f2ec);
}

.cookie-consent__copy a {
  color: var(--bs-muted, #c9c7c1);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-consent__copy a:hover {
  color: var(--bs-white, #faf9f6);
}

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

.cookie-consent__actions button,
.cookie-preferences {
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid var(--bs-line, #707070);
  border-radius: 4px;
  background: transparent;
  color: var(--bs-paper, #f5f2ec);
  cursor: pointer;
  font: 500 13px/1.2 Inter, sans-serif;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.cookie-consent__actions button:hover {
  border-color: var(--bs-paper, #f5f2ec);
  background: var(--bs-raised, #262626);
}

.cookie-consent__actions [data-cookie-consent="accept"] {
  border-color: var(--bs-button-bg, #6e2f3e);
  background: var(--bs-button-bg, #6e2f3e);
  color: var(--bs-white, #faf9f6);
}

.cookie-consent__actions [data-cookie-consent="accept"]:hover {
  border-color: var(--bs-button-hover, #582632);
  background: var(--bs-button-hover, #582632);
}

.cookie-consent__close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--bs-muted, #c9c7c1);
  cursor: pointer;
  font: 400 21px/1 Inter, sans-serif;
}

.cookie-consent__close:hover {
  background: var(--bs-raised, #262626);
  color: var(--bs-white, #faf9f6);
}

.cookie-preferences {
  position: fixed;
  z-index: 10999;
  left: 16px;
  right: auto;
  bottom: max(16px, env(safe-area-inset-bottom));
  background: var(--bs-ink, #171717);
  box-shadow: 0 4px 16px rgb(0 0 0 / 22%);
}

.cookie-preferences:hover {
  border-color: var(--bs-paper, #f5f2ec);
  background: var(--bs-raised, #262626);
}

#cookie-consent :focus-visible,
.cookie-preferences:focus-visible {
  outline: 2px solid var(--bs-white, #faf9f6);
  outline-offset: 3px;
}

@media (max-width: 640px) {
  #cookie-consent {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    width: calc(100vw - 24px);
    left: 12px;
    padding: 18px 18px 16px;
    border-radius: 8px;
    font-size: 13px;
  }

  .cookie-consent__copy {
    padding-right: 22px;
  }

  .cookie-consent__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .cookie-consent__actions button {
    min-width: 0;
    padding-inline: 10px;
    font-size: 12px;
  }

  .cookie-preferences {
    left: 12px;
    right: auto;
    bottom: max(12px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 1200px) {
  #cookie-consent {
    bottom: max(16px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 520px) {
  #cookie-consent {
    bottom: max(12px, env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-consent__actions button,
  .cookie-preferences {
    transition: none;
  }
}
