/* =========================================
   ROOFFLOW — Lead Form Styles
   Matches landing page design tokens
   ========================================= */

/* ---- Page Layout ---- */
.quote-page {
  background: var(--cream);
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 4rem 1.5rem 6rem;
}

.quote-container {
  width: 100%;
  max-width: 520px;
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  box-shadow: 0 4px 32px rgba(28, 44, 64, 0.08);
}

/* ---- Header ---- */
.quote-header {
  margin-bottom: 2.5rem;
}

.quote-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  color: var(--ink);
  margin: 0.5rem 0 0.75rem;
  line-height: 1.15;
}

.quote-subtitle {
  font-size: 0.95rem;
  color: var(--ink-light);
  line-height: 1.65;
}

/* ---- Form ---- */
.lead-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--slate);
  letter-spacing: 0.01em;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--cream-dark);
  border-radius: 10px;
  font-size: 1rem;
  font-family: 'DM Sans', system-ui, sans-serif;
  color: var(--ink);
  background: var(--white);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
  appearance: none;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238a8a8a' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(232, 97, 26, 0.12);
}

.form-group input.error,
.form-group select.error {
  border-color: #e74c3c;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.field-error {
  font-size: 0.78rem;
  color: #e74c3c;
  min-height: 1em;
  display: none;
}

.form-error-box {
  padding: 0.875rem 1rem;
  background: #fdf2f0;
  border: 1px solid #f0c8c0;
  border-radius: 8px;
  color: #c0392b;
  font-size: 0.875rem;
  line-height: 1.5;
}

/* ---- Submit Button ---- */
.btn-submit {
  width: 100%;
  padding: 1rem 1.5rem;
  background: var(--terracotta);
  color: var(--white);
  border: none;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 600;
  font-family: 'DM Sans', system-ui, sans-serif;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.btn-submit:hover:not(:disabled) {
  background: var(--terracotta-light);
  transform: translateY(-1px);
}

.btn-submit:active:not(:disabled) {
  transform: translateY(0);
}

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-loading {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.spinner {
  width: 18px;
  height: 18px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---- Disclaimer ---- */
.form-disclaimer {
  font-size: 0.78rem;
  color: var(--ink-muted);
  text-align: center;
  margin-top: -0.5rem;
}

/* ---- Success State ---- */
.success-state {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
  padding: 1rem 0;
}

.success-icon svg {
  width: 64px;
  height: 64px;
}

.success-state h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.75rem;
  color: var(--ink);
}

.success-state p {
  font-size: 0.95rem;
  color: var(--ink-light);
  line-height: 1.65;
  max-width: 38ch;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .quote-page { padding: 2.5rem 1rem 4rem; }
  .quote-container { padding: 2rem 1.5rem; }
  .quote-title { font-size: 1.6rem; }
}