/* ═══════════════════════════════════════════
   ALJ Heating & Cooling — Global Form Popup
   Apply to every page via <link rel="stylesheet" href="./css/form-popup.css">
═══════════════════════════════════════════ */

/* ── Overlay ── */
.fp-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(3, 33, 107, 0.72);
  z-index: 9990;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: fpFadeIn .22s ease;
}
.fp-overlay.open { display: block; }

/* ── Popup container ── */
.fp-popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%);
  width: 92%;
  max-width: 520px;
  max-height: 92vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  z-index: 9999;
  box-shadow: 0 24px 80px rgba(1, 54, 168, 0.25);
  animation: fpSlideUp .28s cubic-bezier(.34,1.56,.64,1);
}
.fp-popup.open { display: block; }

/* ── Header ── */
.fp-header {
  background: linear-gradient(135deg, #03216B 0%, #0136A8 100%);
  padding: 24px 28px 20px;
  border-radius: 16px 16px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.fp-header__left { display: flex; align-items: center; gap: 12px; }
.fp-header__logo { height: 40px; width: auto; }
.fp-header__title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}
.fp-header__sub {
  font-size: .75rem;
  color: rgba(255,255,255,.7);
  font-weight: 600;
  margin-top: 2px;
}
.fp-close {
  background: rgba(255,255,255,.12);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .2s;
}
.fp-close:hover { background: rgba(255,255,255,.25); }

/* ── Body ── */
.fp-body { padding: 24px 28px 28px; }

.fp-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.fp-field { margin-bottom: 14px; }
.fp-field:last-of-type { margin-bottom: 0; }

.fp-label {
  display: block;
  font-size: .8rem;
  font-weight: 700;
  color: #03216B;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.fp-label span { color: #FA6C2B; }

.fp-input,
.fp-select,
.fp-textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #dde3ef;
  border-radius: 8px;
  font-family: 'Mulish', sans-serif;
  font-size: .93rem;
  color: #1e293b;
  background: #f8faff;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  -webkit-appearance: none;
}
.fp-input:focus,
.fp-select:focus,
.fp-textarea:focus {
  border-color: #0136A8;
  box-shadow: 0 0 0 3px rgba(1,54,168,.1);
  background: #fff;
}
.fp-input::placeholder,
.fp-textarea::placeholder { color: #a0aec0; }
.fp-textarea { resize: vertical; min-height: 88px; }
.fp-select { cursor: pointer; }

/* ── Submit ── */
.fp-submit {
  width: 100%;
  margin-top: 20px;
  padding: 14px;
  background: #FA6C2B;
  color: #fff;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: .5px;
  transition: background .2s, transform .15s, box-shadow .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.fp-submit:hover {
  background: #e05818;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(250,108,43,.35);
}
.fp-submit svg { width: 18px; height: 18px; }

/* ── Trust line ── */
.fp-trust {
  text-align: center;
  font-size: .75rem;
  color: #64748b;
  margin-top: 12px;
}
.fp-trust strong { color: #0136A8; }

/* ── Animations ── */
@keyframes fpFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fpSlideUp {
  from { opacity: 0; transform: translate(-50%, -44%); }
  to   { opacity: 1; transform: translate(-50%, -48%); }
}

/* ── Mobile ── */
@media (max-width: 540px) {
  .fp-popup { width: 96%; max-height: 96vh; border-radius: 12px; }
  .fp-header { padding: 18px 20px 16px; }
  .fp-body { padding: 18px 20px 22px; }
  .fp-row { grid-template-columns: 1fr; gap: 0; }
}
