/* =====================================================
   POPUP MODAL — shared between public site and admin preview
   Single source of truth. Edit here, both sides update.
   ===================================================== */

.popup-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: radial-gradient(ellipse at center, rgba(15,33,55,.55) 0%, rgba(0,0,0,.75) 100%);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  animation: popupOverlayIn .35s ease both;
}
.popup-overlay[hidden] { display: none; }
@keyframes popupOverlayIn { from { opacity: 0; } to { opacity: 1; } }

.popup-modal {
  background: #fff;
  border-radius: 24px;
  max-width: 440px; width: 100%;
  padding: 0;
  text-align: center;
  box-shadow:
    0 40px 80px -20px rgba(15, 33, 55, .55),
    0 0 0 1px rgba(15, 33, 55, .05);
  position: relative;
  overflow: hidden;
  animation: popupIn .45s cubic-bezier(.16,1,.3,1) both;
}

@keyframes popupIn {
  from { opacity: 0; transform: scale(.9) translateY(30px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* === Colored header band === */
.popup-header {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 55%, #b91c1c 100%);
  padding: 36px 36px 56px;
  position: relative;
  overflow: hidden;
}
.popup-header::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.18) 0%, transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(0,0,0,.10) 0%, transparent 50%);
  pointer-events: none;
}
.popup-header::after {
  content: "";
  position: absolute; left: -10%; right: -10%; bottom: -30px;
  height: 60px;
  background: #fff;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.popup-title {
  position: relative; z-index: 1;
  font-family: var(--font-display, "Plus Jakarta Sans", Inter, system-ui, sans-serif);
  font-size: 32px; font-weight: 800;
  margin: 0;
  color: #fff;
  letter-spacing: -.02em;
  line-height: 1.1;
  text-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.popup-close {
  position: absolute; top: 14px; right: 14px; z-index: 10;
  background: rgba(255,255,255,.22); border: none;
  font-size: 16px; color: #fff;
  cursor: pointer; line-height: 1;
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: transform .25s ease, background .2s ease;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.popup-close:hover { background: rgba(255,255,255,.4); transform: rotate(90deg) scale(1.08); }

.popup-image {
  width: 100%; margin: 0; border-radius: 0;
  display: block;
}

/* === Tagline (eyebrow row between header and body) === */
.popup-tagline {
  margin: 16px 36px 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--accent, #dc2626);
  text-transform: none;
  line-height: 1.4;
}

/* === Body / offer copy === */
.popup-body {
  padding: 12px 36px 4px;
  font-size: 15.5px; color: var(--gray-700, #4b5563);
  line-height: 1.7;
  margin: 0;
}
.popup-body strong { color: var(--primary, #1e3a5f); }
.popup-body p { margin: 0 0 8px; }
.popup-body p:last-child { margin-bottom: 0; }

/* === Phones section (label + pill row) === */
.popup-phones-section {
  margin: 20px 32px 4px;
  padding-top: 18px;
  border-top: 1px dashed rgba(15, 33, 55, .12);
}
.popup-phones-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gray-600, #6b7280);
  margin: 0 0 10px;
}
.popup-phones-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

/* === Phone pill buttons (used by both structured phones[] and inline linkified body) === */
.popup-phone-pill {
  display: inline-block;
  margin: 0;
  padding: 11px 22px;
  border: 2px solid var(--accent, #dc2626);
  background: #fff;
  color: var(--accent, #dc2626);
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  letter-spacing: .01em;
  transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
  white-space: nowrap;
  cursor: pointer;
}
.popup-phone-pill::before {
  content: "\f095"; /* fa-phone */
  font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", FontAwesome;
  font-weight: 900;
  margin-right: 8px;
  font-size: 12px;
  opacity: .9;
}
.popup-phone-pill:hover {
  background: var(--accent, #dc2626);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px -4px rgba(220,38,38,.5);
}

/* === CTA button === */
.popup-cta {
  display: block;
  margin: 24px 32px 32px;
  padding: 16px 28px;
  font-size: 17px; font-weight: 700;
  border-radius: 14px;
  letter-spacing: .01em;
  box-shadow:
    0 12px 24px -6px rgba(220, 38, 38, .5),
    0 2px 4px rgba(220, 38, 38, .25);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.popup-cta:hover {
  transform: translateY(-2px);
  box-shadow:
    0 18px 32px -8px rgba(220, 38, 38, .6),
    0 4px 8px rgba(220, 38, 38, .3);
  filter: brightness(1.05);
}
.popup-cta:active { transform: translateY(0); }
.popup-cta i { margin-right: 8px; }

@media (max-width: 480px) {
  .popup-modal { border-radius: 18px; max-width: 380px; }
  .popup-header { padding: 28px 24px 48px; }
  .popup-title { font-size: 26px; }
  .popup-tagline { margin: 14px 24px 0; font-size: 13px; }
  .popup-body { padding: 10px 24px 0; font-size: 15px; }
  .popup-phones-section { margin: 18px 24px 4px; }
  .popup-phone-pill { padding: 10px 18px; font-size: 14px; }
  .popup-cta { margin: 20px 24px 24px; font-size: 16px; padding: 14px 22px; }
}
