/* ==========================================================================
   Bullion Bankers — Consultation Request form
   Custom AJAX form styling (replaces the WPForms plugin markup/CSS).

   This file only contains rules for the FORM itself. The surrounding page
   chrome (.bb-contact-page, .bb-contact-hero, .bb-contact-aside,
   .bb-contact-card, .bb-contact-kicker, .bb-contact-intro,
   .bb-contact-privacy, and the generic input/select/textarea skin) already
   lives in style.css and is untouched — it applies to this markup exactly
   as it did to the WPForms output because the field-level rules below use
   the same "bbform-*" naming convention WPForms used ("wpforms-*"), just
   ported to a plugin-free custom form.
   ========================================================================== */

.bb-contact-card .bbform-container { margin: 26px 0 0; }

.bb-contact-card .bbform-field { padding: 0 0 18px; }

.bb-contact-card .bbform-field-label {
  display: block;
  margin-bottom: 7px;
  color: #19303e;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: .04em;
}

.bb-contact-card .bbform-required {
  color: #9c342d;
  margin-left: 2px;
}

.bb-contact-card .bbform-field-sublabel {
  display: block;
  margin-top: 6px;
  color: #71808a;
  font-size: .76rem;
}

/* Two-column layout: full-width rows for name / textarea / radio / select,
   Email + Phone fall into the remaining 1fr/1fr grid automatically. */
.bb-contact-card .bbform-field-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 16px;
}

.bb-contact-card .bbform-field-name,
.bb-contact-card .bbform-field-text,
.bb-contact-card .bbform-field-textarea,
.bb-contact-card .bbform-field-radio,
.bb-contact-card .bbform-field-select {
  grid-column: 1 / -1;
}

/* First / Last name row */
.bb-contact-card .bbform-name-row {
  display: flex;
  gap: 16px;
  margin-top: 2px;
}

.bb-contact-card .bbform-name-col {
  flex: 1 1 0;
  min-width: 0;
}

.bb-contact-card .bbform-name-col .bbform-field-sublabel {
  margin-top: 6px;
  margin-bottom: 0;
}

/* Radio choices ("I'm inquiring for") */
.bb-contact-card .bbform-field-radio ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.bb-contact-card .bbform-field-radio li {
  position: relative;
  margin: 0;
}

.bb-contact-card .bbform-field-radio input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  opacity: 0;
}

.bb-contact-card .bbform-field-radio label {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #d6cbb9;
  background: #fbfaf7;
  color: #19303e;
  font-size: .85rem;
  cursor: pointer;
}

.bb-contact-card .bbform-field-radio label:before {
  content: "";
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  border: 1px solid #9b7a43;
  border-radius: 50%;
  background: #fff;
}

.bb-contact-card .bbform-field-radio input[type="radio"]:checked + label {
  border-color: #b9852b;
  background: #071d2b;
  color: #fff;
}

.bb-contact-card .bbform-field-radio input[type="radio"]:checked + label:before {
  border: 4px solid #e2b75f;
}

.bb-contact-card .bbform-field-radio input[type="radio"]:focus-visible + label {
  outline: 2px solid #b9852b;
  outline-offset: 2px;
}

@media (max-width: 820px) {
  .bb-contact-card .bbform-field-container { display: block; }
  .bb-contact-card .bbform-field-radio ul { grid-template-columns: 1fr; }
}

/* Submit button */
.bb-contact-card .bbform-submit-container { padding-top: 4px; }

.bb-contact-card .bbform-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 12px 25px;
  border: 1px solid #c99a43;
  background: #c99a43;
  color: #071d2b;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 9px 22px rgba(154, 105, 28, .18);
  transition: background .15s ease, opacity .15s ease;
}

.bb-contact-card .bbform-submit:hover { background: #ddb766; }

.bb-contact-card .bbform-submit[disabled] {
  opacity: .68;
  cursor: not-allowed;
}

.bbform-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(7, 29, 43, .28);
  border-top-color: #071d2b;
  border-radius: 50%;
  animation: bbform-spin .7s linear infinite;
}

.bb-contact-card .bbform-submit[disabled] .bbform-spinner { display: inline-block; }

@keyframes bbform-spin {
  to { transform: rotate(360deg); }
}

/* Inline field errors */
.bb-contact-card .bbform-field-error {
  display: none;
  margin-top: 7px;
  color: #9c342d;
  font-size: .78rem;
}

.bb-contact-card .bbform-field.is-invalid .bbform-field-error { display: block; }

.bb-contact-card .bbform-field.is-invalid input,
.bb-contact-card .bbform-field.is-invalid select,
.bb-contact-card .bbform-field.is-invalid textarea {
  border-color: #9c342d !important;
  background: #fdf4f2 !important;
}

.bb-contact-card .bbform-field.is-invalid .bbform-field-radio label,
.bb-contact-card .bbform-field-radio.is-invalid label {
  border-color: #9c342d;
}

/* Honeypot — hidden from sighted users and screen readers, left open for bots */
.bbform-hp {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* Success / error form-level notice */
.bb-contact-card .bbform-notice {
  display: none;
  margin: 0 0 22px;
  padding: 16px 18px;
  border-left: 3px solid;
  font-size: .88rem;
  line-height: 1.6;
}

.bb-contact-card .bbform-notice.is-visible { display: block; }

.bb-contact-card .bbform-notice--success {
  border-color: #3c7a4b;
  background: #eef6ef;
  color: #245530;
}

.bb-contact-card .bbform-notice--error {
  border-color: #9c342d;
  background: #fdf1ef;
  color: #7a2a22;
}

.bb-contact-card.is-submitted .bbform-container { display: none; }
