/* callback-popup.css — BizOfficer "Request a Callback" popup
   Self-contained: uses the site's --blue / --blue-d / --accent vars when present, with fallbacks.
   Desktop: centred modal. Mobile (<=600px): compact bottom sheet. No external fonts or icon fonts. */

.cbp{
  --cbp-blue:var(--blue,#1349a3);
  --cbp-blue-d:var(--blue-d,#0b2f6e);
  --cbp-accent:var(--accent,#4973ff);
  --cbp-ink:var(--ink,#14213d);
  --cbp-muted:var(--muted,#5b6578);
  --cbp-line:#cfd8ea;
  --cbp-err:#c0262d;
  position:fixed;inset:0;z-index:1100; /* above .wa-float (1001) and sticky header */
  display:flex;align-items:center;justify-content:center;padding:16px;
  font:16px/1.6 system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  color:var(--cbp-ink);
}
.cbp[hidden]{display:none}
.cbp *,.cbp *::before,.cbp *::after{box-sizing:border-box}

.cbp-backdrop{
  position:absolute;inset:0;background:rgba(8,22,50,.55);
  opacity:0;transition:opacity .25s ease;
}
.cbp.is-open .cbp-backdrop{opacity:1}

/* Dialog */
.cbp-dialog{
  position:relative;width:100%;max-width:430px;max-height:calc(100vh - 32px);overflow:auto;
  background:#fff;border-radius:18px;box-shadow:0 30px 70px rgba(8,30,75,.35);
  opacity:0;transform:translateY(16px) scale(.97);
  transition:opacity .25s ease,transform .25s ease;
  outline:none;
}
.cbp.is-open .cbp-dialog{opacity:1;transform:none}

.cbp-close{
  position:absolute;top:12px;right:12px;z-index:2;
  width:36px;height:36px;border-radius:50%;border:0;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  background:rgba(255,255,255,.16);color:#fff;transition:background .2s;
}
.cbp-close:hover{background:rgba(255,255,255,.3)}
.cbp-close:focus-visible{outline:3px solid #fff;outline-offset:2px}
.cbp-close svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:2.4;stroke-linecap:round}

.cbp-handle{display:none}

/* Header band */
.cbp-head{
  display:flex;align-items:center;gap:14px;
  padding:22px 56px 20px 24px;
  background:linear-gradient(135deg,var(--cbp-blue-d) 0%,var(--cbp-blue) 100%);
  color:#fff;
}
.cbp-icon{
  flex:none;width:48px;height:48px;border-radius:14px;
  display:flex;align-items:center;justify-content:center;
  background:rgba(255,255,255,.14);
}
.cbp-icon svg{width:26px;height:26px;stroke:#fff;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.cbp-kicker{display:block;font-size:.75rem;font-weight:700;letter-spacing:.09em;text-transform:uppercase;color:#cfdcf7}
.cbp-title{margin:2px 0 0;font-size:1.45rem;line-height:1.2;color:#fff}

/* Body */
.cbp-body{padding:20px 24px 24px}
.cbp-lead{margin:0 0 4px;font-weight:700;font-size:1.02rem;color:var(--cbp-ink)}
.cbp-sub{margin:0 0 16px;font-size:.93rem;color:var(--cbp-muted)}

.cbp-field{margin-bottom:12px}
.cbp-field label{display:block;margin-bottom:5px;font-weight:600;font-size:.9rem;color:var(--cbp-ink)}
.cbp-field label span{color:var(--cbp-err)}
.cbp-input{
  display:block;width:100%;padding:12px 14px;
  font:inherit;font-size:16px; /* 16px stops iOS zoom-on-focus */
  color:var(--cbp-ink);background:#fff;
  border:1px solid var(--cbp-line);border-radius:10px;
  transition:border-color .2s,box-shadow .2s;
}
.cbp-input::placeholder{color:#97a1b4}
.cbp-input:focus{outline:none;border-color:var(--cbp-accent);box-shadow:0 0 0 3px rgba(73,115,255,.25)}
.cbp-input[aria-invalid="true"]{border-color:var(--cbp-err)}
.cbp-input[aria-invalid="true"]:focus{box-shadow:0 0 0 3px rgba(192,38,45,.18)}
.cbp-err{display:block;min-height:0;font-size:.82rem;color:var(--cbp-err)}
.cbp-err:not(:empty){margin-top:4px}

.cbp-hp{position:absolute!important;left:-9999px!important;width:1px;height:1px;overflow:hidden}

.cbp-submit{
  display:flex;align-items:center;justify-content:center;gap:9px;
  width:100%;margin-top:6px;padding:13px 22px;
  font:inherit;font-weight:700;font-size:1rem;
  color:#fff;background:var(--cbp-blue);
  border:2px solid transparent;border-radius:999px;cursor:pointer;
  transition:background .2s,transform .2s,box-shadow .2s;
}
.cbp-submit:hover{background:var(--cbp-blue-d);transform:translateY(-1px);box-shadow:0 8px 20px rgba(19,73,163,.25)}
.cbp-submit:focus-visible{outline:3px solid var(--cbp-accent);outline-offset:2px}
.cbp-submit svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.cbp-submit[disabled]{opacity:.7;cursor:wait;transform:none;box-shadow:none}
.cbp-submit.is-loading svg{display:none}
.cbp-submit.is-loading::before{
  content:"";width:16px;height:16px;border-radius:50%;
  border:2px solid rgba(255,255,255,.45);border-top-color:#fff;
  animation:cbp-spin .7s linear infinite;
}
.cbp-wa{background:#25d366;text-decoration:none!important;margin-bottom:10px}
.cbp-wa:hover{background:#1ebe5b;box-shadow:0 8px 20px rgba(37,211,102,.3)}
.cbp-submit--ghost{background:#fff;color:var(--cbp-blue);border-color:var(--cbp-blue)}
.cbp-submit--ghost:hover{background:#eef4ff;color:var(--cbp-blue-d)}

.cbp-status{margin:10px 0 0;font-size:.88rem;font-weight:600;text-align:center}
.cbp-status:empty{display:none}
.cbp-status.is-error{color:var(--cbp-err)}

/* Success state */
.cbp-done{text-align:center;padding:28px 24px 26px}
.cbp-done[hidden]{display:none}
.cbp-done-icon{
  display:inline-flex;align-items:center;justify-content:center;
  width:60px;height:60px;margin-bottom:12px;border-radius:50%;
  background:#e8f7ee;color:#116a35;
}
.cbp-done-icon svg{width:30px;height:30px;stroke:currentColor;fill:none;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
.cbp-done h3{margin:0 0 6px;font-size:1.3rem}
.cbp-done p{margin:0 0 18px;color:var(--cbp-muted)}

/* Page scroll lock while open */
html.cbp-lock,html.cbp-lock body{overflow:hidden}

@keyframes cbp-spin{to{transform:rotate(360deg)}}

/* ---------- Mobile: compact bottom sheet ---------- */
@media (max-width:600px){
  .cbp{align-items:flex-end;padding:0}
  .cbp-dialog{
    max-width:none;max-height:88vh;border-radius:20px 20px 0 0;
    transform:translateY(100%);
    transition:opacity .2s ease,transform .3s cubic-bezier(.2,.8,.2,1);
    padding-bottom:env(safe-area-inset-bottom);
  }
  .cbp.is-open .cbp-dialog{transform:none}
  .cbp-handle{
    display:block;position:absolute;top:7px;left:50%;z-index:2;
    width:40px;height:4px;margin-left:-20px;border-radius:4px;background:rgba(255,255,255,.45);
  }
  .cbp-head{padding:20px 54px 14px 18px;gap:12px}
  .cbp-icon{width:40px;height:40px;border-radius:12px}
  .cbp-icon svg{width:22px;height:22px}
  .cbp-title{font-size:1.22rem}
  .cbp-close{top:14px;right:10px;width:34px;height:34px}
  .cbp-body{padding:14px 18px 18px}
  .cbp-lead{font-size:.97rem}
  .cbp-sub{font-size:.88rem;margin-bottom:12px}
  .cbp-field{margin-bottom:10px}
  .cbp-input{padding:11px 13px}
  .cbp-done{padding:24px 18px 20px}
}

/* Very short landscape phones: drop the icon to save height */
@media (max-height:480px) and (max-width:900px){
  .cbp-icon,.cbp-sub{display:none}
}

@media (prefers-reduced-motion:reduce){
  .cbp-backdrop,.cbp-dialog{transition:none}
  .cbp-submit.is-loading::before{animation-duration:2s}
}
