/* ══ 10-second quote pop-up — main site (includes/quote-popup.php) ══
   Same look as the /custom-quote pop-up and the Pre-3D gate (css/gate-3d.css).
   Everything is scoped under .qp-modal and sets its own fonts/sizes so the
   main site's stylesheet (global h2/label/input rules) can't leak in. */
.qp-lock, .qp-lock body { overflow: hidden; }

.qp-modal {
  --qp-navy: #1a44b0;
  --qp-ink: #0A018C;
  --qp-green: #22D3A6;
  --qp-green-dark: #18A87B;
  position: fixed; inset: 0; z-index: 9990; /* under the 3D gate (10000) */
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-align: left;
}
.qp-modal[hidden] { display: none; }
.qp-modal *, .qp-modal *::before, .qp-modal *::after { box-sizing: border-box; }

.qp-backdrop {
  position: absolute; inset: 0;
  background: rgba(6,1,68,.55);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  opacity: 0; transition: opacity .25s ease;
}
.qp-dialog {
  position: relative; width: 100%; max-width: 480px;
  max-height: calc(100vh - 2rem); max-height: calc(100dvh - 2rem);
  overflow-y: auto; overscroll-behavior: contain; border-radius: 1.25rem;
  opacity: 0; transform: translateY(14px) scale(.98);
  transition: opacity .25s ease, transform .25s ease;
  outline: none;
}
.qp-modal.is-open .qp-backdrop { opacity: 1; }
.qp-modal.is-open .qp-dialog { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .qp-backdrop, .qp-dialog { transition: none; }
}

.qp-card {
  position: relative; background: #fff; border-radius: 1.25rem;
  padding: 0 1.6rem 1.4rem; text-align: center; color: #18181b;
  box-shadow: 0 30px 80px -10px rgba(0,0,0,.55);
}
/* Royal-blue logo band across the top of the card */
.qp-band {
  margin: 0 -1.6rem 1.1rem; padding: .9rem 1rem .8rem;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.035) 0 2px, transparent 2px 5px),
    var(--qp-navy);
  border-radius: 1.25rem 1.25rem 0 0;
}
.qp-modal .qp-logo { display: block; width: 104px; max-width: 104px; height: auto; margin: 0 auto; }

.qp-modal .qp-close {
  position: absolute; top: .7rem; right: .7rem; z-index: 2;
  width: 34px; height: 34px; padding: 0; margin: 0; border-radius: 50%; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: transparent; color: rgba(255,255,255,.8); box-shadow: none;
  transition: background .15s, color .15s;
}
.qp-modal .qp-close:hover { background: rgba(255,255,255,.12); color: #fff; }
.qp-modal .qp-close svg { width: 18px; height: 18px; }

.qp-modal .qp-title {
  margin: 0 0 .5rem; padding: 0; font-family: inherit; text-transform: none; letter-spacing: 0;
  font-size: 1.3rem; font-weight: 800; color: #18181b; line-height: 1.25;
}
.qp-modal .qp-sub { margin: 0 0 1.25rem; padding: 0; font-size: .9rem; color: #3f3f46; line-height: 1.5; }
.qp-modal .qp-form { margin: 0; text-align: left; }

.qp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .9rem; }
.qp-modal .qp-field { margin: 0 0 .75rem; min-width: 0; }
.qp-modal .qp-field label {
  display: block; margin: 0 0 .3rem; padding: 0;
  font-size: .8rem; font-weight: 700; color: #18181b; text-transform: none; letter-spacing: 0; line-height: 1.3;
}
.qp-modal .qp-req { color: #d1345b; }
.qp-input-wrap { position: relative; }
.qp-input-wrap > svg {
  position: absolute; left: .8rem; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: #8b93a7; pointer-events: none;
}
.qp-modal .qp-field input,
.qp-modal .qp-field select {
  display: block; width: 100%; height: auto; margin: 0;
  padding: .65rem 1rem .65rem 2.45rem;
  background-color: #fff; border: 1.5px solid #e4e4ea; border-radius: .6rem; box-shadow: none;
  font-family: inherit; font-size: .9rem; line-height: 1.3; color: #18181b;
  outline: none; transition: border-color .15s, background-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
.qp-modal .qp-field select {
  padding-right: 2.25rem; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; cursor: pointer;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3e%3cpath fill='%2352525b' d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/%3e%3c/svg%3e");
  background-repeat: no-repeat; background-position: right .75rem center; background-size: 12px;
}
.qp-modal .qp-field input::placeholder { color: #9ca3af; opacity: 1; }
.qp-modal .qp-field input:focus,
.qp-modal .qp-field select:focus {
  border-color: var(--qp-green-dark); box-shadow: 0 0 0 3px rgba(34,211,166,.18);
}
.qp-field--error input, .qp-field--error select { border-color: #d1345b !important; background-color: #fff5f7 !important; }
.qp-field__error-msg { display: block; color: #d1345b; font-size: .72rem; font-weight: 600; margin-top: .35rem; }

.qp-needs-divider { display: flex; align-items: center; gap: .7rem; margin: .4rem 0 .9rem; }
.qp-needs-line { flex: 1; height: 1px; background: #e4e4ea; }
.qp-needs-text {
  font-size: .78rem; font-weight: 800; color: var(--qp-navy);
  letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
}

.qp-modal .qp-submit {
  display: block; width: 100%; margin: .9rem 0 0; padding: .95rem 1rem;
  border: none; border-radius: .6rem; cursor: pointer;
  background: linear-gradient(180deg, #22b573 0%, #18995f 100%); color: #fff;
  font-family: inherit; font-size: .95rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; line-height: 1.25;
  box-shadow: 0 10px 22px -10px rgba(24,153,95,.8);
  transition: transform .2s, filter .2s;
}
.qp-modal .qp-submit:hover { transform: translateY(-1px); filter: brightness(1.06); }
.qp-modal .qp-submit:disabled { opacity: .75; cursor: default; transform: none; }
.qp-modal .qp-fineprint { margin: .7rem 0 0; padding: 0; font-size: .74rem; color: #52525b; text-align: center; line-height: 1.45; }

/* OR divider + 3D / call buttons */
.qp-or {
  display: flex; align-items: center; gap: .8rem; margin: 1.1rem 0 .9rem;
  font-size: .78rem; font-weight: 800; color: #6b7280; letter-spacing: .08em;
}
.qp-or::before, .qp-or::after { content: ""; flex: 1; height: 1px; background: #d4d4dc; }
.qp-alt-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.qp-modal .qp-alt-btn {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem .75rem; border-radius: .6rem;
  color: #fff; text-decoration: none; text-transform: uppercase; text-align: center;
  font-weight: 800; font-size: .88rem; letter-spacing: .02em; line-height: 1.2;
  transition: transform .2s, filter .2s;
}
.qp-modal .qp-alt-btn:hover { transform: translateY(-1px); filter: brightness(1.08); color: #fff; }
.qp-alt-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.qp-alt-btn--3d {
  background: linear-gradient(180deg, #17a777 0%, #0f8660 100%);
  border: 2px solid var(--qp-green);
  box-shadow: 0 8px 18px -8px rgba(15,134,96,.7);
}
.qp-alt-btn--call {
  background: var(--qp-navy);
  border: 2px solid transparent;
  box-shadow: 0 8px 18px -8px rgba(26,68,176,.7);
}

@media (max-width: 560px) {
  .qp-row { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .qp-modal { padding: .6rem; }
  .qp-dialog { max-height: calc(100vh - 1.2rem); max-height: calc(100dvh - 1.2rem); }
  .qp-card { padding: 0 1rem 1.2rem; }
  .qp-band { margin: 0 -1rem 1rem; }
}
@media (max-width: 420px) {
  .qp-alt-actions { grid-template-columns: 1fr; }
}
