/*
 * The one form-field standard (Alex 25 Nov 2026, via Felix: "you standardised the form inputs ... do that on the
 * hero form and elsewhere"). The spec is the hero callback card's static placeholder (hero.css .dh-ph-field,
 * .dh-ph-btn), so the real form island matches it and nothing jumps when it mounts.
 *
 * Use .dr-field on every text-like input, select and textarea, and .dr-submit on a form's main submit button.
 * Never restyle fields per form: change them here. This file is NOT in a cascade layer, so these rules win
 * over Tailwind utilities left on the same element. Loaded on every page except /lp/ (config/theme.php).
 * Fields never set display, so a component can still lay one out as flex (the select trigger does).
 */
.dr-field {
  box-sizing: border-box;
  width: 100%;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid #ddd2e8;
  border-radius: 8px;
  background-color: #fff;
  color: #1d0b2c;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: none;
  outline: none;
  transition: none;
}
.dr-field::placeholder { color: #756b7e; opacity: 1; }
.dr-field[data-placeholder] { color: #756b7e; }

/* Visible focus in the button standard's style: an inset brand-purple ring, no glow. */
.dr-field:focus,
.dr-field:focus-visible,
.dr-field[data-state="open"] {
  border-color: #390d58;
  box-shadow: inset 0 0 0 1px #390d58;
  outline: none;
}
.dr-field[aria-invalid="true"] { border-color: #b42318; }
.dr-field[aria-invalid="true"]:focus { box-shadow: inset 0 0 0 1px #b42318; }
.dr-field:disabled { opacity: .6; cursor: not-allowed; }

/* Native selects: own chevron, placeholder colour while the empty option is chosen. */
select.dr-field {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238d8396' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
  cursor: pointer;
}
select.dr-field:has(option[value=""]:checked) { color: #756b7e; }
select.dr-field option { color: #1d0b2c; }

textarea.dr-field {
  height: auto;
  min-height: 112px;
  padding: 10px 12px;
  line-height: 1.55;
  resize: vertical;
}

/* The free-audit sentence in "What happens next" (partials/blocks/after-click-steps.php): only for website work
   (Alex 25 Nov, d-c6a58a). Shown when the page says so (.is-on) or the form on the page reports a website choice. */
.dr-audit-line { display: none; }
.dr-audit-line.is-on,
body:has([data-dr-website="1"]) .dr-audit-line { display: inline; }

/* A stack of fields: 12px between them. */
.dr-fields { display: flex; flex-direction: column; gap: 12px; }

.dr-submit {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: #390d58;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s;
}
.dr-submit:hover { background: #4d1873; color: #fff; }
.dr-submit:focus-visible { outline: 2px solid #fff; outline-offset: -5px; }
.dr-submit:disabled { opacity: .7; cursor: default; pointer-events: none; }
.dr-submit svg { width: 16px; height: 16px; flex-shrink: 0; }
