/* BeYou Popup Leads - front (v1.1)
   Every rule is prefixed with #bypl so theme / Elementor styles for buttons, inputs and selects cannot break it. */

#bypl[hidden]{display:none!important}
#bypl{
  --p:var(--bypl-primary,#17345C);
  --s:var(--bypl-soft,#EAF4FF);
  --ease:cubic-bezier(.32,.72,0,1);          /* Apple sheet curve: critically damped, no overshoot */
  position:fixed!important;inset:0!important;z-index:2147483000!important;
  display:flex!important;align-items:center;justify-content:center;
  padding:16px;margin:0;
  font-family:'DM Sans',-apple-system,BlinkMacSystemFont,'SF Pro Text','Segoe UI',sans-serif;
  font-size:16px;line-height:1.4;font-weight:400;letter-spacing:0;text-transform:none;text-align:left;
  -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;
  color:var(--p);
}
#bypl *,#bypl *::before,#bypl *::after{box-sizing:border-box!important}
html.bypl-lock,html.bypl-lock body{overflow:hidden!important}

/* ---------- scrim: materialises (blur + dim together) ---------- */
#bypl .bypl-backdrop{
  position:absolute;inset:0;
  background:rgba(10,20,38,.46);
  -webkit-backdrop-filter:blur(0px);backdrop-filter:blur(0px);
  opacity:0;
  transition:opacity .6s var(--ease),-webkit-backdrop-filter .6s var(--ease),backdrop-filter .6s var(--ease);
}
#bypl.is-open .bypl-backdrop{opacity:1;-webkit-backdrop-filter:blur(16px) saturate(140%);backdrop-filter:blur(16px) saturate(140%)}

/* ---------- card: translucent glass with a lit top edge ---------- */
#bypl .bypl-card{
  position:relative;width:min(440px,100%);max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);
  overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;
  padding:34px 34px 28px;margin:0;
  border-radius:32px;border:0;
  background:
    radial-gradient(90% 60% at 100% 0%,var(--s) 0%,rgba(234,244,255,0) 62%),
    linear-gradient(180deg,rgba(255,255,255,.90) 0%,rgba(246,250,255,.86) 100%);
  -webkit-backdrop-filter:blur(40px) saturate(180%);backdrop-filter:blur(40px) saturate(180%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    0 0 0 .5px rgba(23,52,92,.10),
    0 2px 6px rgba(10,20,38,.06),
    0 44px 110px -26px rgba(8,18,36,.62);
  text-align:center;outline:none;
  opacity:0;transform:translate3d(0,24px,0) scale(.965);filter:blur(8px);
  transition:opacity .55s var(--ease),transform .7s var(--ease),filter .55s var(--ease);
  will-change:transform,opacity;
}
#bypl.is-open .bypl-card{opacity:1;transform:none;filter:none}
#bypl .bypl-card.is-dragging{transition:none!important}
#bypl .bypl-card.is-settling{transition:transform .55s var(--ease)!important}

/* ---------- close ---------- */
#bypl .bypl-x{
  position:absolute!important;top:14px!important;right:14px!important;z-index:3;
  width:44px!important;height:44px!important;min-width:0!important;margin:0!important;padding:0!important;
  display:flex!important;align-items:center;justify-content:center;
  border:0!important;border-radius:50%!important;cursor:pointer;
  background:rgba(23,52,92,.07)!important;box-shadow:none!important;color:var(--p)!important;
  transition:background .25s,transform .12s ease-out;
}
#bypl .bypl-x:hover,#bypl .bypl-x:focus{background:rgba(23,52,92,.13)!important}
#bypl .bypl-x:active{transform:scale(.92)}
#bypl .bypl-x svg{width:15px;height:15px;stroke:var(--p);fill:none;stroke-width:2.2;stroke-linecap:round}

/* ---------- views ---------- */
#bypl .bypl-view[hidden]{display:none!important}
#bypl .bypl-view{animation:bypl-in .8s var(--ease) both}
@keyframes bypl-in{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}

#bypl .bypl-top{display:block;touch-action:none;cursor:default}
#bypl .bypl-grip{display:none;width:38px;height:5px;margin:-14px auto 14px;border-radius:3px;background:rgba(23,52,92,.22)}

#bypl .bypl-logo{display:flex;align-items:center;justify-content:center;min-height:48px;margin:6px 0 20px}
#bypl .bypl-logo img{display:block;width:auto!important;height:auto!important;max-width:168px!important;max-height:52px!important;margin:0 auto;border:0;box-shadow:none;border-radius:0;object-fit:contain}
#bypl .bypl-logo-text{font-family:'Cormorant Garamond',Georgia,serif;font-style:italic;font-weight:400;font-size:36px;line-height:1;letter-spacing:-.01em;color:var(--p)}

#bypl .bypl-eyebrow{
  margin:0 0 12px!important;padding:0;
  font-family:'Oswald',sans-serif;font-weight:300;font-size:11px;line-height:1.2;
  letter-spacing:.26em;text-transform:uppercase;color:rgba(23,52,92,.58);
}
#bypl .bypl-title{
  margin:0 0 14px!important;padding:0;
  font-family:'Oswald',sans-serif;font-weight:300;
  font-size:clamp(30px,7.4vw,40px);line-height:1.05;letter-spacing:-.005em;   /* big type: tight leading, no extra tracking */
  text-transform:uppercase;color:var(--p);text-wrap:balance;
}
#bypl .bypl-text{
  margin:0 auto 26px!important;padding:0;max-width:330px;
  font-size:15px;line-height:1.55;font-weight:400;letter-spacing:.003em;color:rgba(23,52,92,.74);text-wrap:pretty;
}

/* ---------- form ---------- */
#bypl .bypl-form{margin:0!important;padding:0;border:0;background:none}
#bypl .bypl-field{
  display:flex!important;flex-direction:row!important;align-items:center;
  width:100%!important;height:58px!important;margin:0!important;padding:0!important;
  border:1.5px solid rgba(23,52,92,.20)!important;border-radius:999px!important;
  background:rgba(255,255,255,.92)!important;
  box-shadow:0 1px 2px rgba(23,52,92,.05) inset!important;
  transition:border-color .25s,box-shadow .25s,transform .12s ease-out;
}
#bypl .bypl-field:focus-within{border-color:var(--p)!important;box-shadow:0 0 0 4px rgba(23,52,92,.11)!important}
#bypl .bypl-field.is-bad{border-color:#B3261E!important;box-shadow:0 0 0 4px rgba(179,38,30,.10)!important;animation:bypl-shake .42s var(--ease)}
@keyframes bypl-shake{0%,100%{transform:none}20%{transform:translateX(-6px)}50%{transform:translateX(5px)}80%{transform:translateX(-2px)}}

#bypl select.bypl-cc{
  -webkit-appearance:none!important;-moz-appearance:none!important;appearance:none!important;
  flex:0 0 108px!important;width:108px!important;min-width:108px!important;max-width:108px!important;
  height:100%!important;margin:0!important;padding:0 28px 0 22px!important;
  border:0!important;border-right:1px solid rgba(23,52,92,.14)!important;border-radius:999px 0 0 999px!important;
  background-color:transparent!important;box-shadow:none!important;outline:none!important;
  color:var(--p)!important;font:500 14px/1 'DM Sans',sans-serif!important;letter-spacing:.01em!important;text-transform:none!important;
  cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2317345C' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")!important;
  background-repeat:no-repeat!important;background-position:right 11px center!important;background-size:13px!important;
}
#bypl input.bypl-phone{
  -webkit-appearance:none!important;appearance:none!important;
  flex:1 1 auto!important;width:auto!important;min-width:0!important;max-width:none!important;
  height:100%!important;margin:0!important;padding:0 22px 0 16px!important;
  border:0!important;border-radius:0 999px 999px 0!important;
  background:transparent!important;box-shadow:none!important;outline:none!important;
  color:var(--p)!important;font:400 17px/1 'DM Sans',sans-serif!important;letter-spacing:.04em!important;text-transform:none!important;
}
#bypl input.bypl-phone::placeholder{color:rgba(23,52,92,.40)!important;letter-spacing:0!important;opacity:1}
#bypl input.bypl-hp{position:absolute!important;left:-9999px!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}

/* ---------- buttons ---------- */
#bypl button.bypl-btn{
  position:relative;overflow:hidden;
  display:flex!important;align-items:center;justify-content:center;gap:10px;
  width:100%!important;height:58px!important;margin:12px 0 0!important;padding:0 24px!important;
  border:0!important;border-radius:999px!important;cursor:pointer;
  background:var(--p)!important;color:#fff!important;
  font-family:'Oswald',sans-serif!important;font-weight:400!important;font-size:13px!important;line-height:1!important;
  letter-spacing:.17em!important;text-transform:uppercase!important;text-decoration:none!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.22),0 16px 32px -14px rgba(23,52,92,.75)!important;
  transition:transform .12s ease-out,box-shadow .35s var(--ease),filter .2s;
}
#bypl button.bypl-btn:hover,#bypl button.bypl-btn:focus{background:var(--p)!important;color:#fff!important;filter:brightness(1.08);transform:translateY(-1px)}
#bypl button.bypl-btn:active{transform:scale(.97);transition-duration:.06s}   /* feedback on press, instantly */
#bypl button.bypl-btn::before{
  content:'';position:absolute;top:0;left:-100%;width:60%;height:100%;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.25),transparent);
  transform:skewX(-20deg);transition:left .7s var(--ease);
}
#bypl button.bypl-btn:hover::before{left:150%}
#bypl .bypl-btn-label{position:relative;transition:opacity .2s}
#bypl .bypl-btn-arrow{width:15px;height:15px;stroke:#fff;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;transition:transform .35s var(--ease),opacity .2s}
#bypl button.bypl-btn:hover .bypl-btn-arrow{transform:translateX(4px)}
#bypl .bypl-spin{
  position:absolute;width:22px;height:22px;border-radius:50%;
  border:2px solid rgba(255,255,255,.35);border-top-color:#fff;
  opacity:0;animation:bypl-spin .7s linear infinite;
}
@keyframes bypl-spin{to{transform:rotate(360deg)}}
#bypl button.bypl-btn.is-loading{pointer-events:none}
#bypl button.bypl-btn.is-loading .bypl-btn-label,#bypl button.bypl-btn.is-loading .bypl-btn-arrow{opacity:0}
#bypl button.bypl-btn.is-loading .bypl-spin{opacity:1}

#bypl button.bypl-btn--ghost{
  background:transparent!important;color:var(--p)!important;
  border:1.5px solid rgba(23,52,92,.26)!important;box-shadow:none!important;margin-top:18px!important;
}
#bypl button.bypl-btn--ghost:hover,#bypl button.bypl-btn--ghost:focus{background:rgba(23,52,92,.06)!important;color:var(--p)!important;filter:none}
#bypl button.bypl-btn--ghost .bypl-btn-arrow{stroke:var(--p)}
#bypl button.bypl-btn--ghost::before{display:none}

#bypl .bypl-err{margin:12px 6px 0!important;padding:0;font-size:13px;line-height:1.4;font-weight:500;color:#B3261E;text-align:center}
#bypl .bypl-err[hidden]{display:none!important}

#bypl .bypl-consent{margin:18px auto 0!important;padding:0;max-width:330px;font-size:11.5px;line-height:1.55;font-weight:400;letter-spacing:.005em;color:rgba(23,52,92,.52);text-align:center}

/* ---------- success ---------- */
#bypl .bypl-check{width:68px;height:68px;margin:8px auto 20px}
#bypl .bypl-check svg{width:100%;height:100%;fill:none;stroke:var(--p);stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
#bypl .bypl-check circle{stroke-dasharray:151;stroke-dashoffset:151;animation:bypl-draw .9s var(--ease) .1s forwards;opacity:.9}
#bypl .bypl-check path{stroke-dasharray:48;stroke-dashoffset:48;animation:bypl-draw .55s var(--ease) .65s forwards}
@keyframes bypl-draw{to{stroke-dashoffset:0}}

#bypl .bypl-ticket{
  position:relative;display:flex;align-items:center;justify-content:space-between;gap:12px;
  margin:0 auto;max-width:340px;padding:15px 15px 15px 22px;
  border:1.5px dashed rgba(23,52,92,.42);border-radius:20px;
  background:linear-gradient(135deg,var(--s),rgba(255,255,255,.9));
}
#bypl .bypl-ticket-label{
  position:absolute;top:-9px;left:20px;padding:0 8px;border-radius:6px;background:#F6FAFF;
  font-family:'Oswald',sans-serif;font-weight:300;font-size:9.5px;letter-spacing:.24em;text-transform:uppercase;color:rgba(23,52,92,.58);
}
#bypl .bypl-code{font-family:'Oswald',sans-serif;font-weight:400;font-size:25px;line-height:1;letter-spacing:.22em;color:var(--p)}
#bypl button.bypl-copy{
  flex:none;width:auto!important;height:auto!important;margin:0!important;cursor:pointer;
  border:0!important;border-radius:999px!important;padding:12px 20px!important;
  background:var(--p)!important;color:#fff!important;box-shadow:none!important;
  font:500 12px/1 'DM Sans',sans-serif!important;letter-spacing:.06em!important;text-transform:none!important;
  transition:transform .12s ease-out,filter .2s;
}
#bypl button.bypl-copy:hover,#bypl button.bypl-copy:focus{background:var(--p)!important;color:#fff!important;filter:brightness(1.1)}
#bypl button.bypl-copy:active{transform:scale(.94)}

/* ---------- phones: bottom sheet you can drag down ---------- */
@media (max-width:560px){
  #bypl{align-items:flex-end;padding:0}
  #bypl .bypl-card{
    width:100%;max-height:92vh;max-height:92dvh;
    padding:30px 22px calc(26px + env(safe-area-inset-bottom,0px));
    border-radius:32px 32px 0 0;
    transform:translate3d(0,70px,0);filter:none;
  }
  #bypl .bypl-grip{display:block}
  #bypl .bypl-logo{margin:2px 0 18px}
  #bypl .bypl-title{font-size:clamp(28px,8.4vw,34px)}
  #bypl select.bypl-cc{flex-basis:98px!important;width:98px!important;min-width:98px!important;max-width:98px!important;padding-left:18px!important}
}

/* ---------- accessibility ---------- */
#bypl button:focus-visible,#bypl select:focus-visible{outline:2px solid var(--p)!important;outline-offset:3px}
@media (prefers-reduced-motion:reduce){
  #bypl .bypl-backdrop,#bypl .bypl-card,#bypl .bypl-view{transition:opacity .2s linear!important;animation:none!important;filter:none!important}
  #bypl .bypl-card{transform:none!important}
  #bypl .bypl-check circle,#bypl .bypl-check path{animation:none!important;stroke-dashoffset:0!important}
  #bypl .bypl-field.is-bad{animation:none}
}
@media (prefers-reduced-transparency:reduce){
  #bypl .bypl-backdrop{-webkit-backdrop-filter:none!important;backdrop-filter:none!important;background:rgba(10,20,38,.7)}
  #bypl .bypl-card{-webkit-backdrop-filter:none!important;backdrop-filter:none!important;background:#fff}
}
@media (prefers-contrast:more){
  #bypl .bypl-card{background:#fff;box-shadow:0 0 0 2px var(--p),0 30px 80px rgba(0,0,0,.5)}
  #bypl .bypl-text,#bypl .bypl-consent,#bypl .bypl-eyebrow{color:var(--p)}
}
