/* Bridge Lending Capital — Multi-step survey LP styles */

.survey-shell { background: var(--cream); }

.survey-main {
  flex: 1;
  padding: 32px 0 80px;
}

.survey-root {
  max-width: 720px;
  margin: 0 auto;
}

/* Progress */
.survey-progress {
  height: 3px;
  background: rgba(10, 31, 68, 0.08);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 48px;
}
.survey-progress-bar {
  height: 100%;
  background: var(--gold);
  width: 0;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Step transitions */
.survey-step { display: none; }
.survey-step.is-active {
  display: block;
  animation: survey-fade-in 0.35s ease;
}
@keyframes survey-fade-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Step header */
.survey-step-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}
.survey-step-title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 400;
  color: var(--navy);
  line-height: 1.15;
  margin-bottom: 14px;
}
.survey-step-title em {
  color: var(--gold);
  font-style: italic;
}
.survey-step-sub {
  font-size: 17px;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 36px;
  max-width: 560px;
}

/* Fields */
.survey-field { margin-bottom: 22px; }
.survey-field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.survey-field label .req { color: var(--gold); }
.survey-input,
.survey-select,
.survey-textarea {
  width: 100%;
  padding: 14px 16px;
  font-size: 17px;
  font-family: var(--font-sans);
  color: var(--navy);
  background: var(--white);
  border: 1px solid rgba(10, 31, 68, 0.14);
  border-radius: 8px;
  transition: border-color 0.18s, box-shadow 0.18s;
  -webkit-appearance: none;
  appearance: none;
}
.survey-input:focus,
.survey-select:focus,
.survey-textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 160, 78, 0.18);
}
.survey-input.is-invalid,
.survey-select.is-invalid,
.survey-textarea.is-invalid {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}
.survey-textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.survey-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' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%230a1f44' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  padding-right: 44px;
}
.survey-field-help {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.5;
}

.survey-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 640px) {
  .survey-field-row { grid-template-columns: 1fr; }
}

/* Nav */
.survey-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  gap: 12px;
  flex-wrap: wrap;
}
.survey-nav-left {
  display: flex;
  gap: 12px;
}
.survey-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 32px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid var(--navy);
  background: var(--navy);
  color: var(--cream);
  transition: all 0.18s;
  text-decoration: none;
}
.survey-btn:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
}
.survey-btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
.survey-btn-arrow {
  transition: transform 0.18s;
  font-size: 15px;
}
.survey-btn:hover .survey-btn-arrow { transform: translateX(4px); }

.survey-back {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px 0;
}
.survey-back:hover { color: var(--navy); }

.survey-skip {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px 0;
  text-decoration: underline;
  text-decoration-color: rgba(10, 31, 68, 0.2);
  text-underline-offset: 4px;
}
.survey-skip:hover { color: var(--navy); }

/* Trust strip (kept on welcome step) */
.survey-trust {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.survey-trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--white);
  border: 1px solid rgba(10, 31, 68, 0.08);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--navy);
  font-weight: 500;
  letter-spacing: 0.5px;
  box-shadow: 0 1px 2px rgba(10, 31, 68, 0.04);
}

/* Welcome step layout — mirrors the original LP hero (centered, no progress bar) */
.survey-step.is-welcome { text-align: center; }
.survey-step.is-welcome .survey-step-sub { margin-left: auto; margin-right: auto; }
.survey-step.is-welcome .survey-trust { justify-content: center; }
.survey-step.is-welcome .survey-loan-picker { max-width: 380px; margin-left: auto; margin-right: auto; text-align: left; }
.survey-step.is-welcome .survey-step-title {
  font-size: clamp(36px, 5.5vw, 56px);
  margin-bottom: 24px;
}
.survey-step.is-welcome .survey-step-title em {
  display: block;
  margin-top: 6px;
}
.survey-welcome-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 32px 0 24px;
}
.survey-welcome-cta-helper {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.survey-progress.is-hidden { visibility: hidden; }

/* Small "(change loan type)" affordance on the welcome step */
.survey-change-loan-line { margin: -22px 0 18px; text-align: center; }
.survey-change-loan-link {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(10, 31, 68, 0.25);
  text-underline-offset: 3px;
  transition: color 0.15s;
}
.survey-change-loan-link:hover { color: var(--navy); }

/* Submitted notice — shows after Step 1 fires the real submission */
.survey-sent-notice {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(22, 163, 74, 0.08);
  border-left: 3px solid #16a34a;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.5px;
  color: #14532d;
  margin-bottom: 28px;
}
.survey-sent-notice svg { color: #16a34a; flex-shrink: 0; }
.survey-sent-notice strong { font-weight: 600; }

/* Doc tiles (step 5) */
.survey-docs-intro { margin-bottom: 24px; }
.survey-doc {
  background: var(--white);
  border: 1px solid rgba(10, 31, 68, 0.08);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 14px;
  box-shadow: 0 1px 2px rgba(10, 31, 68, 0.04);
}
.survey-doc-head { margin-bottom: 14px; }
.survey-doc-title {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--navy);
  margin-bottom: 2px;
  font-weight: 400;
}
.survey-doc-sub {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}
.survey-doc-modes {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.survey-doc-mode {
  flex: 1;
  min-width: 130px;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid rgba(10, 31, 68, 0.12);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  font-weight: 500;
}
.survey-doc-mode:hover {
  border-color: var(--gold);
  color: var(--navy);
}
.survey-doc-mode.is-active {
  background: var(--navy);
  color: var(--cream);
  border-color: var(--navy);
}
.survey-doc-body {
  margin-top: 14px;
  display: none;
}
.survey-doc-body.is-active { display: block; }

.survey-doc-upload {
  border: 1px dashed rgba(10, 31, 68, 0.2);
  border-radius: 8px;
  padding: 18px;
  text-align: center;
  cursor: pointer;
  background: rgba(10, 31, 68, 0.02);
  display: block;
  transition: border-color 0.15s, background 0.15s;
}
.survey-doc-upload:hover {
  border-color: var(--gold);
  background: rgba(201, 160, 78, 0.04);
}
.survey-doc-upload input { display: none; }
.survey-doc-upload-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--navy);
}
.survey-doc-upload-status {
  font-family: var(--font-mono);
  font-size: 12px;
  margin-top: 10px;
  color: var(--text-muted);
}
.survey-doc-upload-status.is-uploaded { color: #16a34a; }
.survey-doc-upload-status.is-failed { color: #dc2626; }

.survey-doc-textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  font-family: var(--font-sans);
  color: var(--navy);
  background: var(--white);
  border: 1px solid rgba(10, 31, 68, 0.14);
  border-radius: 6px;
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}
.survey-doc-textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 160, 78, 0.15);
}

/* Feedback */
.survey-feedback {
  margin-top: 18px;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
  display: none;
}
.survey-feedback.error {
  display: block;
  background: rgba(220, 38, 38, 0.08);
  color: #991b1b;
  border-left: 3px solid #dc2626;
}
.survey-feedback.success {
  display: block;
  background: rgba(22, 163, 74, 0.08);
  color: #14532d;
  border-left: 3px solid #16a34a;
}

/* Success state */
.survey-success {
  text-align: center;
  padding: 60px 20px;
}
.survey-success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(22, 163, 74, 0.12);
  color: #16a34a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.survey-success h2 {
  font-family: var(--font-serif);
  font-size: 40px;
  color: var(--navy);
  margin-bottom: 14px;
  font-weight: 400;
}
.survey-success p {
  font-size: 17px;
  color: var(--text);
  max-width: 480px;
  margin: 0 auto 8px;
  line-height: 1.6;
}
.survey-success p.muted { color: var(--text-muted); font-size: 14px; margin-top: 18px; }

@media (max-width: 640px) {
  .survey-main { padding: 24px 0 60px; }
  .survey-progress { margin-bottom: 32px; }
  .survey-nav { flex-direction: column-reverse; align-items: stretch; }
  .survey-nav-left { justify-content: center; }
  .survey-btn { justify-content: center; padding: 14px 24px; }
}

/* TCPA consent block (contact step) */
.survey-consent { margin-top: 6px; }
.survey-consent label {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 12.5px; line-height: 1.5; color: var(--text-muted);
  cursor: pointer; text-transform: none; letter-spacing: 0; font-weight: 400;
}
.survey-consent input[type="checkbox"] {
  margin-top: 2px; flex-shrink: 0; width: 16px; height: 16px; accent-color: var(--gold);
}
.survey-consent a { color: var(--gold); text-decoration: underline; }
.survey-consent.is-invalid label { color: #dc2626; }

/* ===== Google Places address autocomplete =====
   Progressive enhancement. When no API key is configured on the page the
   wrapper is never created and the address input renders as a plain field. */
.blc-places-wrap { position: relative; }

.blc-places-list {
  position: absolute;
  z-index: 60;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  max-height: 264px;
  overflow-y: auto;
  background: var(--white);
  border: 1px solid rgba(10, 31, 68, 0.14);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(10, 31, 68, 0.14);
}
.blc-places-list[hidden] { display: none; }

.blc-places-list li {
  padding: 11px 16px;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.4;
  color: var(--navy);
  cursor: pointer;
}
.blc-places-list li:hover,
.blc-places-list li.is-active {
  background: rgba(201, 160, 78, 0.14);
}

@media (max-width: 640px) {
  .blc-places-list li { padding: 13px 16px; font-size: 16px; }
}

/* Ask-first docs: the Drive-link alternative under the upload box */
.survey-doc-link { margin-top: 10px; }
