/**
 * PV Appointment Finder — Global Lead Capture Styles
 * Version: 2.0
 * Covers: Facility detail modal + alert bar + success states
 * Design system: PV navy (#0b417d) + PV green (#00a651)
 */

/* ── Reset ──────────────────────────────────────────────────────────────── */
#pvaf-modal-overlay *,
#pvaf-modal-overlay *::before,
#pvaf-modal-overlay *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Overlay ─────────────────────────────────────────────────────────────── */
#pvaf-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.55);
  overflow-y: auto;
  align-items: flex-start;
  justify-content: center;
  padding: 20px 16px 40px;
  -webkit-overflow-scrolling: touch;
}
#pvaf-modal-overlay.pvaf-open {
  display: flex;
}

/* ── Modal box ───────────────────────────────────────────────────────────── */
#pvaf-modal-box {
  background: #fff;
  border-radius: 18px;
  width: 100%;
  max-width: 500px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
  margin: auto;
  position: relative;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  animation: pvaf-slide-up 0.22s ease-out;
}

@keyframes pvaf-slide-up {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ── Modal header (navy) ─────────────────────────────────────────────────── */
#pvaf-modal-header {
  background: #0b417d;
  color: #fff;
  padding: 20px 20px 18px;
  position: relative;
}

.pvaf-m-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.65);
  text-transform: uppercase;
  margin-bottom: 4px;
}

#pvaf-modal-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.2px;
  line-height: 1.2;
  margin-bottom: 5px;
}

.pvaf-m-address {
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  line-height: 1.4;
}

.pvaf-m-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  line-height: 1;
}
.pvaf-m-close:hover {
  background: rgba(255,255,255,0.25);
}

/* ── Modal body ──────────────────────────────────────────────────────────── */
#pvaf-modal-body {
  padding: 20px 20px 22px;
}

/* ── Stats row ───────────────────────────────────────────────────────────── */
.pvaf-m-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}

.pvaf-stat-box {
  flex: 1;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pvaf-stat-label {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.pvaf-stat-val {
  font-size: 17px;
  font-weight: 800;
  color: #0b417d;
  line-height: 1.2;
}

/* ── Walk-in bar ─────────────────────────────────────────────────────────── */
.pvaf-m-walkin {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 9px;
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #166534;
  align-items: center;
  gap: 8px;
}

.pvaf-walkin-check {
  font-size: 15px;
  color: #00a651;
  flex-shrink: 0;
}

/* ── Phone ───────────────────────────────────────────────────────────────── */
.pvaf-m-phone {
  font-size: 14px;
  color: #334155;
  margin-bottom: 12px;
}

.pvaf-m-phone a {
  color: #0b417d;
  font-weight: 700;
  text-decoration: none;
}
.pvaf-m-phone a:hover {
  text-decoration: underline;
}

/* ── Lead pitch ──────────────────────────────────────────────────────────── */
.pvaf-m-pitch {
  font-size: 13px;
  color: #475569;
  line-height: 1.55;
  margin-bottom: 14px;
}

.pvaf-m-pitch strong {
  color: #0b417d;
  font-weight: 700;
}

/* ── Form inputs ─────────────────────────────────────────────────────────── */
.pvaf-m-input {
  display: block;
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: #1e293b;
  background: #fff;
  margin-bottom: 9px;
  transition: border-color 0.15s;
  outline: none;
  -webkit-appearance: none;
}

.pvaf-m-input:focus {
  border-color: #0b417d;
  box-shadow: 0 0 0 3px rgba(11, 65, 125, 0.1);
}

.pvaf-m-input::placeholder {
  color: #94a3b8;
}

/* ── Primary CTA button ──────────────────────────────────────────────────── */
.pvaf-m-btn-primary {
  display: block;
  width: 100%;
  padding: 15px 20px;
  background: #00a651;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s, transform 0.1s;
  margin-bottom: 10px;
  letter-spacing: 0.2px;
}

.pvaf-m-btn-primary:hover {
  background: #009043;
}

.pvaf-m-btn-primary:active {
  transform: scale(0.98);
}

.pvaf-m-btn-primary:disabled {
  background: #94a3b8;
  cursor: not-allowed;
  transform: none;
}

/* ── Trust line ──────────────────────────────────────────────────────────── */
.pvaf-m-trust {
  text-align: center;
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 16px;
}

/* ── Message (error/info) ────────────────────────────────────────────────── */
.pvaf-m-msg {
  padding: 9px 13px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 10px;
}
.pvaf-m-msg--error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}
.pvaf-m-msg--success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

/* ── Success state ───────────────────────────────────────────────────────── */
.pvaf-m-success {
  text-align: center;
  padding: 12px 0 8px;
}

.pvaf-success-icon {
  width: 52px;
  height: 52px;
  background: #f0fdf4;
  border: 2px solid #00a651;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #00a651;
  margin: 0 auto 12px;
}

.pvaf-success-title {
  font-size: 17px;
  font-weight: 800;
  color: #166534;
  margin-bottom: 6px;
}

.pvaf-success-sub {
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
}

/* ── Upsell link ─────────────────────────────────────────────────────────── */
.pvaf-m-upsell {
  text-align: center;
  font-size: 13px;
  color: #64748b;
  border-top: 1px solid #f1f5f9;
  padding-top: 14px;
  margin-top: 4px;
}

.pvaf-m-upsell a {
  color: #0b417d;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Alert bar (inline on page, not modal) ───────────────────────────────── */
.pvaf-alert-bar {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 36px 20px;
  text-align: center;
}

.pvaf-alert-bar-title {
  font-size: 22px;
  font-weight: 800;
  color: #0b417d;
  margin-bottom: 6px;
}

.pvaf-alert-bar-sub {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 20px;
}

.pvaf-alert-row {
  display: flex;
  gap: 10px;
  max-width: 460px;
  margin: 0 auto;
  align-items: center;
}

.pvaf-alert-email {
  flex: 1;
  padding: 14px 18px;
  border: 1.5px solid #e2e8f0;
  border-radius: 100px;
  font-size: 14px;
  font-family: inherit;
  color: #1e293b;
  background: #fff;
  outline: none;
  -webkit-appearance: none;
  transition: border-color 0.15s;
}
.pvaf-alert-email:focus {
  border-color: #0b417d;
}
.pvaf-alert-email::placeholder {
  color: #94a3b8;
}

.pvaf-alert-btn {
  padding: 14px 22px;
  background: #00a651;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.pvaf-alert-btn:hover {
  background: #009043;
}
.pvaf-alert-btn:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

.pvaf-alert-msg {
  font-size: 12px;
  color: #00a651;
  margin-top: 8px;
  text-align: center;
}

/* ── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 520px) {
  #pvaf-modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  #pvaf-modal-box {
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    animation: pvaf-slide-up-mobile 0.22s ease-out;
  }

  @keyframes pvaf-slide-up-mobile {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
  }

  .pvaf-alert-row {
    flex-direction: column;
  }

  .pvaf-alert-email,
  .pvaf-alert-btn {
    width: 100%;
  }
}
