.cookie-consent,
.cookie-consent * {
  box-sizing: border-box;
}

.cookie-banner {
  position: fixed;
  z-index: 10000;
  right: max(32px, env(safe-area-inset-right));
  bottom: max(32px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 288px;
  max-width: calc(100vw - 32px);
  padding: 0;
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  color: #990026;
  box-shadow: 0 16px 64px rgb(255 102 178 / 50%);
  font-family: Inter, sans-serif;
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-dialog h2,
.cookie-dialog h3,
.cookie-banner p {
  margin: 0;
}

.cookie-banner-copy {
  padding: 16px 16px 12px;
  font-size: 18px;
  font-weight: 500;
  line-height: 24px;
  letter-spacing: -0.36px;
}

.cookie-dialog a,
.auth-legal-footer a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-banner-actions,
.cookie-dialog-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cookie-banner-actions {
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  padding: 0 16px 16px;
}

.cookie-button,
.cookie-dialog-close,
.cookie-settings-link {
  min-height: 44px;
  border: 1px solid #111;
  border-radius: 8px;
  font: 700 14px/1 Inter, sans-serif;
  cursor: pointer;
}

.cookie-button {
  padding: 0 16px;
  white-space: nowrap;
}

.cookie-banner .cookie-button {
  width: 100%;
  min-height: 40px;
  height: 40px;
  padding: 8px 16px;
  border: 0;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
  letter-spacing: -0.14px;
}

.cookie-button-primary {
  background: #111;
  color: #fff;
}

.cookie-banner .cookie-button-primary {
  background: #ff66b2;
}

.cookie-banner .cookie-button-primary:not(:disabled):hover {
  background: #990026;
}

.cookie-banner .cookie-button-primary:not(:disabled):active {
  background: #730026;
}

.cookie-button:disabled {
  border-color: #777;
  background: #eee;
  color: #555;
  cursor: not-allowed;
}

.cookie-banner .cookie-button:disabled {
  border: 1px dashed #bf978f;
  background: transparent;
  color: #bf978f;
}

.cookie-button-secondary {
  background: #fff;
  color: #111;
}

.cookie-button:focus-visible,
.cookie-dialog-close:focus-visible,
.cookie-settings-link:focus-visible,
.cookie-dialog a:focus-visible,
.cookie-banner a:focus-visible {
  outline: 3px solid #4c76ff;
  outline-offset: 2px;
}

.cookie-banner .cookie-button:focus-visible,
.cookie-banner a:focus-visible {
  outline-color: #990026;
}

.cookie-banner a {
  color: #ff401a;
  text-decoration: none;
  transition: color 0.15s ease;
}

.cookie-banner a:hover,
.cookie-banner a:focus-visible {
  color: #990026;
}

.cookie-banner a:active {
  color: #730026;
}

.cookie-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 1px solid #111;
  border-radius: 16px;
  background: #fff;
  color: #111;
  font: 500 14px/1.45 Inter, sans-serif;
}

.cookie-dialog::backdrop {
  background: rgb(0 0 0 / 48%);
}

.cookie-dialog-panel {
  padding: 24px;
}

.cookie-dialog-heading,
.cookie-category {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
}

.cookie-dialog-heading p,
.cookie-category p,
.cookie-category small {
  display: block;
  margin: 6px 0 0;
  color: #555;
}

.cookie-dialog-close {
  flex: 0 0 44px;
  padding: 0;
  background: #fff;
  color: #111;
  font-size: 26px;
}

.cookie-category {
  margin-top: 20px;
  padding: 16px 0;
  border-top: 1px solid #ddd;
}

.cookie-always-on {
  font-weight: 700;
  white-space: nowrap;
}

.cookie-category-toggle {
  cursor: pointer;
}

.cookie-category-toggle input {
  width: 24px;
  height: 24px;
  accent-color: #111;
}

.cookie-gpc-message {
  margin: 0 0 16px;
  color: #555;
}

.cookie-dialog-actions {
  justify-content: space-between;
  margin-top: 8px;
}

.cookie-settings-link {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: #bfada1;
  font: inherit;
  text-align: left;
  text-decoration: none;
  transition: color 0.15s ease;
}

.cookie-settings-link:hover,
.cookie-settings-link:focus-visible {
  color: #990026;
}

.cookie-settings-link:active {
  color: #730026;
}

.auth-legal-footer {
  position: fixed;
  right: 16px;
  bottom: max(12px, env(safe-area-inset-bottom));
  left: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  font: 500 12px/1.4 Inter, sans-serif;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 760px) {
  .cookie-banner {
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    left: auto;
    display: flex;
    max-height: calc(100vh - 32px);
    overflow: auto;
  }

  .cookie-banner-actions {
    display: flex;
  }

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

@media (prefers-reduced-motion: reduce) {
  .cookie-consent * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
