/* Contact / Quote form – compact but readable
   Place in: public_html/css/contact-form-test.css
   Linked from test.php after style-fast.css + css-fast.css
*/

.contact-hero {
  padding: 0.75rem 0 2rem;
  background: #fff;
}

/* Alerts */
.alert {
  max-width: 820px;
  margin: 0 auto 1.15rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.92rem;
  line-height: 1.45;
}
.alert-success {
  background: #e6f4ea;
  border: 1px solid #34a853;
  color: #137333;
}
.alert-error {
  background: #fce8e6;
  border: 1px solid #d93025;
  color: #c5221f;
}

/* Form card */
.quote-form {
  max-width: 820px;
  margin: 0 auto;
  background: #fffef5;
  padding: 1.5rem 1.35rem;
  border-radius: 10px;
  box-shadow: none;
  border: 1px solid #E2E8F0;
}

/* Sections */
.form-section {
  border: none;
  margin: 0 0 1.5rem;
  padding: 0 0 1.35rem;
  border-bottom: 1px solid #E2E8F0;
}
.form-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0.75rem;
  padding-bottom: 0.25rem;
}
.form-section legend {
  display: block;
  width: 100%;
  font-size: 1.1rem;
  font-weight: 700;
  color: #000;
  margin: 0 0 0.85rem;
  padding: 0;
  line-height: 1.3;
}
.form-section legend small {
  display: inline-block;
  font-weight: 400;
  font-size: 0.8rem;
  color: #4A5568;
  margin-left: 0.2rem;
}

.section-note {
  font-size: 0.82rem;
  color: #4A5568;
  margin: -0.35rem 0 0.85rem;
  font-style: italic;
}

/* Field grid */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 1.1rem;
}
.form-grid .full {
  grid-column: 1 / -1;
}

/* Labels */
.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #000;
  margin-bottom: 0.3rem;
  line-height: 1.3;
}
.field label small {
  font-weight: 400;
  color: #4A5568;
}
.req {
  color: #c53030;
  font-weight: 700;
}

/* Inputs — override site-wide min-width:170px rules inside the form only */
.quote-form .field input[type="text"],
.quote-form .field input[type="email"],
.quote-form .field input[type="tel"],
.quote-form .field input[type="date"],
.quote-form .field input[type="number"],
.quote-form .field select {
  width: 100%;
  min-width: 0 !important;
  max-width: 100%;
  padding: 0.45rem 0.65rem;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  font-size: 0.92rem;
  font-family: inherit;
  line-height: 1.35;
  color: #1A202C;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  min-height: 2.2rem;
  box-sizing: border-box;
}
.quote-form .cf-attach {
  position: relative;
}
.quote-form .cf-attach-row {
  display: grid;
  grid-template-columns: 9.6rem minmax(0, 1fr);
  align-items: center;
  column-gap: 0.55rem;
  row-gap: 0.1rem;
  margin: 0 0 0.4rem;
}
.quote-form .field input:focus,
.quote-form .field select:focus {
  outline: none;
  border-color: #333;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.12);
}
.quote-form .field select {
  cursor: pointer;
  appearance: auto;
}

/* Validation errors */
.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: #e53e3e !important;
  background: #fff5f5 !important;
  box-shadow: 0 0 0 2px rgba(229, 62, 62, 0.2) !important;
}
.field.has-error > label,
.field.has-error .field-error-msg {
  color: #c53030;
}
.field-error-msg {
  display: none;
  font-size: 0.78rem;
  font-weight: 600;
  color: #c53030;
  margin-top: 0.25rem;
}
.field.has-error .field-error-msg {
  display: block;
}
.field.has-error .radio-row,
.field.has-error .checkbox-grid,
.field.has-error .radio-col {
  outline: 2px solid #fc8181;
  outline-offset: 4px;
  border-radius: 6px;
  background: #fff5f5;
  padding: 0.35rem 0.5rem;
}
.form-error-banner {
  background: #fff5f5;
  border: 1px solid #fc8181;
  color: #c53030;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  margin: 0 auto 1.25rem;
  max-width: 820px;
  font-weight: 600;
}

/* Textareas */
.quote-form textarea,
.field textarea,
textarea#Needs,
textarea#Message,
textarea#Sail_inventory {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: 90px !important;
  height: auto !important;
  resize: vertical !important;
  line-height: 1.45 !important;
  border: 1.5px solid #94a3b8 !important;
  border-radius: 6px !important;
  background: #f1f5f9 !important;
  padding: 0.55rem 0.7rem !important;
  font-size: 0.92rem !important;
  font-family: inherit !important;
  color: #1A202C !important;
  box-sizing: border-box !important;
  overflow: auto !important;
}
.quote-form textarea:focus,
.field textarea:focus {
  background: #ffffff !important;
  border-color: #333 !important;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.12) !important;
  outline: none !important;
}
textarea#Message {
  min-height: 120px !important;
}

/* Radios & checkboxes */
.radio-row,
.checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  align-items: center;
  padding-top: 0.1rem;
}
.radio-col {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-top: 0.1rem;
}
.radio-label,
.check-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 500;
  font-size: 0.88rem;
  cursor: pointer;
  color: #1A202C;
  line-height: 1.3;
}
.radio-label input,
.check-label input {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  accent-color: #000;
  margin: 0;
}

/* Equipment grid */
.equip-title {
  font-size: 0.98rem;
  margin: 1.15rem 0 0.7rem;
  color: #000;
  font-weight: 700;
}
.equip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.85rem 1rem;
}
.equip-field label {
  margin-bottom: 0.25rem;
}
.equip-living-group {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 0.65rem 1.25rem;
  align-items: start;
}
.equip-stack {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
}
.equip-living-group .equip-field {
  margin: 0;
}
.radio-col-compact {
  gap: 0.28rem;
}
.radio-col-compact .radio-label {
  font-size: 0.82rem;
  line-height: 1.25;
}
.equip-break {
  grid-column: 1 / -1;
  height: 0;
  margin: 0.55rem 0 0.7rem;
  border: none;
  border-top: 1px solid #E2E8F0;
}

@media (max-width: 560px) {
  .equip-living-group {
    grid-template-columns: 1fr;
  }
}

/* Submit button — gold on black (site brand) */
.btn {
  display: inline-block;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  text-align: center;
  box-sizing: border-box;
}
.btn-primary {
  background: #000;
  color: #e6c300;
}
.btn-primary:hover,
.btn-primary:focus {
  background: #222;
  color: #fff;
}
.btn-lg {
  min-height: 2.5rem;
  padding: 0.55rem 1.25rem;
  font-size: 0.98rem;
}
.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.form-actions {
  text-align: center;
  margin-top: 1.35rem;
  padding-top: 0.25rem;
}
.form-actions .btn {
  min-width: 180px;
}
.form-footnote {
  margin-top: 0.85rem;
  font-size: 0.78rem;
  color: #4A5568;
  line-height: 1.4;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
}

/* Honeypot */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  opacity: 0 !important;
  height: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Responsive */
@media (max-width: 768px) {
  .quote-form {
    padding: 1.15rem 0.9rem;
    border-radius: 8px;
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
  .form-section {
    margin-bottom: 1.25rem;
    padding-bottom: 1.1rem;
  }
  .form-section legend {
    font-size: 1.02rem;
  }
  .equip-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }
  .form-actions .btn {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 480px) {
  .contact-hero {
    padding: 0.5rem 0 1.5rem;
  }
  .quote-form {
    padding: 1rem 0.75rem;
  }
  .equip-grid {
    grid-template-columns: 1fr;
  }
  .radio-row,
  .checkbox-grid {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
}

/* ============================================================
   Background IMAGE INSIDE the contact form card (.quote-form)
   Not on the page container — only on the form panel.
   ============================================================ */

.column {
  background-image: none;
  background-color: #fff;
}

.contact-hero {
  background: transparent;
  padding: 0.75rem 0 2rem;
}

.column-contact {
  background: transparent;
}

.column-contact .text-container {
  background: #fff;
  border-radius: 8px;
  padding: 0.85rem 1rem 0.5rem !important;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: none;
}

/* Yellow form card — no background photo */
.quote-form {
  background-color: #fffef5 !important;
  background-image: none !important;
  box-shadow: none;
}
.quote-form.form-bg-ready {
  background-image: none !important;
}

/* Fields stay solid white so typing is clear on top of the image */
.quote-form .field input[type="text"],
.quote-form .field input[type="email"],
.quote-form .field input[type="tel"],
.quote-form .field input[type="date"],
.quote-form .field input[type="number"],
.quote-form .field select,
.quote-form textarea {
  background: #ffffff !important;
}

/* ============================================================
   Mobile fix — contact form (override site min-width:170px etc.)
   ============================================================ */
.quote-form,
.quote-form *,
.quote-form *::before,
.quote-form *::after {
  box-sizing: border-box;
}

.contact-hero .container,
.column-contact,
.column-contact .text-container {
  max-width: 100%;
  overflow-x: hidden;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
}
.quote-form {
  width: 100%;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
  overflow-x: hidden;
  box-shadow: none !important;
}

.quote-form .field input[type="text"],
.quote-form .field input[type="email"],
.quote-form .field input[type="tel"],
.quote-form .field input[type="date"],
.quote-form .field input[type="number"],
.quote-form .field select,
.quote-form textarea,
.quote-form input[type="text"],
.quote-form input[type="email"],
.quote-form input[type="tel"],
.quote-form input[type="date"],
.quote-form input[type="number"],
.quote-form select {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.quote-form .pac-container {
  z-index: 10000;
}

@media (max-width: 768px) {
  .contact-hero {
    padding: 0.4rem 0 1.25rem !important;
  }
  .column-contact .text-container {
    padding: 0.5rem 0.5rem 0.25rem !important;
    border-radius: 0 !important;
  }
  .quote-form {
    padding: 0.85rem 0.7rem !important;
    border-radius: 8px !important;
    margin: 0 !important;
    max-width: 100% !important;
  }
  .form-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }
  .form-grid .full {
    grid-column: 1 / -1 !important;
  }
  .equip-grid {
    grid-template-columns: 1fr !important;
    gap: 0.65rem !important;
  }
  .radio-row,
  .checkbox-grid {
    flex-direction: column !important;
    align-items: flex-start !important;
    flex-wrap: wrap !important;
    gap: 0.35rem !important;
  }
  .form-section legend {
    font-size: 1rem !important;
  }
  .form-section legend small {
    display: block !important;
    margin: 0.2rem 0 0 !important;
  }
  .form-actions .btn,
  .quote-form button[type="submit"] {
    width: 100% !important;
    min-width: 0 !important;
  }
  .pre-purchase-info {
    padding-right: 2rem !important;
    font-size: 0.9rem !important;
  }
}

@media (max-width: 480px) {
  .quote-form {
    padding: 0.75rem 0.55rem !important;
    box-shadow: none !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-radius: 0 !important;
  }
  .quote-form .field label {
    font-size: 0.8rem !important;
  }
  .quote-form .field input,
  .quote-form .field select,
  .quote-form textarea {
    font-size: 16px !important; /* avoid iOS zoom on focus */
    min-height: 2.6rem !important;
  }
}

/* Compact extra attachments — docs + photo */
.quote-form .cf-attach { position: relative; margin: 0.15rem 0 0; }
.quote-form .cf-attach-row {
  display: grid;
  grid-template-columns: 9.6rem minmax(0, 1fr);
  align-items: center;
  column-gap: 0.55rem;
  row-gap: 0.08rem;
  margin: 0 0 0.4rem;
}
.quote-form .cf-attach-label {
  margin: 0 0.25rem 0 0;
  font-size: 0.8rem;
  color: #4a5568;
  white-space: nowrap;
}
.quote-form .cf-attach-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0.18rem 0.55rem;
  border-radius: 5px;
  font-weight: 700;
  font-size: 0.78rem;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  box-sizing: border-box;
  margin: 0;
}
.quote-form .cf-attach-btn.files {
  background: #e6c300;
  color: #111;
  border: 1px solid #c4a600;
}
.quote-form .cf-attach-btn.photo {
  background: #111;
  color: #e6c300;
  border: 1px solid #e6c300;
}
.quote-form .cf-attach-btn:hover { filter: brightness(1.06); }
.quote-form .cf-attach input[type="file"] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  max-width: 1px !important;
  min-width: 0 !important;
  opacity: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0);
  padding: 0 !important;
  border: 0 !important;
}
.quote-form .cf-attach-docs {
  font-size: 0.75rem;
  color: #4a5568;
  margin: 0.28rem 0 0;
  line-height: 1.35;
}
.quote-form .cf-attach-names {
  font-size: 0.75rem;
  color: #2d3748;
  margin: 0.12rem 0 0;
}
