/* ==========================================================
   CONTACT PAGE STYLES — AutoSpec QA
   ========================================================== */

/* Base layout & typography */
.contact-page .contact {
  max-width: 800px;
  margin: 0;
  color: #ffffff;
}
.contact-page .contact h1 {
  font-size: 2rem;
  font-weight: 600;
  margin: 0 0 20px;
  text-align: left;
}
.contact-page .contact p {
  font-size: 1.125rem;
  margin: 0 0 30px;
  text-align: left;
  color: #e0e1dd;
}

/* Labels & inputs */
#contactForm label {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  margin: 6px 0 4px;
  color: #ffffff;
}
#contactForm input[type='text'],
#contactForm input[type='email'],
#contactForm input[type='url'],
#contactForm textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  font-size: 1rem;
  color: #0d1b2a;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  margin-bottom: 0px;
}
#contactForm input::placeholder,
#contactForm textarea::placeholder {
  font-size: 0.95rem;
  color: #6b7280;
  opacity: 0.95;
}
#contactForm input[type='text']:focus,
#contactForm input[type='email']:focus,
#contactForm input[type='url']:focus,
#contactForm textarea:focus {
  outline: 2px solid #4ea8de;
  outline-offset: 2px;
  border-color: #4ea8de;
}

/* Submit button */
#contactForm .actions button[type='submit'],
#contactForm input[type='submit'] {
  width: 150px;
  padding: 12px;
  background-color: #fe6601; /* AutoSpec CTA */
  border: 0;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  border-radius: 6px;
  margin-top: 10px;
  transition: background-color 0.2s ease;
}
#contactForm .actions button[type='submit']:hover,
#contactForm input[type='submit']:hover {
  background-color: #cf3c15;
}
#contactForm .actions button[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Free Audit button + section */
#contactForm #auditToggle {
  background-color: #fb5924;
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.05s ease;
  display: inline-block;
}
#contactForm #auditToggle:hover {
  background-color: #ff8230;
}
#contactForm #auditToggle:active {
  transform: translateY(1px);
}

#contactForm .audit-toggle-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -5px;
  margin-bottom: 10px;
}

#contactForm #auditFields {
  width: 100%;
  margin: 10px 0 20px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}
#contactForm .audit-help {
  margin: 0 0 10px;
  color: #d1d5db;
  font-size: 0.95rem;
  opacity: 0.9;
}
#contactForm .audit-url-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  width: 100%;
}
#contactForm .audit-url-item {
  display: flex;
  flex-direction: column;
  width: 100%;
}
#contactForm .audit-url-item span {
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 4px;
}

/* ===== Compact spacing overrides (append at end) ===== */

/* The form is a grid in shared.css; shrink the grid row-gap */
#contactForm.contact-form {
  /* selector beats the shared one */
  gap: 0.5rem 0; /* row-gap .5rem, column-gap 0 */
}

/* Tighter label + control spacing */
#contactForm label {
  margin: 4px 0 2px;
}

/* Tighter controls */
#contactForm input[type='text'],
#contactForm input[type='email'],
#contactForm input[type='url'],
#contactForm textarea {
  padding: 10px; /* was 12px */
  margin-bottom: 4px; /* was 0 or larger elsewhere */
}

/* Error line keeps a small footprint */
#contactForm .field-error {
  margin-top: 2px;
  min-height: 0.9em;
}

/* Audit section: trim block and row spacing */
#contactForm #auditFields {
  margin: 8px 0 12px; /* was 10px 0 20px */
  padding: 14px; /* was 20px */
}

#contactForm .audit-help {
  margin: 0 0 6px; /* was 10px */
}

#contactForm .audit-url-grid {
  gap: 8px; /* was 15px */
}

#contactForm .audit-url-item span {
  margin-bottom: 2px; /* was 4px */
}

/* Kill default UA margins that sneak in extra space */
#contactForm fieldset,
#contactForm p {
  margin: 0;
}

/* Keep the submit area close to the fields */
#contactForm .actions {
  margin-top: 6px;
}

/* Inline errors */
.field-error {
  color: #ff6b00;
  font-size: 0.9rem;
  margin-top: 4px;
  min-height: 1.1em; /* reserve space */
}

/* Honeypot (visually hidden, still in DOM) */
.hp {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* Credibility links */
.supporting-links {
  margin-top: 16px;
  font-size: 0.95rem;
  opacity: 0.9;
}
.supporting-links ul {
  margin: 6px 0 0 1rem;
}

/* Responsive */
@media (max-width: 640px) {
  .contact-page .contact {
    max-width: 100%;
  }
  .contact-page .contact h1 {
    font-size: 1.75rem;
  }
  .contact-page .contact p {
    font-size: 1rem;
  }
}
