/*
  Shared contact form + modal styling. Used by:
  - The inline form on the Contact page (contact/index.html)
  - The "Book a Demo" modal injected site-wide by js/contact-form.js

  Loaded after brand-overrides.css on every page (see js/contact-form.js
  comment for the full wiring).
*/

/* ---- Form fields (shared by inline form and modal form) ---- */

.contact-form .form-group {
  margin-bottom: 20px;
  text-align: left;
}

.contact-form label {
  display: block;
  font-weight: 600;
  color: var(--header-color);
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.contact-form label .optional {
  font-weight: 400;
  color: var(--text-color);
}

.contact-form .form-control {
  width: 100%;
  border: 2px solid var(--silver);
  border-radius: 8px;
  padding: 10px 14px;
  background-color: var(--white);
  font-size: 1rem;
}

.contact-form .form-control:focus {
  border-color: var(--stateblue);
  box-shadow: 0 0 0 2px rgba(30, 122, 75, 0.15);
  outline: none;
  background-color: var(--white);
}

/* The Contact page wraps its form in .roi-card for the card/padding
   treatment, but brand-overrides.css's ".roi-card input.form-control" rule
   (element+class, higher specificity than ".contact-form .form-control"
   above) was winning for <input> elements specifically -- it doesn't match
   <textarea>, which is why only the Message field inherited the fix above.
   Matched here at the same specificity; this file loads after
   brand-overrides.css so the source-order tiebreak favors this one. */
.contact-form input.form-control {
  border: 2px solid var(--silver);
  background-color: var(--white);
}

.contact-form input.form-control:focus {
  border-color: var(--stateblue);
  box-shadow: 0 0 0 2px rgba(30, 122, 75, 0.15);
  outline: none;
}

.contact-form textarea.form-control {
  resize: vertical;
  min-height: 110px;
}

/* Honeypot field: off-screen rather than display:none, since some bots
   skip display:none fields deliberately. Real visitors never see or tab
   into it. */
.contact-form .hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form-status {
  margin-top: 15px;
  margin-bottom: 0;
  font-size: 0.95rem;
  min-height: 1.3em;
}

.contact-form-status.is-error {
  color: var(--orange-red);
}

.contact-form-status.is-success {
  color: var(--stateblue);
  font-weight: 600;
}

.contact-form button[type="submit"] {
  border: none;
  cursor: pointer;
}

.contact-form button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.contact-form-success-txt {
  text-align: center;
  padding: 20px 0;
}

.contact-form-success-txt span.flaticon-check-1 {
  font-size: 3rem;
  color: var(--stateblue);
  display: block;
  margin-bottom: 15px;
}

/* ---- Modal shell ---- */

.contact-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 20, 0.65);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.contact-modal-overlay.is-open {
  display: flex;
}

.contact-modal-dialog {
  position: relative;
  background: var(--white);
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.contact-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  background: var(--light-gray);
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--header-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-modal-close:hover {
  background: var(--stateblue);
  color: var(--white);
}

.contact-modal-title {
  margin-bottom: 8px;
}

.contact-modal-subtitle {
  color: var(--text-color);
  margin-bottom: 25px;
}

@media (max-width: 480px) {
  .contact-modal-dialog {
    padding: 30px 20px;
  }
}

/* Contact page: "other ways to reach us" cards -- icon + heading + email
   laid out in a horizontal row instead of stacked, so a short 2-line card
   doesn't read as a wide, mostly-empty box. */
.contact-method-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.contact-method-card [class*="flaticon-"] {
  flex-shrink: 0;
  margin-top: 3px;
}
