.dv-consent,
.dv-consent-panel {
  box-sizing: border-box;
  font-family: var(--dv-font-sans, "Instrument Sans", system-ui, sans-serif);
  color: var(--dv-color-text, #111425);
}

.dv-consent[hidden] {
  display: none;
}

.dv-consent {
  position: fixed;
  z-index: 80;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  width: min(27rem, calc(100vw - 2rem));
  padding: 1.25rem;
  background: var(--dv-color-surface, #fff);
  background: color-mix(in srgb, var(--dv-color-surface, #fff) 94%, transparent);
  border: 1px solid color-mix(in srgb, var(--dv-color-border, #d7dce8) 82%, transparent);
  border-radius: var(--dv-radius-md, 1rem);
  box-shadow: var(--dv-shadow-md, 0 16px 50px rgb(17 20 37 / 12%));
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  backdrop-filter: blur(18px) saturate(135%);
}

.dv-consent h2,
.dv-consent-panel h2 {
  margin: 0;
  color: var(--dv-color-text, #111425);
  font-size: 1.125rem;
  line-height: 1.2;
}

.dv-consent p,
.dv-consent-panel > form > p {
  margin: 0.625rem 0 0;
  color: var(--dv-color-text-secondary, #4e566d);
  font-size: 0.875rem;
  line-height: 1.5;
}

.dv-consent__actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.625rem;
  margin-top: 1rem;
}

.dv-consent__primary,
.dv-consent__secondary,
.dv-consent__text,
.dv-consent-panel__close {
  min-height: 2.75rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.dv-consent__primary,
.dv-consent__secondary {
  padding: 0.65rem 1rem;
  border-radius: var(--dv-radius-pill, 999px);
}

.dv-consent__primary {
  color: var(--dv-color-on-brand, #fff);
  background: var(--dv-color-brand, #6536e8);
  border: 1px solid var(--dv-color-brand, #6536e8);
}

.dv-consent__secondary {
  color: var(--dv-color-text, #111425);
  background: var(--dv-color-surface, #fff);
  border: 1px solid var(--dv-color-border-strong, #aeb6ca);
}

.dv-consent__text,
.dv-consent__policy {
  align-self: center;
  color: var(--dv-color-brand-strong, #5425d2);
  font-size: 0.8125rem;
}

.dv-consent__text {
  justify-self: start;
  min-height: 2.75rem;
  padding: 0;
  background: none;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.dv-consent__policy {
  justify-self: end;
}

.dv-consent-panel {
  width: min(35rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  background: var(--dv-color-surface, #fff);
  border: 1px solid var(--dv-color-border, #d7dce8);
  border-radius: var(--dv-radius-md, 1rem);
  box-shadow: var(--dv-shadow-md, 0 16px 50px rgb(17 20 37 / 12%));
}

.dv-consent-panel::backdrop {
  background: rgb(9 11 20 / 58%);
}

.dv-consent-panel form {
  padding: 1.25rem;
}

.dv-consent-panel__heading {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
}

.dv-consent-panel__heading span {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--dv-color-brand-strong, #5425d2);
  font-size: 0.75rem;
  font-weight: 750;
}

.dv-consent-panel__close {
  width: 2.75rem;
  padding: 0;
  color: var(--dv-color-text, #111425);
  background: var(--dv-color-surface-muted, #eef1f8);
  border: 1px solid var(--dv-color-border, #d7dce8);
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
}

.dv-consent-option,
.dv-consent-choice {
  margin: 1rem 0 0;
  padding: 1rem;
  background: var(--dv-color-surface-muted, #eef1f8);
  border: 1px solid var(--dv-color-border, #d7dce8);
  border-radius: var(--dv-radius-sm, 0.625rem);
}

.dv-consent-option {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.dv-consent-option strong,
.dv-consent-option span,
.dv-consent-choice strong,
.dv-consent-choice small {
  display: block;
}

.dv-consent-option span,
.dv-consent-choice small {
  color: var(--dv-color-text-secondary, #4e566d);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.dv-consent-option__status {
  color: var(--dv-color-positive, #167a52) !important;
  font-weight: 700;
  white-space: nowrap;
}

.dv-consent-choice legend {
  padding: 0 0.25rem;
  font-weight: 750;
}

.dv-consent-choice label {
  display: flex;
  min-height: 3.25rem;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.75rem;
  cursor: pointer;
}

.dv-consent-choice label + label {
  border-top: 1px solid var(--dv-color-border, #d7dce8);
}

.dv-consent-choice input {
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.15rem;
  accent-color: var(--dv-color-brand, #6536e8);
}

.dv-consent-panel__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}

.dv-consent :focus-visible,
.dv-consent-panel :focus-visible,
.dv-privacy-settings-link:focus-visible {
  outline: 3px solid var(--dv-color-focus, #255edb);
  outline-offset: 3px;
}

.dv-privacy-settings-link {
  min-height: 2.75rem;
  padding: 0;
  color: #d5dbed;
  background: transparent;
  border: 0;
  font: inherit;
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

@media (max-width: 35rem) {
  .dv-consent {
    right: max(0.75rem, env(safe-area-inset-right));
    bottom: max(0.75rem, env(safe-area-inset-bottom));
    width: calc(100vw - 1.5rem);
  }

  .dv-consent__actions {
    grid-template-columns: 1fr 1fr;
  }

  .dv-consent__primary,
  .dv-consent__secondary {
    width: 100%;
  }

  .dv-consent-option {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dv-consent *,
  .dv-consent-panel * {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .dv-consent {
    background: var(--dv-color-surface, #fff);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
