.privacy-consent-banner {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 18px 20px;
  color: #2d2633;
  background: #fffdfb;
  border: 1px solid #d9cfdc;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgb(50 35 55 / 20%);
}

.privacy-consent-copy h2,
.privacy-settings-panel h2 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.privacy-consent-copy p,
.privacy-settings-panel > p,
.privacy-settings-option p,
.privacy-settings-option span span {
  margin: 0;
  color: #5f5264;
  font-size: 0.9rem;
  line-height: 1.5;
}

.privacy-consent-actions,
.privacy-settings-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.privacy-consent-actions .button,
.privacy-settings-actions .button {
  min-height: 40px;
  white-space: nowrap;
}

.privacy-settings-dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  color: #2d2633;
  background: #fffdfb;
  border: 1px solid #d9cfdc;
  border-radius: 16px;
  box-shadow: 0 18px 60px rgb(30 20 35 / 28%);
}

.privacy-settings-dialog::backdrop {
  background: rgb(30 20 35 / 48%);
}

.privacy-settings-panel {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.privacy-settings-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.privacy-settings-close {
  width: 36px;
  height: 36px;
  padding: 0;
  color: #5f5264;
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.privacy-settings-close:hover,
.privacy-settings-close:focus-visible {
  color: #2d2633;
  background: #f1eaf2;
}

.privacy-settings-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #e5dce7;
  border-radius: 12px;
}

.privacy-settings-option > span,
.privacy-settings-option > div {
  display: grid;
  gap: 4px;
}

.privacy-settings-option input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.privacy-settings-option--essential {
  background: #f7f3f8;
}

.privacy-settings-policy {
  width: fit-content;
  font-size: 0.9rem;
}

.privacy-settings-floating {
  position: fixed;
  right: 12px;
  /* Standalone tools already use the bottom-right corner for back-to-top. */
  bottom: 68px;
  z-index: 9998;
  padding: 8px 12px;
  color: #4d4052;
  background: #fffdfb;
  border: 1px solid #d9cfdc;
  border-radius: 999px;
  box-shadow: 0 4px 16px rgb(50 35 55 / 15%);
  cursor: pointer;
}

.site-footer .privacy-settings-link {
  appearance: none;
  padding: 0;
  font: inherit;
  line-height: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

@media (max-width: 760px) {
  .privacy-consent-banner {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    max-height: calc(100vh - 24px);
    overflow: auto;
  }

  .privacy-consent-actions,
  .privacy-settings-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .privacy-consent-actions .button,
  .privacy-settings-actions .button {
    width: 100%;
  }
}
