/* ============================================================
   Zeus Illumination — Estimate Popup
   ============================================================ */

#zeus-popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#zeus-popup-overlay.zeus-popup-visible {
  opacity: 1;
}

#zeus-popup-modal {
  background: #0A0F1E;
  border: 1px solid #1E2A3A;
  border-radius: 14px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.5rem 2rem 2rem;
  position: relative;
  transform: scale(0.92);
  transition: transform 0.3s ease;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
}

#zeus-popup-overlay.zeus-popup-visible #zeus-popup-modal {
  transform: scale(1);
}

#zeus-popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: #6B7280;
  font-size: 1.375rem;
  line-height: 1;
  cursor: pointer;
  /* 44×44px tap target (Apple HIG) — padding fills the hit area, icon stays same size */
  padding: 0;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.2s ease;
}

#zeus-popup-close:hover {
  color: #ffffff;
}

.zeus-popup-eyebrow {
  color: #F5A623;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
}

.zeus-popup-headline {
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 0.5rem;
}

.zeus-popup-subhead {
  color: #9CA3AF;
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 0 0 1.5rem;
}

/* Mobile: bottom sheet with safe-area top inset */
@media (max-width: 768px) {
  #zeus-popup-overlay {
    /* Reserve space at the top: respects Dynamic Island/notch, min 80px on flat devices */
    padding: max(env(safe-area-inset-top), 80px) 0 0;
    align-items: flex-end;
  }

  #zeus-popup-modal {
    max-width: 100%;
    border-radius: 14px 14px 0 0;
    border-bottom: none;
    /* 100% of the padded container — not 95vh — so modal never bleeds into safe area */
    max-height: 100%;
    transform: translateY(40px);
  }

  #zeus-popup-overlay.zeus-popup-visible #zeus-popup-modal {
    transform: translateY(0);
  }

  /* X button: 20px inset so it clears the rounded top corners and thumb-zone nicely */
  #zeus-popup-close {
    top: 1.25rem;
    right: 1.25rem;
  }
}
