.hd-consent-open {
  overflow: hidden;
}

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

.hd-consent {
  --hd-consent-teal: #0f858d;
  --hd-consent-teal-dark: #0b747b;
  --hd-consent-ink: #16242a;
  --hd-consent-muted: #53676d;
  --hd-consent-border: #e4eaec;
  --hd-consent-soft: #eaf7f6;
  --hd-consent-white: #fff;
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  font-family: var(--wp--preset--font-family--sans, system-ui, sans-serif);
}

.hd-consent__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(22, 36, 42, 0.54);
  backdrop-filter: blur(8px);
}

.hd-consent__dialog {
  position: relative;
  width: min(400px, 100%);
  max-height: min(720px, calc(100vh - 48px));
  overflow: auto;
  padding: 22px 24px 18px;
  border: 1px solid rgba(228, 234, 236, 0.86);
  border-radius: 18px;
  background: var(--hd-consent-white);
  color: var(--hd-consent-ink);
  box-shadow: 0 30px 80px rgba(10, 34, 39, 0.32);
}

.hd-consent__dialog:has([data-hd-consent-panel="settings"]:not([hidden])) {
  width: min(460px, 100%);
  padding: 30px 30px 24px;
}

.hd-consent__dialog:focus {
  outline: none;
}

.hd-consent__title {
  margin: 0;
  color: var(--hd-consent-ink);
  font-family: var(--wp--preset--font-family--serif, Georgia, serif);
  font-size: clamp(1.55rem, 2.3vw, 1.95rem);
  font-weight: 500;
  line-height: 1.08;
  text-align: center;
}

.hd-consent__icon-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}

.hd-consent__leaves {
  width: min(12vw, 46px);
  height: auto;
  flex: 0 1 46px;
}

.hd-consent__shield {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
}

.hd-consent__title-mark {
  display: block;
  width: 36px;
  height: 2px;
  margin: 14px auto;
  background: var(--hd-consent-teal);
}

.hd-consent__copy {
  max-width: 320px;
  margin: 0 auto 18px;
  padding: 0;
  border: 0;
  color: var(--hd-consent-muted);
  font-size: 0.86rem;
  line-height: 1.52;
  text-align: center;
}

.hd-consent__actions {
  display: grid;
  gap: 8px;
  margin-top: 0;
}

.hd-consent__button,
.hd-consent__text-button,
.hd-consent__text-link {
  min-height: 40px;
  border: 0;
  border-radius: 9px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
}

.hd-consent__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 38px;
  padding: 9px 16px;
  background: var(--hd-consent-white);
  color: var(--hd-consent-ink);
  cursor: pointer;
}

.hd-consent__button--primary {
  min-height: 38px;
  background: linear-gradient(180deg, var(--hd-consent-teal), var(--hd-consent-teal-dark));
  color: var(--hd-consent-white);
  box-shadow: 0 12px 22px rgba(15, 133, 141, 0.25);
}

.hd-consent__button--primary img {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.hd-consent__button--secondary {
  border: 1px solid var(--hd-consent-border);
  background: var(--hd-consent-white);
}

.hd-consent__text-button,
.hd-consent__text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  background: transparent;
  color: var(--hd-consent-muted);
  text-decoration: none;
  cursor: pointer;
}

.hd-consent__link-rows {
  display: grid;
  gap: 2px;
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px solid var(--hd-consent-border);
}

.hd-consent__link-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 12px;
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--hd-consent-muted);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.hd-consent__link-row::after {
  content: "›";
  justify-self: end;
  color: var(--hd-consent-ink);
  font-size: 1.35rem;
  line-height: 1;
}

.hd-consent__link-row img {
  width: 18px;
  height: 18px;
  justify-self: center;
}

.hd-consent__button:hover,
.hd-consent__button:focus-visible,
.hd-consent__text-button:hover,
.hd-consent__text-button:focus-visible,
.hd-consent__text-link:hover,
.hd-consent__text-link:focus-visible,
.hd-consent__link-row:hover,
.hd-consent__link-row:focus-visible,
.hd-consent__close-button:hover,
.hd-consent__close-button:focus-visible,
.hd-cookie-settings-button:hover,
.hd-cookie-settings-button:focus-visible,
.hd-consent-embed__button:hover,
.hd-consent-embed__button:focus-visible {
  outline: var(--hd-focus-outline, 2px solid var(--hd-consent-teal));
  outline-offset: 3px;
}

.hd-consent__settings-header {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 14px;
}

.hd-consent__settings-icon {
  width: 56px;
  height: 56px;
}

.hd-consent__settings-title {
  text-align: left;
}

.hd-consent__close-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 4px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.hd-consent__close-button img {
  width: 24px;
  height: 24px;
}

.hd-consent__settings-intro {
  margin: 14px 0 20px;
  color: var(--hd-consent-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.hd-consent__groups {
  display: grid;
  gap: 12px;
  margin-top: 0;
  padding-top: 18px;
  border-top: 1px solid var(--hd-consent-border);
}

.hd-consent__group {
  padding: 16px 14px;
  border: 1px solid var(--hd-consent-border);
  border-radius: 12px;
  background: #fafcfc;
  box-shadow: 0 10px 28px rgba(10, 34, 39, 0.04);
}

.hd-consent__preference-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.hd-consent__preference-icon {
  width: 44px;
  height: 44px;
}

.hd-consent__group h3,
.hd-consent__group p,
.hd-consent__group strong,
.hd-consent__group small {
  margin: 0;
}

.hd-consent__group h3,
.hd-consent__group strong {
  color: var(--hd-consent-ink);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
}

.hd-consent__group p,
.hd-consent__group small {
  color: var(--hd-consent-muted);
  font-size: 0.86rem;
  line-height: 1.48;
}

.hd-consent__group p {
  margin-top: 6px;
}

.hd-consent__preference-text {
  display: grid;
  gap: 6px;
}

.hd-consent__status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #ddf6ea;
  color: #147a50;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

.hd-consent__toggle-row {
  cursor: pointer;
}

.hd-consent__toggle-row input {
  width: 50px;
  height: 28px;
  flex: 0 0 auto;
  appearance: none;
  border: 2px solid #c7cdd1;
  border-radius: 999px;
  background: #d4d8dc;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.hd-consent__toggle-row input::before {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  margin: 2px;
  border-radius: 50%;
  background: var(--hd-consent-white);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: transform 160ms ease, background-color 160ms ease;
}

.hd-consent__toggle-row input:checked {
  border-color: var(--hd-consent-teal);
  background: var(--hd-consent-teal);
}

.hd-consent__toggle-row input:checked::before {
  transform: translateX(22px);
  background: var(--hd-consent-white);
}

.hd-cookie-settings-button {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: var(--wp--preset--font-size--xs, 0.85rem);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.hd-consent-embed {
  display: grid;
  min-height: 360px;
  overflow: hidden;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(239, 245, 244, 0.96), rgba(255, 255, 255, 0.92)),
    var(--hd-contact-hero-image, none);
  background-position: center;
  background-size: cover;
}

.hd-contact-map__frame .hd-consent-embed {
  height: 100%;
  min-height: 100%;
  border-radius: 0;
}

.hd-consent-embed iframe {
  width: 100%;
  height: 100%;
  min-height: inherit;
  border: 0;
}

.hd-consent-embed__placeholder {
  display: grid;
  place-items: center;
  padding: clamp(24px, 5vw, 56px);
  text-align: center;
}

.hd-consent-embed__content {
  max-width: 34rem;
}

.hd-consent-embed__content h3 {
  margin: 0;
  color: var(--wp--preset--color--ink, #20272c);
  font-family: var(--wp--preset--font-family--serif, Georgia, serif);
  font-size: clamp(1.5rem, 3vw, 2.35rem);
  font-weight: 500;
  line-height: 1.08;
}

.hd-consent-embed__content p {
  margin: 14px 0 0;
  color: var(--wp--preset--color--ink-soft, #667174);
  font-size: 1rem;
  line-height: 1.6;
}

.hd-consent-embed__button {
  min-height: 48px;
  margin-top: 22px;
  padding: 0 20px;
  border: 0;
  border-radius: 8px;
  background: var(--wp--preset--color--accent, #48bfc0);
  color: var(--wp--preset--color--white, #fff);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.hd-legal-page {
  padding-block: 0 clamp(48px, 8vw, 96px);
}

.hd-legal-page h1,
.hd-legal-page h2,
.hd-legal-page h3 {
  color: var(--wp--preset--color--ink, #20272c);
}

.hd-legal-page h1 {
  font-size: clamp(2.5rem, 5vw, 4.6rem);
}

.hd-legal-page h2 {
  margin-top: 2.3em;
}

.hd-legal-page p,
.hd-legal-page li {
  color: var(--wp--preset--color--ink-soft, #667174);
  line-height: 1.72;
}

@media (max-width: 700px) {
  .hd-consent {
    align-items: end;
    padding: 12px;
  }

  .hd-consent__dialog {
    max-height: calc(100vh - 24px);
    padding: 20px 18px 18px;
  }

  .hd-consent__dialog:has([data-hd-consent-panel="settings"]:not([hidden])) {
    padding: 24px 20px 22px;
  }

  .hd-consent__icon-row {
    gap: 8px;
    margin-bottom: 10px;
  }

  .hd-consent__leaves {
    width: 42px;
  }

  .hd-consent__shield {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }

  .hd-consent__title {
    font-size: 1rem;
  }

  .hd-consent__title-mark {
    margin-block: 12px;
  }

  .hd-consent__copy {
    margin-bottom: 14px;
    font-size: 0.84rem;
  }

  [data-hd-consent-panel="summary"] .hd-consent__button {
    flex: 1 1 150px;
  }

  .hd-consent__settings-header {
    grid-template-columns: 48px minmax(0, 1fr) 30px;
    gap: 12px;
  }

  .hd-consent__settings-icon {
    width: 48px;
    height: 48px;
  }

  .hd-consent__preference-card {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
  }

  .hd-consent__preference-icon {
    width: 44px;
    height: 44px;
  }

  .hd-consent__status-pill,
  .hd-consent__toggle-row input {
    grid-column: 2;
    justify-self: start;
    margin-top: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hd-consent__toggle-row input,
  .hd-consent__toggle-row input::before {
    transition: none;
  }
}
