/* Shared card treatment, based on the Social Project enquiry form. */
body.rbc-flash.executive-theme :is(
  form.sp-contact-form,
  form.contact-form,
  form.broker-application-form,
  form.career-application-form,
  form.kyc-form,
  form.record-form,
  .portal-panel:has(> form.portal-form),
  .password-panel:has(> form.password-form),
  .newsletter-section:has(form.newsletter-form)
) {
  box-sizing: border-box;
  min-width: 0;
  padding: clamp(16px, 2.4vw, 36px) !important;
  border: 1px solid #c7d1c2 !important;
  border-radius: 12px !important;
  background: #fffefa !important;
  box-shadow: 0 5px 18px rgba(26, 53, 40, .06) !important;
}

body.rbc-flash.executive-theme form:is(
  .sp-contact-form, .contact-form, .broker-application-form,
  .career-application-form, .portal-form, .password-form, .kyc-form,
  .record-form, .newsletter-form
) {
  min-width: 0;
  gap: 18px !important;
}

body.rbc-flash.executive-theme :is(
  .sp-contact-form, .contact-form, .broker-application-form,
  .career-application-form, .portal-form, .password-form, .kyc-form,
  .record-form, .newsletter-form
) :is(input:not([type=checkbox],[type=radio],[type=hidden]), select, textarea) {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  border-radius: 6px !important;
}

.sp-contact-form .sp-form-row,
.career-application-form .career-form-grid,
.record-form .form-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.sp-contact-form .sp-form-row > label,
.career-application-form .career-form-grid > label,
.broker-form-field,
.record-form .form-row > label,
.kyc-form fieldset,
.record-form fieldset {
  min-width: 0;
}

.sp-page .sp-contact-form #socialPhoneHelp {
  margin-top: -8px;
}

@media (min-width: 721px) {
  .newsletter-form {
    grid-template-columns: minmax(0, .75fr) minmax(0, 1fr) auto;
  }
}

@media (max-width: 620px) {
  body.rbc-flash.executive-theme .legal-content > article:has(> :is(
    .contact-section, .broker-application-section, .portal-card, .password-shell, .broker-kyc-panel
  )) {
    padding-inline: 12px !important;
  }

  body.rbc-flash.executive-theme :is(
    .investor-section.broker-application-section,
    .broker-kyc-panel,
    .broker-project-panel
  ) {
    padding-inline: 12px !important;
  }

  body.rbc-flash.executive-theme .contact-section:has(> .contact-form) {
    grid-template-columns: minmax(0, 1fr);
    width: 100% !important;
    margin-inline: 0 !important;
    padding-inline: 0 !important;
  }

  body.rbc-flash.executive-theme form.broker-application-form,
  .sp-page .sp-contact-form :is(.sp-form-row, .sp-phone-row),
  .career-application-form .career-form-grid,
  .record-form .form-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .record-form .form-actions,
  .kyc-form .form-actions {
    flex-wrap: wrap;
  }
}

/* Contact sections use a clean card without the decorative gradient bar. */
body.executive-theme .legal-content article:has(.contact-section)::before{content:none!important;display:none!important;height:0!important;margin:0!important;background:none!important}
