/*
===========================================
$30 OFF FIRST CLEANING POPUP (.wo-popup)
index.html #welcome-offer-popup -- native <dialog> with the standard short
quote form. All rules are scoped to .wo-popup so no other form changes.
Contrast: white text sits only on the navy-weighted gradient (#3a4ea7,
6.9:1); navy #3a4ea7 on white 6.9:1; gold #F4C95D is decorative only.
===========================================
*/

.wo-popup {
  --wo-navy: var(--primary-navy, #3a4ea7);
  --wo-navy-deep: #26357a;
  --wo-blue: var(--primary-blue, #00b4f0);
  --wo-gold: var(--accent-gold, #F4C95D);
  --wo-ink: #0f172a;
  --wo-muted: #475569;

  /* The site's global reset zeroes margins; restore native dialog centering. */
  position: fixed;
  inset: 0;
  margin: auto;
  height: fit-content;
  width: min(880px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: #fff;
  color: var(--wo-ink);
  box-shadow:
    0 2px 6px rgba(15, 23, 42, 0.08),
    0 30px 80px rgba(15, 23, 42, 0.35);
  overflow: hidden;
}

.wo-popup::backdrop {
  background: rgba(20, 28, 66, 0.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.wo-popup[open] {
  display: flex;
  animation: wo-popup-in 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes wo-popup-in {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .wo-popup[open] {
    animation: none;
  }
}

/* Desktop: the photo panel stays put; only the form column scrolls. */
.wo-popup__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  width: 100%;
  max-height: inherit;
  overflow: hidden;
}

/* ---------- left: photo + offer seal ---------- */
.wo-popup__art {
  position: relative;
  display: flex;
  flex-direction: column;
  color: #fff;
  overflow: hidden;
  background: var(--wo-navy);
}

.wo-popup__art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 45% center;
}

.wo-popup__art::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(38, 53, 122, 0.55) 0%, rgba(58, 78, 167, 0.05) 32%, rgba(58, 78, 167, 0.35) 55%, rgba(38, 53, 122, 0.97) 82%);
}

.wo-popup__art-content {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.75rem 1.75rem 2rem;
}

.wo-popup__seal {
  width: 118px;
  height: 118px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--wo-navy-deep);
  box-shadow:
    0 0 0 5px var(--wo-gold),
    0 0 0 9px rgba(255, 255, 255, 0.35),
    0 14px 30px rgba(15, 23, 42, 0.35);
  font-family: var(--font-heading, 'Poppins', sans-serif);
  line-height: 1;
  margin: 0.5rem 0 0 0.5rem;
  transform: rotate(-8deg);
}

.wo-popup__seal-amount {
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.wo-popup__seal-off {
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  margin-top: 0.2rem;
  padding-left: 0.3em; /* optically centre the tracked letters */
}

.wo-popup__perks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.7rem;
}

.wo-popup__perks li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: #fff;
}

.wo-popup__perks li::before {
  content: "\2713";
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: var(--wo-gold);
  font-size: 0.8rem;
  font-weight: 700;
}

/* ---------- right: headline + form ---------- */
.wo-popup__body {
  padding: 2rem 2.25rem 1.25rem;
  min-width: 0;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.wo-popup__eyebrow {
  display: inline-block;
  font-family: var(--font-heading, 'Poppins', sans-serif);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wo-navy);
  margin: 0 0 0.6rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--wo-gold);
}

.wo-popup h2 {
  font-family: var(--font-heading, 'Poppins', sans-serif);
  font-size: clamp(1.55rem, 3.2vw, 2.05rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--wo-ink);
  margin: 0 0 0.5rem;
  padding-right: 2.5rem; /* clear the close button */
}

.wo-popup h2 span {
  color: var(--wo-navy);
}

.wo-popup h2:focus {
  outline: none;
}

.wo-popup__lead {
  color: var(--wo-muted);
  font-size: 0.98rem;
  line-height: 1.55;
  margin: 0 0 1.1rem;
}

/* The popup is already the card: no second framed box around the form. */
.wo-popup .default-form {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

/* The popup headline replaces the form's numbered section header. */
.wo-popup .quote-section-header {
  display: none;
}

.wo-popup .quote-modal-mini .quote-form-section {
  padding: 0;
  border: none;
  margin-bottom: 0.5rem;
}

.wo-popup .quote-modal-mini .quote-modal-fields {
  gap: 0.65rem 0.85rem;
}

/* Email + phone side by side on wider screens. */
@media (min-width: 641px) {
  .wo-popup .quote-modal-fields > .quote-modal-field:nth-child(2),
  .wo-popup .quote-modal-fields > .quote-modal-field:nth-child(3) {
    grid-column: span 6;
  }
}

.wo-popup .quote-form-label {
  color: var(--wo-ink);
  font-weight: 600;
}

.wo-popup .quote-modal-mini .quote-form-control,
.wo-popup .quote-modal-mini select.quote-form-control {
  min-height: 46px;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
  border-radius: 12px;
  border: 1.5px solid #dbe3ee;
  background-color: #f8fafc;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.wo-popup .quote-form-control.quote-form-control--icon {
  padding-left: 2.4rem;
}

.wo-popup .quote-field-icon {
  left: 0.8rem;
}

.wo-popup .quote-modal-mini .quote-form-control:focus {
  border-color: var(--wo-navy);
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(58, 78, 167, 0.14);
  outline: none;
}

.wo-popup .quote-modal-field textarea.quote-form-control {
  min-height: 64px;
}

.wo-popup .quote-modal-mini .quote-captcha-wrapper {
  margin-top: 0.75rem;
}

.wo-popup .quote-submit-wrapper {
  margin-top: 0;
}

.wo-popup .quote-submit-btn {
  width: 100%;
  padding: 0.95rem 1.5rem;
  border-radius: 14px;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  background: linear-gradient(135deg, var(--wo-navy) 0%, var(--wo-navy-deep) 100%);
  box-shadow: 0 10px 24px rgba(58, 78, 167, 0.35);
}

.wo-popup .quote-submit-btn:hover {
  box-shadow: 0 14px 32px rgba(58, 78, 167, 0.45);
}

.wo-popup .quote-submit-note {
  font-size: 0.85rem;
  color: var(--wo-muted);
}

.wo-popup__later {
  display: block;
  margin: 0.6rem auto 0;
  min-height: 44px;
  padding: 0.5rem 1rem;
  background: transparent;
  border: 0;
  color: var(--wo-muted);
  font-size: 0.88rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.wo-popup__later:hover {
  color: var(--wo-ink);
}

.wo-popup__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: #f1f5f9;
  color: var(--wo-ink);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
  transition: background-color 150ms ease, color 150ms ease;
}

.wo-popup__close:hover {
  background: var(--wo-navy);
  color: #fff;
}

.wo-popup :focus-visible {
  outline: 3px solid var(--wo-navy);
  outline-offset: 2px;
}

/* ---------- phones: banner on top, form below ---------- */
@media (max-width: 640px) {
  .wo-popup {
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
    border-radius: 20px;
  }

  /* Phones: one scrolling column (banner scrolls away with the form). */
  .wo-popup__inner {
    grid-template-columns: 1fr;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .wo-popup__body {
    max-height: none;
    overflow: visible;
  }

  .wo-popup__art {
    height: 116px;
  }

  .wo-popup__art::after {
    background: linear-gradient(90deg, rgba(38, 53, 122, 0.92) 0%, rgba(58, 78, 167, 0.55) 45%, rgba(58, 78, 167, 0.1) 100%);
  }

  .wo-popup__art-content {
    justify-content: center;
    padding: 0 1.25rem;
  }

  .wo-popup__seal {
    width: 82px;
    height: 82px;
    margin: 0;
    box-shadow:
      0 0 0 4px var(--wo-gold),
      0 10px 22px rgba(15, 23, 42, 0.35);
  }

  .wo-popup__seal-amount {
    font-size: 1.6rem;
  }

  .wo-popup__seal-off {
    font-size: 0.7rem;
  }

  .wo-popup__perks {
    display: none;
  }

  .wo-popup__close {
    background: rgba(255, 255, 255, 0.92);
  }

  .wo-popup__body {
    padding: 1.25rem 1.25rem 1rem;
  }

  .wo-popup h2 {
    padding-right: 0;
  }
}
