/* Site Visit Booking Form — House Seekers */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg-main: #f8fafc;
  --bg-card: #ffffff;

  --border-light: #e2e8f0;
  --border-medium: #cbd5e1;
  --border-focus: #2563eb;

  --slate-900: #0f172a;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;

  --blue-primary: #1d4ed8;
  --blue-hover: #1e40af;
  --blue-light: #eff6ff;
  --blue-border: #bfdbfe;

  --emerald-accent: #059669;
  --emerald-light: #ecfdf5;
  --emerald-border: #a7f3d0;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 25px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.03);

  --radius-xl: 18px;
  --radius-lg: 12px;
  --radius-md: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-main);
  color: var(--slate-900);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Header ---------- */
.sv-header {
  background: #fff;
  border-bottom: 1px solid var(--border-light);
  padding: 14px 20px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.sv-header-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.sv-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.sv-brand-logo img {
  height: 40px;
  width: auto;
  display: block;
}

/* ---------- Countdown Sticker ---------- */
.countdown-sticker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1.5px solid #bfdbfe;
  border-radius: 24px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #1e40af;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.15);
  flex-wrap: wrap;
}
.sticker-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
  animation: sv-pulse-blue 1.6s infinite;
  flex-shrink: 0;
}
.sticker-pulse.green {
  background: #16a34a;
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7);
  animation: sv-pulse-green 1.6s infinite;
}
@keyframes sv-pulse-blue {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(37, 99, 235, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}
@keyframes sv-pulse-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}
.sticker-text {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #1e40af;
  white-space: nowrap;
}
.countdown-timer-box {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ffffff;
  border: 1px solid #bfdbfe;
  padding: 2px 10px;
  border-radius: 14px;
  font-weight: 800;
  color: #1d4ed8;
}
.cd-unit {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}
.cd-unit strong {
  font-size: 0.95rem;
  color: #1e40af;
  min-width: 18px;
  display: inline-block;
  text-align: center;
}
.cd-unit small {
  font-size: 0.68rem;
  color: #2563eb;
  font-weight: 600;
}
.countdown-sticker.is-live {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-color: #86efac;
  color: #166534;
  box-shadow: 0 4px 12px rgba(22, 101, 52, 0.15);
  padding: 6px 16px;
}
.countdown-sticker.is-live .cd-live-text {
  color: #15803d;
  font-weight: 800;
  font-size: 0.88rem;
  letter-spacing: 0.5px;
}
@media (max-width: 868px) {
  .sv-header { padding: 8px 12px; }
  .sv-brand-logo img { height: 34px; }

  .countdown-sticker {
    padding: 4px 10px;
    gap: 6px;
    font-size: 0.72rem;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(29, 78, 216, 0.12);
  }
  .countdown-timer-box {
    padding: 1px 6px;
    gap: 2px;
    border-radius: 10px;
  }
  .cd-unit strong { font-size: 0.8rem; min-width: 14px; }
  .cd-unit small { font-size: 0.6rem; }
}

@media (max-width: 480px) {
  .sv-brand-logo img { height: 34px; }

  .countdown-sticker {
    padding: 3px 7px;
    gap: 4px;
    font-size: 0.65rem;
    width: 145px;
  }
  .countdown-sticker.is-live {
    width: auto;
    padding: 4px 10px;
  }
  .sticker-text {
    font-size: 0.62rem;
    font-weight: 700;
  }
  .cd-unit strong { font-size: 0.74rem; min-width: 12px; }
  .cd-unit small { font-size: 0.55rem; }
}

@media (max-width: 360px) {
  .sticker-text { display: none; }
}

/* ---------- Hero Banner ---------- */
.sv-hero {
  max-width: 1100px;
  margin: 24px auto 0;
  padding: 0 20px;
}
.sv-hero-card {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 20px 45px -12px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(217, 119, 6, 0.15);
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
}
.sv-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.08);
  animation: sv-hero-kenburns 12s ease-out forwards;
}
@keyframes sv-hero-kenburns {
  0% { transform: scale(1.08) translate3d(0, 0, 0); }
  100% { transform: scale(1) translate3d(0, 0, 0); }
}
.sv-hero-ribbon {
  position: absolute;
  top: 16px;
  right: -38px;
  z-index: 2;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 6px 46px;
  transform: rotate(38deg);
  box-shadow: 0 4px 10px rgba(217, 119, 6, 0.4);
}
.sv-hero-overlay {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 34px 28px 26px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, 0.35) 40%, rgba(15, 23, 42, 0.88) 100%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.55) 0%, rgba(15, 23, 42, 0.05) 65%);
}
.sv-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.55);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
  backdrop-filter: blur(4px);
}
.sv-hero-title {
  color: #fff;
  font-size: clamp(1.5rem, 4.2vw, 2.3rem);
  font-weight: 800;
  line-height: 1.2;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
  max-width: 700px;
}
.sv-hero-accent {
  background: linear-gradient(90deg, #fde68a 0%, #f59e0b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.sv-hero-divider {
  width: 56px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  margin: 14px 0 12px;
}
.sv-hero-sub {
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.97rem;
  font-weight: 500;
  max-width: 620px;
  line-height: 1.5;
}
.sv-hero-price {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
  background: linear-gradient(135deg, #fff7ed 0%, #ffffff 100%);
  border: 1px solid #fde68a;
  padding: 8px 8px 8px 16px;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(217, 119, 6, 0.25);
}
.sv-hero-price-tag {
  color: #b45309;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.sv-hero-price-note {
  background: #d97706;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 999px;
  white-space: nowrap;
}
.sv-hero-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.sv-hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.sv-hero-chip-blue {
  background: var(--blue-light);
  border: 1px solid var(--blue-border);
  color: #1e40af;
}
.sv-hero-chip-amber {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #c2410c;
}
@media (max-width: 560px) {
  .sv-hero-card { min-height: 380px; }
  .sv-hero-ribbon { top: 12px; right: -42px; font-size: 0.65rem; padding: 5px 44px; }
}

/* ---------- Form Card ---------- */
.sv-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}
.sv-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: 28px 26px 30px;
}
.sv-form-intro {
  margin-bottom: 22px;
}
.sv-form-intro h1 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--slate-900);
}
.sv-form-intro p {
  font-size: 0.9rem;
  color: var(--slate-500);
  margin-top: 4px;
}

.input-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.input-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 720px) {
  .input-grid-3, .input-grid-2 { grid-template-columns: 1fr; }
}

.form-group { margin-bottom: 16px; position: relative; }
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--slate-700);
  margin-bottom: 6px;
}
.form-label .req { color: #dc2626; margin-left: 2px; }

.form-control {
  width: 100%;
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--slate-900);
  background: #fff;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 11px 13px;
  transition: border-color .2s, box-shadow .2s;
}
.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--blue-light);
}
.form-control::placeholder { color: var(--slate-400); }
textarea.form-control { resize: vertical; min-height: 64px; }

.sv-section-divider {
  border: none;
  border-top: 1px dashed var(--border-light);
  margin: 22px 0;
}

/* ---------- Residential Homes themed section ---------- */
.dynamic-dropdown-section {
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border-light);
  margin: 18px 0;
  overflow: visible;
}
.dds-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.dds-badge-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dds-badge-text {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1rem;
}
.residential-theme-header {
  background: #eff6ff;
  border-bottom: 1.5px solid #bfdbfe;
  color: #1d4ed8;
}
.res-dot { background: #1d4ed8; }
.dds-body {
  padding: 18px 20px 4px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.dds-body .form-group:last-child,
.dds-body .input-grid-2 .form-group { margin-bottom: 16px; }
.sv-section-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--blue-primary);
  margin-bottom: 14px;
}

/* ---------- Custom single-select dropdown ---------- */
.ms-wrapper { position: relative; }
.ms-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  font-size: 0.92rem;
  color: var(--slate-400);
  background: #fff;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 11px 13px;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
}
.ms-wrapper.is-open { z-index: 15; }
.ms-trigger.open, .ms-trigger:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--blue-light);
  outline: none;
}
.ms-placeholder.has-value { color: var(--slate-900); font-weight: 500; }
.ms-arrow { flex-shrink: 0; color: var(--slate-400); transition: transform .2s; }
.ms-trigger.open .ms-arrow { transform: rotate(180deg); }

.ms-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 280px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 30;
}
.ms-dropdown.open { display: block; }
.ms-wrapper.drop-up .ms-dropdown {
  top: auto;
  bottom: calc(100% + 6px);
}

.ms-group-header {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--slate-500);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 8px 10px 4px;
}
.ms-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--slate-700);
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s;
}
.ms-option:hover { background: var(--blue-light); }
.ms-option .ms-check { opacity: 0; color: var(--blue-primary); font-size: 0.85rem; width: 14px; }
.ms-option.selected { background: var(--blue-light); color: var(--blue-primary); font-weight: 600; }
.ms-option.selected .ms-check { opacity: 1; }

/* ---------- Submit ---------- */
.sv-submit-row { margin-top: 8px; }
.btn-submit-main {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--blue-primary);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: none;
  border-radius: var(--radius-md);
  padding: 15px;
  cursor: pointer;
  transition: background .2s, transform .1s;
}
.btn-submit-main:hover { background: var(--blue-hover); }
.btn-submit-main:active { transform: scale(0.99); }

/* ---------- Loading Overlay ---------- */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 100;
  text-align: center;
  padding: 20px;
}
.loading-overlay.hidden { display: none; }
.loading-overlay div:last-child { color: #fff; }
.loading-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: sv-spin 0.8s linear infinite;
}
@keyframes sv-spin { to { transform: rotate(360deg); } }

/* ---------- Footer ---------- */
.sv-footer {
  text-align: center;
  padding: 20px;
  font-size: 0.8rem;
  color: var(--slate-400);
}
.sv-footer a { color: var(--slate-500); text-decoration: underline; }
