/* =========================================================
   PROMPT 4A, A5 - Home consultation popup (navy/white, no boxes inside
   boxes). Loaded on Home only.
   ========================================================= */
.dv-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(16,38,62, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--m-duration-base) var(--m-ease-out);
}
/* The [hidden] attribute is removed once JS opens the popup for the
   first time; before that, this author rule's `display: flex` above
   would otherwise outrank the UA stylesheet's `display: none` for
   [hidden] (author origin always wins), leaving an invisible but
   still-laid-out flex box. This rule keeps it genuinely unrendered. */
.dv-popup-overlay[hidden] { display: none; }
.dv-popup-overlay.is-open { opacity: 1; visibility: visible; }
.dv-popup-dialog {
  position: relative;
  background: var(--white);
  color: var(--navy);
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(16,38,62, .35);
  padding: 2.25rem;
  transform: translateY(16px) scale(.98);
  transition: transform var(--m-duration-base) var(--m-ease-out);
}
.dv-popup-overlay.is-open .dv-popup-dialog { transform: translateY(0) scale(1); }
.dv-popup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--offwhite);
  color: var(--navy);
  border: none;
  cursor: pointer;
}
.dv-popup-close:hover { background: var(--teal-tint); }
.dv-popup-form-wrap h2:first-child { padding-right: 2rem; }
body.dv-popup-locked { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .dv-popup-overlay,
  .dv-popup-dialog { transition: none; }
}

@media (max-width: 640px) {
  .dv-popup-overlay { align-items: flex-end; padding: 0; }
  .dv-popup-dialog {
    max-width: none;
    width: 100%;
    max-height: 86vh;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
  }
  .dv-popup-overlay.is-open .dv-popup-dialog { transform: translateY(0); }
}
