/* WrightHaven — consolidated "Contact Us" smart form (companion to
   wh-contact-form.js). Dark section styled to the current brand: ink
   background, thin uppercase Lato heading, Poppins UI, gold accents.
   (Values mirror the --wh-* tokens in wrighthaven-custom.css; written as
   literals so the form has no load-order dependency on that file.) */

.wh-cform-section {
  background-color: #141414;
  padding: 84px 24px;
}

.wh-cform-inner {
  max-width: 820px;
  margin: 0 auto;
}

.wh-cform-heading {
  color: #ffffff;
  font-family: "Lato", sans-serif;
  font-weight: 300;
  font-size: 44px;
  line-height: 1.05;
  text-transform: uppercase;
  text-align: center;
  margin: 0 0 18px;
}

.wh-cform-divider {
  width: 64px;
  height: 2px;
  background-color: #9a8c57;
  margin: 0 auto 18px;
}

.wh-cform-sub {
  color: #cfcac0;
  font-family: "Poppins", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  text-align: center;
  margin: 0 0 36px;
}

.wh-cform fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 26px;
  min-width: 0;
}

/* --- topic selector ------------------------------------------------- */

.wh-cform-label,
.wh-cform-types legend {
  display: block;
  color: #b9b2a1;
  font-family: "Poppins", sans-serif;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0 0 12px;
  padding: 0;
}

.wh-cform-typegrid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.wh-cform-pill {
  cursor: pointer;
}

.wh-cform-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.wh-cform-pill span {
  display: inline-block;
  border: 1px solid #55503f;
  border-radius: 3px;
  color: #e8e4da;
  background-color: transparent;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  line-height: 1;
  padding: 12px 16px;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.wh-cform-pill:hover span {
  border-color: #9a8c57;
}

.wh-cform-pill input:checked + span {
  background-color: #9a8c57;
  border-color: #9a8c57;
  color: #ffffff;
}

.wh-cform-pill input:focus-visible + span {
  outline: 2px solid #c0b59b;
  outline-offset: 2px;
}

/* Nested community picker (legend + pills inside the community panel) */
.wh-cform-community-pick {
  border: 0;
  padding: 0;
  margin: 0 0 22px;
  min-width: 0;
}

.wh-cform-community-pick legend {
  display: block;
  color: #b9b2a1;
  font-family: "Poppins", sans-serif;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0 0 12px;
  padding: 0;
}

.wh-cform-community-fields {
  margin: 0 0 8px;
}

.wh-cform-community-details {
  margin-top: 8px;
}

/* Explicit hide for community sub-forms — do not rely only on [hidden]
   inside a fieldset that may have been disabled on load. */
.wh-cform-community-fields[hidden],
.wh-cform-community-details[hidden],
.wh-cform-panel[hidden] {
  display: none !important;
}

.wh-cform-community-fields.wh-cform-shown {
  display: block;
}

.wh-cform-community-details.wh-cform-shown {
  display: block;
  margin-top: 8px;
}

/* --- fields ---------------------------------------------------------- */

.wh-cform-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 16px;
  margin: 0 0 10px;
}

.wh-cform-field {
  margin: 0 0 16px;
}

.wh-cform-grid .wh-cform-field {
  margin: 0;
}

.wh-cform-field > label {
  display: block;
  color: #b9b2a1;
  font-family: "Poppins", sans-serif;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin: 0 0 7px;
}

.wh-cform-field input,
.wh-cform-field select,
.wh-cform-field textarea {
  width: 100%;
  box-sizing: border-box;
  background-color: #1e1e1e;
  border: 1px solid #3a382f;
  border-radius: 3px;
  color: #ffffff;
  font-family: "Poppins", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  padding: 12px 14px;
}

.wh-cform-field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%239a8c57' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.wh-cform-field select:invalid {
  color: #8f8a7c; /* placeholder option showing */
}

.wh-cform-field option {
  color: #141414;
  background-color: #ffffff;
}

.wh-cform-field textarea {
  min-height: 120px;
  resize: vertical;
}

.wh-cform-field input:focus,
.wh-cform-field select:focus,
.wh-cform-field textarea:focus {
  outline: none;
  border-color: #9a8c57;
}

.wh-cform-note {
  color: #a49e8f;
  font-family: "Poppins", sans-serif;
  font-size: 13px;
  line-height: 1.6;
  margin: 4px 0 0;
}

.wh-cform-note a {
  color: #c0b59b;
}

/* --- consent + submit ------------------------------------------------ */

.wh-cform-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 4px 0 26px;
}

.wh-cform-consent input {
  margin: 4px 0 0;
  flex: none;
  accent-color: #9a8c57;
}

.wh-cform-consent label {
  color: #cfcac0;
  font-family: "Poppins", sans-serif;
  font-size: 13px;
  line-height: 1.6;
}

.wh-cform-actions {
  margin: 0;
  text-align: center;
}

/* Two-part selector + explicit props: Elementor's kit-wide
   `.elementor-kit-5 button` reset (gold bg, 15px 20px padding, uppercase)
   otherwise restyles any new <button> — see DESIGN.md gotchas. */
.wh-cform .wh-cform-submit {
  display: inline-block;
  width: 100%;
  max-width: 320px;
  background-color: #9a8c57 !important;
  border: 0 !important;
  border-radius: 3px !important;
  color: #ffffff !important;
  font-family: "Poppins", sans-serif !important;
  font-size: 16px !important;
  letter-spacing: 2px;
  text-transform: uppercase !important;
  padding: 16px 24px !important;
  margin: 0 !important;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.wh-cform .wh-cform-submit:hover:not(:disabled) {
  background-color: #857849 !important;
}

.wh-cform .wh-cform-submit:disabled {
  opacity: 0.6;
  cursor: default;
}

.wh-cform-result {
  color: #ffffff;
  font-family: "Poppins", sans-serif;
  font-size: 18px;
  line-height: 1.6;
  text-align: center;
  padding: 24px 8px;
}

.wh-cform-result--error {
  color: #e08c7d;
  font-size: 15px;
  padding: 14px 8px 0;
}

/* --- small screens ---------------------------------------------------- */

@media (max-width: 640px) {
  .wh-cform-section {
    padding: 56px 18px;
  }

  .wh-cform-heading {
    font-size: 32px;
  }

  .wh-cform-grid {
    grid-template-columns: 1fr;
  }
}
