/* ==========================================================================
   Contact page form — styles Wing Popup's rendered form to match the design.
   Loaded only on /contact/. Wing Popup prints the fields in its own order
   (name, email, subject, custom fields, message); the grid `order` below
   arranges them like the mock: name + email, topic + website, subject, message.
   ========================================================================== */

.wd .wd-contact-form .wdpop-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 0;
}
.wd .wd-contact-form .wdpop-field { margin: 0; min-width: 0; }
.wd .wd-contact-form .wdpop-field--name     { order: 1; }
.wd .wd-contact-form .wdpop-field--email    { order: 2; }
.wd .wd-contact-form .wdpop-field--custom_1 { order: 3; }
.wd .wd-contact-form .wdpop-field--custom_2 { order: 4; }
.wd .wd-contact-form .wdpop-field--subject  { order: 5; grid-column: 1 / -1; }
.wd .wd-contact-form .wdpop-field--message  { order: 6; grid-column: 1 / -1; }
.wd .wd-contact-form .wdpop-field--consent  { order: 7; grid-column: 1 / -1; }
.wd .wd-contact-form .wdpop-form__submit,
.wd .wd-contact-form .wdpop-form__message,
.wd .wd-contact-form .wdpop-form__links,
.wd .wd-contact-form .altcha,
.wd .wd-contact-form .wdpop-turnstile { order: 8; grid-column: 1 / -1; }
.wd .wd-contact-form .wdpop-form__message { order: 9; }

.wd .wd-contact-form .wdpop-label {
  display: block; font-weight: 600; font-size: .9rem; margin: 0 0 6px; color: var(--wd-ink);
  font-family: var(--wd-font-body);
}
.wd .wd-contact-form .wdpop-required { color: var(--wd-accent); }

.wd .wd-contact-form input.wdpop-input:not([type="checkbox"]):not([type="hidden"]),
.wd .wd-contact-form select.wdpop-input,
.wd .wd-contact-form textarea.wdpop-input {
  width: 100%; margin: 0; border: 1px solid var(--wd-line-2); border-radius: 12px; padding: 13px 14px;
  font-family: var(--wd-font-body); font-size: .95rem; line-height: 1.4; color: var(--wd-ink); background: #fff;
  box-shadow: none; transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none;
}
.wd .wd-contact-form select.wdpop-input {
  padding-right: 40px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236d748a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 14px center / 14px no-repeat;
}
.wd .wd-contact-form .wdpop-input::placeholder { color: var(--wd-ink-3); }
.wd .wd-contact-form input.wdpop-input:focus,
.wd .wd-contact-form select.wdpop-input:focus,
.wd .wd-contact-form textarea.wdpop-input:focus {
  outline: none; border-color: var(--wd-primary); box-shadow: 0 0 0 4px var(--wd-primary-soft);
}
.wd .wd-contact-form textarea.wdpop-input { min-height: 150px; resize: vertical; }

/* Consent / checkbox rows, if the form ever gets one */
.wd .wd-contact-form .wdpop-label--checkbox { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: .9rem; color: var(--wd-ink-2); }
.wd .wd-contact-form .wdpop-label--checkbox input { margin: 3px 0 0; accent-color: var(--wd-primary); }

/* Submit button = the design's primary button */
.wd .wd-contact-form .wdpop-form__submit {
  justify-self: start; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 18px 30px; border-radius: 14px; border: 1px solid transparent; cursor: pointer;
  font-family: var(--wd-font-display); font-weight: 700; font-size: 1.05rem; line-height: 1;
  background: var(--wd-primary); color: #fff; box-shadow: 0 8px 20px rgba(76, 59, 255, .28);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease; width: auto; margin: 4px 0 0;
}
.wd .wd-contact-form .wdpop-form__submit:hover { background: var(--wd-primary-2); transform: translateY(-1px); box-shadow: 0 12px 26px rgba(76, 59, 255, .34); }
.wd .wd-contact-form .wdpop-form[data-wdpop-busy="1"] .wdpop-form__submit { opacity: .7; cursor: progress; transform: none; }

/* Result messages */
.wd .wd-contact-form .wdpop-form__message { margin: 0; padding: 0; border: 0; font-size: .95rem; font-weight: 500; }
.wd .wd-contact-form .wdpop-form__message:empty { display: none; }
.wd .wd-contact-form .wdpop-form__message.error { color: #b8144d; background: var(--wd-accent-soft); padding: 12px 14px; border-radius: 12px; }
.wd .wd-contact-form .wdpop-form__message.success { color: #12753a; background: var(--wd-green-soft); padding: 12px 14px; border-radius: 12px; }

@media (max-width: 560px) {
  .wd .wd-contact-form .wdpop-form { grid-template-columns: 1fr; }
  .wd .wd-contact-form .wdpop-form__submit { width: 100%; }
}
