/* Compelling lead capture popup — shown after 3 listing views */

.lead-modal-dialog--capture,
.lead-modal-dialog--welcome {
  border: 2px solid rgba(139, 101, 133, 0.55);
  box-shadow:
    0 24px 80px rgba(25, 20, 24, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.lead-modal-dialog--welcome {
  border-color: rgba(139, 101, 133, 0.45);
}

.lead-modal-dialog--capture .lead-modal-header,
.lead-modal-dialog--welcome .lead-modal-header {
  background: linear-gradient(135deg, #2e212c 0%, #342030 48%, #5c3856 100%);
  color: #fff;
  padding: 1.35rem 1.35rem 1rem;
  margin: 0;
  border-bottom: none;
}

.lead-modal-dialog--welcome .lead-modal-header {
  background: linear-gradient(135deg, #271b25 0%, #50314b 52%, #684061 100%);
}

.lead-modal-dialog--welcome .lead-modal-header #lead-modal-title::before {
  content: '👋 ';
}

.lead-modal-dialog--capture .lead-modal-header #lead-modal-title,
.lead-modal-dialog--welcome .lead-modal-header #lead-modal-title {
  color: #fff;
  font-size: 1.35rem;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.lead-modal-dialog--capture .lead-modal-header .lead-modal-lead,
.lead-modal-dialog--welcome .lead-modal-header .lead-modal-lead {
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.95rem;
  line-height: 1.45;
  margin-top: 0.45rem;
}

.lead-modal-dialog--capture .lead-modal-kw {
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

.lead-popup-perks {
  list-style: none;
  margin: 0;
  padding: 0.85rem 1.25rem 0.25rem;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border-bottom: 1px solid rgba(25, 20, 24, 0.08);
}

.lead-popup-perks li {
  position: relative;
  padding: 0.35rem 0 0.35rem 1.65rem;
  font-size: 0.88rem;
  line-height: 1.4;
  color: #322730;
}

.lead-popup-perks li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  background: #8b6585;
  color: #2e212c;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lead-modal-dialog--capture .lead-modal-body {
  padding-top: 0.75rem;
}

.lead-modal-dialog--capture #lead-modal-submit,
.lead-modal-dialog--capture .lead-step-actions .btn-gold {
  background: linear-gradient(180deg, #997292 0%, #8b6585 100%);
  border-color: #7d5a77;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: none;
  box-shadow: 0 4px 14px rgba(139, 101, 133, 0.35);
}

.lead-modal-dialog--capture #lead-modal-submit:hover {
  filter: brightness(1.05);
}

@media (min-width: 769px) {
  .lead-modal-dialog--capture {
    width: min(540px, calc(100vw - 2rem));
  }
}

/* Floating “Get alerts” button — always available, non-blocking */
.swmo-lead-fab {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right, 0px));
  bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  z-index: 12000;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  max-width: min(280px, calc(100vw - 2rem));
  padding: 0.65rem 0.85rem 0.65rem 0.7rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #2e212c 0%, #342030 55%, #5c3856 100%);
  color: #fff;
  box-shadow: 0 10px 32px rgba(25, 20, 24, 0.35);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s ease, transform 0.35s ease, box-shadow 0.2s ease;
  pointer-events: none;
}

.swmo-lead-fab.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.swmo-lead-fab:hover {
  box-shadow: 0 14px 36px rgba(25, 20, 24, 0.42);
}

.swmo-lead-fab__icon {
  font-size: 1.25rem;
  line-height: 1;
}

.swmo-lead-fab__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  line-height: 1.2;
}

.swmo-lead-fab__text strong {
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.swmo-lead-fab__text span {
  font-size: 0.72rem;
  opacity: 0.88;
}

body.listing-modal-open .swmo-lead-fab,
body.lead-modal-open .swmo-lead-fab {
  opacity: 0 !important;
  pointer-events: none !important;
}

.swmo-saved-trigger { border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; min-height: 44px; padding: 8px 12px; }
.swmo-saved-homes { width: min(900px, calc(100% - 24px)); max-height: 85dvh; border: 1px solid #c8bbc6; border-radius: 20px; padding: 24px; background: #edf3f0; color: #362533; box-sizing: border-box; }
.swmo-saved-homes::backdrop { background: rgba(26, 20, 25,.65); }
.swmo-saved-homes > header { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.swmo-saved-homes h2 { margin: 0; font-size: 28px; }
.swmo-saved-homes header p { margin: 0 0 4px; color: #6b5567; }
.swmo-saved-homes button { min-height: 44px; padding: 8px 14px; border: 1px solid #c8bbc6; border-radius: 10px; color: #362533; background: #fff; font: inherit; cursor: pointer; }
.swmo-saved-homes button:disabled { opacity: .45; cursor: default; }
.swmo-saved-intro, .swmo-saved-card p { color: #6b5567; line-height: 1.5; }
.swmo-saved-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.swmo-saved-card { background: #fff; border: 1px solid #dbd4da; border-radius: 14px; padding: 16px; overflow: hidden; }
.swmo-saved-card img { width: 100%; height: 180px; object-fit: cover; border-radius: 8px; }
.swmo-saved-card h3 { font-size: 18px; line-height: 1.4; margin: 12px 0 8px; overflow-wrap: anywhere; }
.swmo-saved-card a { display: inline-block; padding: 11px 16px; color: #fff; background: #3b2838; border-radius: 8px; text-decoration: none; }
.swmo-saved-empty { grid-column: 1 / -1; line-height: 1.6; padding: 22px; background: #fff; border-radius: 12px; }
.swmo-saved-homes footer { margin-top: 20px; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
@media (max-width: 600px) { .swmo-saved-list { grid-template-columns: 1fr; } .swmo-saved-homes { padding: 18px; } }
.swmo-listing-help {
  margin-top: 18px; padding: 20px; border: 1px solid #d9d1d8;
  border-radius: 16px; background: linear-gradient(120deg, #f3f0f2, #f3f5ef);
  color: #362533; text-align: left; width: 100%; box-sizing: border-box;
}
.swmo-listing-help h3 { margin: 0 0 8px; font-size: 20px; font-weight: 750; }
.swmo-listing-help p { margin: 0; line-height: 1.55; font-size: 14px; color: #5e4b5b; }
.swmo-listing-help__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; }
.swmo-listing-help__actions button {
  min-height: 44px; padding: 11px 16px; border-radius: 10px; border: 1px solid #3b2838;
  background: #3b2838; color: #fff; font: inherit; font-size: 14px; font-weight: 650; cursor: pointer;
}
.swmo-listing-help__actions button + button { background: transparent; color: #3b2838; }
.swmo-listing-help__actions button:focus-visible { outline: 3px solid #876281; outline-offset: 3px; }
.swmo-listing-finance { margin-top: 18px; padding-top: 18px; border-top: 1px solid #d9d1d8; }
.swmo-listing-finance p { margin-top: 6px; font-size: 13px; }
.swmo-listing-finance button { margin-top: 12px; min-height: 44px; padding: 10px 16px; border: 1px solid #3b2838; border-radius: 10px; background: #fff; color: #3b2838; font: inherit; cursor: pointer; }
@media (max-width: 480px) {
  .swmo-listing-help__actions button { width: 100%; }
  .swmo-lead-fab__text span {
    display: none;
  }
  .swmo-lead-fab {
    padding: 0.75rem 1rem;
  }
}
