.dmdg-enquiry-form {
  position: relative;
}

.dmdg-enquiry-form .dmdg-form-trap {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.dmdg-form-required,
.dmdg-enquiry-form .field-help {
  color: #55554f;
  font-size: 0.9rem;
}

.dmdg-contact-method-help {
  margin: 0 0 0.2rem;
  color: inherit;
  font-size: 0.88rem;
  line-height: 1.5;
}

.dmdg-message-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-top: 0.35rem;
}

.dmdg-message-meta small {
  flex: 1 1 auto;
}

.dmdg-character-counter {
  flex: 0 0 auto;
  color: #6b632f;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
}

.dmdg-character-counter[data-limit-reached="true"] {
  color: #8a5a00;
}

@media (max-width: 520px) {
  .dmdg-message-meta {
    align-items: flex-end;
    flex-direction: column;
  }
}

.dmdg-form-message {
  scroll-margin-block: 2rem;
  margin-bottom: 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid currentColor;
  border-radius: 12px;
}

.dmdg-enquiry-form .dmdg-form-message--success {
  border-color: #4c765c;
  background: #edf6ef;
  color: #264d35;
}

.dmdg-enquiry-form .dmdg-form-message--success :is(strong, p) {
  color: #264d35;
}

body:not(.home-page) .prototype-form.dmdg-enquiry-form .dmdg-form-message--success :is(strong, p) {
  color: #264d35;
}

.dmdg-enquiry-form .dmdg-form-message--error,
.dmdg-enquiry-form .dmdg-form-message--error :is(strong, p),
.dmdg-field-error {
  color: #6f1d1d;
}

.dmdg-enquiry-form .dmdg-form-message--error {
  border-color: #a83b3b;
  background: #fff1f0;
}

body:not(.home-page) .prototype-form.dmdg-enquiry-form .dmdg-form-message--error :is(strong, p) {
  color: #6f1d1d;
}

.dmdg-form-message p {
  margin: 0.4rem 0 0;
}

.dmdg-form-privacy-note {
  margin: 1.25rem 0;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(229, 208, 99, 0.22);
  color: inherit;
  font-size: 0.88rem;
  line-height: 1.55;
}

.dmdg-enquiry-form fieldset:last-of-type {
  padding-bottom: 0;
  border-bottom: 0;
}

.dmdg-form-privacy-note a {
  color: inherit;
  font-weight: 700;
  text-underline-offset: 0.18em;
}

.dmdg-enquiry-form button[type="submit"]:disabled {
  cursor: wait;
  opacity: 0.72;
}

.dmdg-field-error {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.88rem;
  font-weight: 700;
}

.dmdg-enquiry-form :is(input, select, textarea)[aria-invalid="true"] {
  border-color: #a83b3b;
  box-shadow: 0 0 0 2px rgba(168, 59, 59, 0.16);
}

.dmdg-enquiry-form :is(input, select, textarea, button):focus-visible,
.dmdg-form-message:focus-visible {
  outline: 3px solid #6b632f;
  outline-offset: 3px;
}

/* App privacy is a separate product surface. These rules only opt in when
   its canonical content carries dmdg-app-privacy; the practice site keeps
   its own theme and all existing form styles. */
body.dmdg-site:not(.dmdg-home-compact-page):has(.dmdg-app-privacy) {
  --dmdg-paper: #0b0e0f;
  --dmdg-surface: #141719;
  --dmdg-soft: #141719;
  --dmdg-ink: #f3f3f3;
  --dmdg-muted: #b4b7ba;
  --dmdg-line-strong: #303438;
  --dmdg-label: #b4b7ba;
  color-scheme: dark;
  background: #0b0e0f !important;
  color: #f3f3f3;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.dmdg-site:not(.dmdg-home-compact-page):has(.dmdg-app-privacy) .wp-site-blocks > :is(header, footer),
body.dmdg-site:not(.dmdg-home-compact-page):has(.dmdg-app-privacy) :is(.dmdg-site-header, .dmdg-site-footer) {
  display: none;
}

body.dmdg-site:not(.dmdg-home-compact-page):has(.dmdg-app-privacy) :is(main, .wp-site-blocks, .dmdg-app-hero, .dmdg-app-language-bar, .dmdg-app-language-shell) {
  background: #0b0e0f !important;
  background-image: none;
  color: #f3f3f3;
}

body.dmdg-site:not(.dmdg-home-compact-page):has(.dmdg-app-privacy) .shell {
  width: min(760px, calc(100% - 40px));
  max-width: none;
  margin-inline: auto;
}

body.dmdg-site:not(.dmdg-home-compact-page):has(.dmdg-app-privacy) .dmdg-app-hero {
  padding: 36px 0 24px;
  min-height: 0;
  border: 0;
}

body.dmdg-site:not(.dmdg-home-compact-page):has(.dmdg-app-privacy) .subpage-hero__inner {
  display: block;
  min-height: 0;
  padding: 0;
}

body.dmdg-site:not(.dmdg-home-compact-page):has(.dmdg-app-privacy) :is(.subpage-hero__inner, .dmdg-app-hero)::after,
body.dmdg-site:not(.dmdg-home-compact-page):has(.dmdg-app-privacy) :is(.subpage-hero__inner, .dmdg-app-hero)::before,
body.dmdg-site:not(.dmdg-home-compact-page):has(.dmdg-app-privacy) .eyebrow span {
  display: none;
}

body.dmdg-site:not(.dmdg-home-compact-page):has(.dmdg-app-privacy) :is(h1, h2, h3, p, li, strong) {
  color: #f3f3f3;
  font-family: inherit;
}

body.dmdg-site:not(.dmdg-home-compact-page):has(.dmdg-app-privacy) h1 {
  margin: 8px 0 0;
  font-size: clamp(2rem, 6vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

body.dmdg-site:not(.dmdg-home-compact-page):has(.dmdg-app-privacy) .eyebrow {
  margin: 0;
  color: #b4b7ba;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

body.dmdg-site:not(.dmdg-home-compact-page):has(.dmdg-app-privacy) .dmdg-app-language-bar {
  padding: 0 0 24px;
  border-bottom: 1px solid #303438;
}

body.dmdg-site:not(.dmdg-home-compact-page):has(.dmdg-app-privacy) .dmdg-app-language-nav a[data-dmdg-app-language] {
  background: #141719;
  color: #f3f3f3;
  border: 1px solid #303438;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 600;
}

body.dmdg-site:not(.dmdg-home-compact-page):has(.dmdg-app-privacy) .dmdg-app-language-nav a[data-dmdg-app-language]:is([aria-current="true"], :hover) {
  background: #241616;
  color: #f3f3f3;
  border-color: #ff342b;
}

body.dmdg-site:not(.dmdg-home-compact-page):has(.dmdg-app-privacy) a:focus-visible,
body.dmdg-site:not(.dmdg-home-compact-page):has(.dmdg-app-privacy) [data-dmdg-app-language-heading]:focus-visible {
  outline: 2px solid #ff342b;
  outline-offset: 4px;
}

body.dmdg-site:not(.dmdg-home-compact-page):has(.dmdg-app-privacy) .dmdg-app-language-shell {
  padding: 0;
  border: 0;
}

body.dmdg-site:not(.dmdg-home-compact-page):has(.dmdg-app-privacy) .dmdg-app-content {
  padding: 28px 0 48px;
  font-size: 1rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

body.dmdg-site:not(.dmdg-home-compact-page):has(.dmdg-app-privacy) .dmdg-app-content > .eyebrow {
  margin-bottom: 10px;
}

body.dmdg-site:not(.dmdg-home-compact-page):has(.dmdg-app-privacy) .dmdg-app-content :is(h2, h3) {
  color: #f3f3f3;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.015em;
  text-wrap: pretty;
}

body.dmdg-site:not(.dmdg-home-compact-page):has(.dmdg-app-privacy) .dmdg-app-content h2 { font-size: 1.5rem; }
body.dmdg-site:not(.dmdg-home-compact-page):has(.dmdg-app-privacy) .dmdg-app-content h3 { font-size: 1.2rem; }
body.dmdg-site:not(.dmdg-home-compact-page):has(.dmdg-app-privacy) .dmdg-app-content :is(p, li) { color: #b4b7ba; }
body.dmdg-site:not(.dmdg-home-compact-page):has(.dmdg-app-privacy) .dmdg-app-content a:not(.button) { color: #f3f3f3; text-decoration: underline; text-underline-offset: 3px; }
body.dmdg-site:not(.dmdg-home-compact-page):has(.dmdg-app-privacy) .dmdg-app-content a:hover { color: #ff342b; }

body.dmdg-site:not(.dmdg-home-compact-page):has(.dmdg-app-privacy) .dmdg-app-content :is(.dmdg-app-note, .dmdg-app-contact-card) {
  padding: 18px;
  border: 1px solid #303438;
  border-radius: 14px;
  background: #141719;
  color: #b4b7ba;
}

body.dmdg-site:not(.dmdg-home-compact-page):has(.dmdg-app-privacy) .dmdg-app-content :is(.dmdg-app-note, .dmdg-app-contact-card) :is(p, li) { color: #b4b7ba; }
body.dmdg-site:not(.dmdg-home-compact-page):has(.dmdg-app-privacy) .dmdg-app-content :is(.dmdg-app-note, .dmdg-app-contact-card) :is(strong, a) { color: #f3f3f3; }

.dmdg-app-language-bar {
  position: relative;
  z-index: 2;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(77, 76, 72, 0.16);
  background: #fffefa;
}

.dmdg-app-language-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
}

.dmdg-app-language-nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.9rem;
  border: 1px solid rgba(77, 76, 72, 0.28);
  border-radius: 999px;
  color: #383937;
  font-size: 0.88rem;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
}

.dmdg-app-language-nav a:is(:hover, :focus-visible),
.dmdg-app-language-nav a[aria-current="true"] {
  border-color: #6b632f;
  background: #e2d071;
  color: #282927;
}

.dmdg-app-language-panel[hidden] {
  display: none !important;
}

.dmdg-app-language-panel [data-dmdg-app-language-heading] {
  scroll-margin-top: 2rem;
}

.dmdg-app-language-panel [data-dmdg-app-language-heading]:focus-visible {
  outline: 3px solid #6b632f;
  outline-offset: 0.25rem;
}

.dmdg-app-content {
  padding-block: clamp(3rem, 7vw, 5.5rem);
}

.dmdg-app-content > :first-child {
  margin-top: 0;
}

.dmdg-app-content :is(h2, h3) {
  text-wrap: balance;
}

body:not(.home-page) .dmdg-app-content :is(h2, h3) {
  color: #f8f4ea;
}

body:not(.home-page) .dmdg-app-content :is(a:not(.button)) {
  color: #e2d071;
}

body:not(.home-page) .dmdg-app-content :is(.dmdg-app-note, .dmdg-app-contact-card),
body:not(.home-page) .dmdg-app-content :is(.dmdg-app-note, .dmdg-app-contact-card) :is(p, li, strong) {
  color: #383937;
}

body:not(.home-page) .dmdg-app-content :is(.dmdg-app-note, .dmdg-app-contact-card) a {
  color: #5b5428;
}

.dmdg-app-content h3 {
  margin-top: 2.2rem;
}

.dmdg-app-content li + li {
  margin-top: 0.55rem;
}

.dmdg-app-note,
.dmdg-app-contact-card {
  margin-block: 1.6rem;
  padding: clamp(1.1rem, 3vw, 1.6rem);
  border: 1px solid rgba(107, 99, 47, 0.3);
  border-radius: 16px;
  background: rgba(226, 208, 113, 0.17);
}

.dmdg-app-note > :first-child,
.dmdg-app-contact-card > :first-child {
  margin-top: 0;
}

.dmdg-app-note > :last-child,
.dmdg-app-contact-card > :last-child {
  margin-bottom: 0;
}

.dmdg-app-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.4rem;
  margin-top: 2rem;
}

.dmdg-app-links a,
.dmdg-app-contact-card a {
  font-weight: 750;
  text-underline-offset: 0.18em;
}

.dmdg-app-feedback-form {
  max-width: 820px;
  margin-top: 2rem;
}

.dmdg-app-feedback-upload-note {
  margin: 0;
  color: #55554f;
  font-size: 0.9rem;
  line-height: 1.55;
}

.dmdg-app-feedback-form .prototype-form__consent {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 0.5rem 0.75rem;
  align-items: start;
}

.dmdg-app-feedback-form .prototype-form__consent .dmdg-field-error {
  grid-column: 2;
}

@media (max-width: 520px) {
  .dmdg-app-language-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dmdg-app-language-nav a:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}
