.astra-legal-page {
  background: #fff;
}

.astra-legal-page__container {
  display: block;
  width: min(100%, 1040px);
  margin: 0 auto;
  padding-top: clamp(32px, 5vw, 72px);
  padding-bottom: clamp(48px, 7vw, 96px);
}

html:has(.astra-legal-page) header .ast-primary-header-bar {
  background-color: #000000;
}
.form-element-q .astra-legal-consent label,
.form-element-q:has(.astra-legal-consent) {
  display: flex;
  flex-direction: column;
}

.astra-legal-document {
  color: #1e2933;
  font-size: 16px;
  line-height: 1.72;
  overflow-wrap: anywhere;
}

.astra-legal-document h1 {
  margin: 0 0 28px;
  color: #111827;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.14;
  font-weight: 800;
}

.astra-legal-document h2 {
  margin: 34px 0 14px;
  color: #111827;
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.25;
  font-weight: 700;
}

.astra-legal-document p,
.astra-legal-document li {
  margin: 0 0 14px;
}

.astra-legal-document a {
  color: #0b63ce;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.astra-legal-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1200px;
  margin: 18px auto 0;
  padding: 14px 20px 0;
  font-size: 14px;
  line-height: 1.4;
  position: static;
}

.astra-legal-footer-links a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.astra-legal-consent {
  display: block;
  width: 100%;
  margin: 14px 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.45;
}

.astra-legal-consent label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  margin: 0;
  cursor: pointer;
}

.astra-legal-consent input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: #0b63ce;
}

.astra-legal-consent a {
  color: #0b63ce;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.astra-legal-consent__error {
  display: none;
  margin-top: 8px;
  color: #b42318;
  font-size: 13px;
  line-height: 1.4;
}

.astra-legal-consent.is-error .astra-legal-consent__error {
  display: block;
}

.astra-cookie-banner {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 99998;
  width: min(560px, calc(100vw - 32px));
  padding: 18px;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
  color: #1f2937;
  font-size: 14px;
  line-height: 1.5;
}

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

.astra-cookie-banner p {
  margin: 0;
}

.astra-cookie-banner a {
  color: #0b63ce;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.astra-cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.astra-cookie-banner__button {
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid #0b63ce;
  border-radius: 6px;
  background: #0b63ce;
  color: #fff;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.astra-cookie-banner__button--secondary {
  background: #fff;
  color: #0b63ce;
}

@media (max-width: 544px) {
  .astra-legal-page__container {
    padding-right: 18px;
    padding-left: 18px;
  }

  .astra-cookie-banner {
    right: 16px;
    bottom: 16px;
  }

  .astra-cookie-banner__button {
    width: 100%;
  }
}

/* Keep an existing consent checkbox visible even when a form plugin hides
 * the native input to draw its own custom control. */
html body form input[type="checkbox"][data-astra-legal-label="1"] {
  -webkit-appearance: checkbox !important;
  appearance: auto !important;
  position: static !important;
  inset: auto !important;
  display: inline-block !important;
  flex: 0 0 18px !important;
  width: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  margin: 2px 8px 0 0 !important;
  padding: 0 !important;
  opacity: 1 !important;
  visibility: visible !important;
  clip: auto !important;
  clip-path: none !important;
  transform: none !important;
  pointer-events: auto !important;
  accent-color: #0b63ce;
}

html body form input[type="checkbox"][data-astra-legal-label="1"] + label {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  margin: 0 !important;
}

html body form input[type="checkbox"][data-astra-legal-label="1"] + label .astra-legal-consent-text {
  display: inline !important;
  min-width: 0 !important;
}
