.custom-contactform { max-width: 820px; margin: 0 auto; }
.custom-contactform__header { margin: 0 0 24px; }
.custom-contactform__header h1 { margin-bottom: .35rem; }
.custom-contactform__header p { margin: 0; color: #555; font-size: 1.05em; }

.custom-contactform__note{
  border-left: 4px solid #c0272d;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  padding: 16px 20px;
  border-radius: 6px;
  margin: 0 0 28px;
}
.custom-contactform__note p:last-child { margin-bottom: 0; }
/* Matches the Attention banner on the create-account-restricted page */
.custom-contactform__note{ color: #333; }
.custom-contactform__note p{ margin: 0 0 6px; line-height: 1.5; }
.custom-contactform__note p:first-child strong{ font-size: 1.15em; color: #c0272d; }

/* Each fieldset is a white card */
.custom-contactform .custom-contactform__card{
  background: #fff;
  border: 1px solid #e3e3e3;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  padding: 24px 24px 8px;
  margin: 0 0 28px;
}
/* Floated so the legend sits inside the card instead of on its border */
.custom-contactform .custom-contactform__card > .legend{
  float: left;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 22px;
  padding: 0 0 10px;
  border-bottom: 2px solid #c0272d;
  font-size: 1.25em;
  font-weight: 600;
  color: #222;
}
.custom-contactform .custom-contactform__card > .field{
  clear: both;
}
.custom-contactform .custom-contactform__card > .field > .label{
  font-weight: 600;
}

/* Vetting question: large, selectable Yes / No buttons */
.custom-contactform__radios{
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.custom-contactform__radios label.custom-contactform__choice{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 140px;
  padding: 12px 20px;
  border: 2px solid #d0d0d0;
  border-radius: 6px;
  background: #fafafa;
  font-weight: 600;
  font-size: 1.05em;
  cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.custom-contactform__radios label.custom-contactform__choice:hover{
  border-color: #c0272d;
}
.custom-contactform__radios label.custom-contactform__choice:has(input:checked){
  border-color: #c0272d;
  background: #fdf1f1;
  color: #c0272d;
}
.custom-contactform__radios label.custom-contactform__choice input{
  margin: 0;
  width: 18px;
  height: 18px;
  accent-color: #c0272d;
}

/* Contact fields: two columns on desktop, one on phones */
.custom-contactform .custom-contactform__grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 20px;
}
.custom-contactform .custom-contactform__grid > .legend,
.custom-contactform .custom-contactform__grid > .custom-contactform__full{
  grid-column: 1 / -1;
}
.custom-contactform .custom-contactform__grid > .field{
  margin-bottom: 20px;
}
.custom-contactform .custom-contactform__card .field > .label{
  display: inline-block;
  margin-bottom: 8px;
}

.custom-contactform .actions-toolbar{ margin-top: 4px; }
.custom-contactform .actions-toolbar .action.primary{
  padding: 14px 44px;
  font-size: 1.1em;
}

/* reCAPTCHA v3 badge hidden on pages with this form; the required notice is shown under Submit instead */
body:has(.custom-contactform) .grecaptcha-badge { visibility: hidden !important; }
.custom-contactform__recaptcha-note{
  margin: 14px 0 0;
  font-size: .85em;
  color: #666;
}

/* Full-width CMS layout has no side padding of its own */
.page-layout-cms-full-width .custom-contactform{ padding: 0 15px; box-sizing: border-box; }

@media (max-width: 767px){
  .custom-contactform .custom-contactform__card{ padding: 20px 16px 6px; margin-bottom: 24px; }
  .custom-contactform__radios{ gap: 12px; }
  .custom-contactform .custom-contactform__grid{ grid-template-columns: 1fr; }
  .custom-contactform__header h1{ font-size: 2.2rem; overflow-wrap: anywhere; }
  .custom-contactform__radios label.custom-contactform__choice{ flex: 1 1 0; min-width: 0; justify-content: center; }
  .custom-contactform .actions-toolbar .primary,
  .custom-contactform .actions-toolbar .action.primary{ width: 100%; }
}
