/* ============================
   Estimate Form – Stylesheet
   ============================ */

/* Base reset for the form area */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Page text defaults (kept from your original) */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #2c3e50;
  background-color: #f8f9fa;
  padding: 20px;
}

/* Form container */
#estimate-form {
  max-width: 800px;
  margin: 0 auto;
  padding: 30px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Rows & columns */
.form-row {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 20px;
  gap: 20px;
}

.form-group {
  flex: 1;
  min-width: 0;
}

.form-col-6 {
  flex: 0 0 calc(50% - 10px);
}

.form-col-4 {
  flex: 0 0 calc(33.333% - 14px);
}

/* Accessible label helper */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Inputs, selects, textarea */
input,
select,
textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 16px;
  transition: all 0.2s ease;
  background-color: #fff;
}

input::placeholder,
textarea::placeholder {
  color: #9ca3af;
}

/* Focus ring in Zenith orange */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #f7941d;
  box-shadow: 0 0 0 3px rgba(247, 148, 29, 0.25);
}

/* File input */
input[type="file"] {
  padding: 10px;
  background-color: #f9fafb;
}

/* Select caret */
select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 16px;
  padding-right: 40px;
}

/* Zenith orange primary button */
.zenith-btn {
  display: block;
  width: 100%;
  padding: 15px;
  background-color: #f7941d;   /* brand orange */
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, opacity 0.15s ease;
}

.zenith-btn:hover {
  background-color: #e9830d;   /* slightly darker on hover */
  transform: translateY(-2px);
}

.zenith-btn:active {
  transform: translateY(0);
}

.zenith-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Center the reCAPTCHA widget */
.recaptcha-container {
  display: flex;
  justify-content: center;
}

/* Error summary (shown by JS when there’s a validation error) */
.form-error-summary {
  display: none;                /* JS toggles this to block */
  margin: 10px 0;
  padding: 10px 12px;
  font-size: 0.95rem;
  line-height: 1.4;
  color: #b00020;
  background: #fff5f5;
  border: 1px solid #fecaca;
  border-left: 4px solid #ef4444;
  border-radius: 6px;
}

/* ---- Only show red borders AFTER a failed submit ---- */
#estimate-form.has-errors input:invalid,
#estimate-form.has-errors select:invalid,
#estimate-form.has-errors textarea:invalid {
  border-color: #e53e3e;        /* red only when form has errors */
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

/* Disclaimer — subtle top divider, no dark left bar */
.form-disclaimer {
  margin-top: 24px;
  padding: 16px 0 0;
  background: transparent;
  color: #334155;               /* slate-700 */
  border-left: 0;
  border-top: 2px solid #e5e7eb;/* light top rule to match site */
}

.form-disclaimer a {
  color: #f7941d;               /* keep links on-brand */
  text-decoration: none;
  font-weight: 500;
}

.form-disclaimer a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  .form-col-6,
  .form-col-4 {
    flex: 0 0 100%;
  }

  #estimate-form {
    padding: 20px;
  }
}
