/*
 * TPB Waitlist
 * Every rule is scoped under #tpb-waitlist so the theme and Elementor
 * cannot bleed in, and so nothing here leaks out on to the rest of the site.
 */

#tpb-waitlist{
  --tpbwl-ink:#14261F;
  --tpbwl-ink-soft:#3E524A;
  --tpbwl-muted:#78877F;
  --tpbwl-accent:#1F5C4D;
  --tpbwl-accent-hover:#164337;
  --tpbwl-accent-tint:#EDF3F0;
  --tpbwl-gold:#B08D3F;
  --tpbwl-surface:#FFFDF9;
  --tpbwl-border:#E3DCCF;
  --tpbwl-border-strong:#CFC5B3;
  --tpbwl-danger:#A63A2B;
  --tpbwl-radius:12px;
  --tpbwl-pad:34px;
  --tpbwl-font:"Inter","Helvetica Neue",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  --tpbwl-serif:"Georgia","Times New Roman",serif;
}

/* --- defensive reset ---------------------------------------------------
 * The site uses "tpb-" as its own class prefix (.tpb-form, .tpb-footer,
 * .tpb-caret ...), so this modal uses "tpbwl-" to stay out of its way.
 * On top of that, everything inside the modal is stripped back to zero
 * here: box metrics, decoration and text metrics. Any rule from the theme,
 * Elementor or a future stylesheet that happens to match one of these
 * elements is cancelled. The specific rules below all carry a class, so
 * they are more specific and still win.
 */
#tpb-waitlist,
#tpb-waitlist *,
#tpb-waitlist *::before,
#tpb-waitlist *::after{
  box-sizing:border-box;
  margin:0;
  padding:0;
  border:0;
  outline:0;
  background:none;
  box-shadow:none;
  border-radius:0;
  letter-spacing:normal;
  word-spacing:normal;
  text-transform:none;
  text-shadow:none;
  text-indent:0;
  line-height:normal;
  font-weight:400;
  font-style:normal;
  list-style:none;
  float:none;
}

#tpb-waitlist button{
  font:inherit;margin:0;text-transform:none;letter-spacing:normal;
  line-height:1.2;box-shadow:none;text-decoration:none;min-height:0;width:auto;
}
#tpb-waitlist input,
#tpb-waitlist textarea{
  font:inherit;margin:0;min-height:0;box-shadow:none;
  max-width:none;line-height:normal;
}
#tpb-waitlist p,
#tpb-waitlist h2,
#tpb-waitlist h3,
#tpb-waitlist label{margin:0;padding:0;text-transform:none}
#tpb-waitlist svg{display:block;max-width:none}
#tpb-waitlist [hidden]{display:none !important}

/* --- overlay + shell --- */
#tpb-waitlist{
  position:fixed;inset:0;z-index:999999;
  background:rgba(18,32,27,.55);
  -webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);
  display:flex;align-items:center;justify-content:center;padding:24px 16px;
  font-family:var(--tpbwl-font);color:var(--tpbwl-ink);
  -webkit-font-smoothing:antialiased;
  opacity:0;visibility:hidden;transition:opacity .24s ease, visibility .24s;
}
#tpb-waitlist.tpbwl-is-open{opacity:1;visibility:visible}

#tpb-waitlist .tpbwl-modal{
  position:relative;width:100%;max-width:524px;
  background:var(--tpbwl-surface);border-radius:20px;
  box-shadow:0 28px 64px -20px rgba(20,38,31,.34), 0 2px 8px rgba(20,38,31,.06);
  transform:translateY(18px) scale(.985);
  transition:transform .28s cubic-bezier(.2,.8,.3,1),
             height .34s cubic-bezier(.3,.8,.35,1);
  display:flex;flex-direction:column;overflow:hidden;
}
#tpb-waitlist.tpbwl-is-open .tpbwl-modal{transform:none}

#tpb-waitlist .tpbwl-close{
  position:absolute;top:13px;right:13px;z-index:3;
  width:34px;height:34px;padding:0;border-radius:50%;
  border:0;background:rgba(20,38,31,.06);color:var(--tpbwl-ink-soft);
  font-size:18px;line-height:1;cursor:pointer;
  display:grid;place-items:center;transition:background .16s ease,color .16s ease;
}
#tpb-waitlist .tpbwl-close:hover{background:rgba(20,38,31,.12);color:var(--tpbwl-ink)}
#tpb-waitlist .tpbwl-close:focus-visible{outline:3px solid rgba(31,92,77,.35);outline-offset:2px}

#tpb-waitlist .tpbwl-progress{display:flex;gap:5px;background:var(--tpbwl-border);flex:0 0 auto}
#tpb-waitlist .tpbwl-progress span{height:3px;flex:1;background:transparent;transition:background .35s ease}
#tpb-waitlist .tpbwl-progress span.tpbwl-on{background:var(--tpbwl-accent)}

#tpb-waitlist .tpbwl-form{flex:1;display:flex;flex-direction:column;min-height:0;margin:0}

/* text-align is set here rather than on the blanket reset, so that the
   centred confirmation screen further down can still override it */
#tpb-waitlist .tpbwl-body{
  flex:1;min-height:0;overflow-y:auto;
  padding:34px var(--tpbwl-pad) 26px;
  display:flex;flex-direction:column;scrollbar-width:thin;
  text-align:left;
}
#tpb-waitlist .tpbwl-body::-webkit-scrollbar{width:8px}
#tpb-waitlist .tpbwl-body::-webkit-scrollbar-thumb{background:var(--tpbwl-border-strong);border-radius:99px}

/* margin:auto centres short steps without clipping tall ones */
#tpb-waitlist .tpbwl-step{
  flex:0 0 auto;margin:auto 0;
  animation:tpbStepIn .34s cubic-bezier(.2,.8,.3,1) both;
}
@keyframes tpbStepIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}

#tpb-waitlist .tpbwl-foot{
  flex:0 0 auto;padding:18px var(--tpbwl-pad) 22px;
  background:var(--tpbwl-surface);border-top:1px solid var(--tpbwl-border);
  transition:border-color .2s ease;
}
#tpb-waitlist .tpbwl-foot.tpbwl-is-flat{border-top-color:transparent}
#tpb-waitlist .tpbwl-foot-row{display:flex;align-items:center;gap:12px}

#tpb-waitlist .tpbwl-formerror{
  margin:0 0 12px;padding:10px 13px;border-radius:10px;
  background:#FBEDEA;color:var(--tpbwl-danger);
  font-size:13px;line-height:1.45;text-align:center;
}
/* "You're already on the waitlist" is information, not a failure, so it
   reads in the brand gold rather than the error red. */
#tpb-waitlist .tpbwl-formerror--note{
  background:#FBF4E4;color:#7A5F1C;
  border:1px solid rgba(176,141,63,.35);
}

/* --- buttons --- */
#tpb-waitlist .tpbwl-btn{
  font-size:15px;font-weight:600;border:0;cursor:pointer;
  height:52px;padding:0 28px;border-radius:999px;flex:1;
  background:var(--tpbwl-accent);color:#fff;letter-spacing:.01em;
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  transition:background .18s ease, transform .12s ease, opacity .18s ease;
  box-shadow:0 8px 20px -10px rgba(31,92,77,.8);
}
#tpb-waitlist .tpbwl-btn:hover{background:var(--tpbwl-accent-hover);color:#fff}
#tpb-waitlist .tpbwl-btn:active{transform:translateY(1px)}
#tpb-waitlist .tpbwl-btn:focus-visible{outline:3px solid rgba(31,92,77,.35);outline-offset:2px}
#tpb-waitlist .tpbwl-btn[disabled]{opacity:.6;cursor:default;transform:none}

#tpb-waitlist .tpbwl-btn--ghost{
  background:transparent;color:var(--tpbwl-ink-soft);box-shadow:none;
  border:1px solid var(--tpbwl-border-strong);font-weight:500;
}
#tpb-waitlist .tpbwl-btn--ghost:hover{background:#fff;color:var(--tpbwl-ink)}

#tpb-waitlist .tpbwl-btn-icon{
  flex:0 0 52px;width:52px;height:52px;padding:0;border-radius:50%;cursor:pointer;
  background:transparent;border:1px solid var(--tpbwl-border-strong);color:var(--tpbwl-ink-soft);
  display:grid;place-items:center;
  transition:background .16s ease,border-color .16s ease,color .16s ease;
}
#tpb-waitlist .tpbwl-btn-icon svg{
  width:18px;height:18px;fill:none;stroke:currentColor;
  stroke-width:2;stroke-linecap:round;stroke-linejoin:round;
}
#tpb-waitlist .tpbwl-btn-icon:hover{background:#fff;border-color:var(--tpbwl-ink-soft);color:var(--tpbwl-ink)}
#tpb-waitlist .tpbwl-btn-icon:focus-visible{outline:3px solid rgba(31,92,77,.35);outline-offset:2px}

/* --- typography --- */
#tpb-waitlist .tpbwl-eyebrow{
  font-size:11px;letter-spacing:.16em;text-transform:uppercase;
  color:var(--tpbwl-gold);font-weight:700;margin:0 0 12px;
}
#tpb-waitlist .tpbwl-title{
  font-family:var(--tpbwl-serif);font-weight:400;
  font-size:29px;line-height:1.18;letter-spacing:-.015em;
  margin:0 0 9px;color:var(--tpbwl-ink);
}
#tpb-waitlist .tpbwl-lede{margin:0;color:var(--tpbwl-ink-soft);font-size:14.5px;line-height:1.6}
#tpb-waitlist .tpbwl-lede strong{font-weight:600;color:var(--tpbwl-ink)}

/* --- fields --- */
#tpb-waitlist .tpbwl-fields{margin-top:24px;display:flex;flex-direction:column;gap:16px}
#tpb-waitlist .tpbwl-field label{
  display:block;font-size:13px;font-weight:600;
  color:var(--tpbwl-ink);margin-bottom:6px;letter-spacing:.01em;
}
#tpb-waitlist .tpbwl-req{color:var(--tpbwl-gold)}
#tpb-waitlist .tpbwl-field--indent{margin-left:24px}

#tpb-waitlist .tpbwl-field input,
#tpb-waitlist .tpbwl-field textarea{
  width:100%;font-size:15px;color:var(--tpbwl-ink);
  background:#fff;border:1px solid var(--tpbwl-border-strong);
  border-radius:var(--tpbwl-radius);padding:13px 14px;
  transition:border-color .16s ease, box-shadow .16s ease;
}
#tpb-waitlist .tpbwl-field textarea{resize:vertical;min-height:92px;line-height:1.55}
#tpb-waitlist .tpbwl-field input::placeholder,
#tpb-waitlist .tpbwl-field textarea::placeholder{color:#A9B2AB;opacity:1}
#tpb-waitlist .tpbwl-field input:focus,
#tpb-waitlist .tpbwl-field textarea:focus{
  outline:0;border-color:var(--tpbwl-accent);box-shadow:0 0 0 3px rgba(31,92,77,.14);
}
#tpb-waitlist .tpbwl-field.tpbwl-has-error input{border-color:var(--tpbwl-danger)}
/* already registered: flagged in gold so it reads as "this one's taken",
   not "this one's wrong" */
#tpb-waitlist .tpbwl-field.tpbwl-is-dupe input,
#tpb-waitlist .tpbwl-field.tpbwl-is-dupe .tpbwl-cc{
  border-color:var(--tpbwl-gold);
  background:#FEFBF3;
}
#tpb-waitlist .tpbwl-error{display:none;margin:6px 0 0;font-size:12.5px;color:var(--tpbwl-danger)}
#tpb-waitlist .tpbwl-field.tpbwl-has-error .tpbwl-error{display:block}

#tpb-waitlist .tpbwl-phone{display:flex;align-items:stretch}
#tpb-waitlist .tpbwl-cc{
  display:flex;align-items:center;padding:0 12px;font-size:15px;font-weight:600;
  color:var(--tpbwl-ink-soft);background:#F6F2EA;
  border:1px solid var(--tpbwl-border-strong);border-right:0;
  border-radius:var(--tpbwl-radius) 0 0 var(--tpbwl-radius);
}
#tpb-waitlist .tpbwl-phone input{border-radius:0 var(--tpbwl-radius) var(--tpbwl-radius) 0}

/* honeypot — off-screen rather than display:none, which some bots detect */
#tpb-waitlist .tpbwl-hp{
  position:absolute !important;left:-9999px !important;
  width:1px;height:1px;overflow:hidden;
}

/* --- questions --- */
#tpb-waitlist .tpbwl-q{margin-top:22px}
#tpb-waitlist .tpbwl-q:first-of-type{margin-top:24px}
#tpb-waitlist .tpbwl-q-title{
  display:flex;gap:9px;font-size:15px;font-weight:600;
  line-height:1.4;margin:0 0 2px;color:var(--tpbwl-ink);
  font-family:var(--tpbwl-font);letter-spacing:normal;
}
#tpb-waitlist .tpbwl-q-num{color:var(--tpbwl-gold);font-variant-numeric:tabular-nums}
#tpb-waitlist .tpbwl-q-hint{margin:0 0 10px 24px;font-size:12.5px;color:var(--tpbwl-muted)}

#tpb-waitlist .tpbwl-opts{display:flex;flex-direction:column;gap:7px;margin-left:24px}
#tpb-waitlist .tpbwl-opts--wrap{flex-direction:row;flex-wrap:wrap;gap:7px}

#tpb-waitlist .tpbwl-opt{
  position:relative;display:flex;align-items:center;gap:10px;
  padding:11px 14px;border:1px solid var(--tpbwl-border);border-radius:10px;
  background:#fff;cursor:pointer;font-size:14px;color:var(--tpbwl-ink-soft);
  font-weight:400;line-height:1.35;
  transition:border-color .15s ease,background .15s ease,color .15s ease;
}
#tpb-waitlist .tpbwl-opt:hover{border-color:var(--tpbwl-border-strong);background:#FFFDF7}
#tpb-waitlist .tpbwl-opt input{position:absolute;opacity:0;width:0;height:0;margin:0}
#tpb-waitlist .tpbwl-mark{
  flex:0 0 18px;width:18px;height:18px;border:1.5px solid var(--tpbwl-border-strong);
  background:#fff;display:grid;place-items:center;transition:all .15s ease;
}
#tpb-waitlist .tpbwl-opt--radio .tpbwl-mark{border-radius:50%}
#tpb-waitlist .tpbwl-opt--check .tpbwl-mark{border-radius:5px}
#tpb-waitlist .tpbwl-mark::after{content:"";opacity:0;transition:opacity .15s ease}
#tpb-waitlist .tpbwl-opt--radio .tpbwl-mark::after{width:7px;height:7px;border-radius:50%;background:#fff}
#tpb-waitlist .tpbwl-opt--check .tpbwl-mark::after{
  width:5px;height:9px;border:solid #fff;border-width:0 2px 2px 0;
  transform:rotate(42deg) translateY(-1px);
}

/* the class is set by JS, so this does not depend on :has() support */
#tpb-waitlist .tpbwl-opt.tpbwl-is-checked{
  border-color:var(--tpbwl-accent);background:var(--tpbwl-accent-tint);
  color:var(--tpbwl-ink);font-weight:500;
}
#tpb-waitlist .tpbwl-opt.tpbwl-is-checked .tpbwl-mark{background:var(--tpbwl-accent);border-color:var(--tpbwl-accent)}
#tpb-waitlist .tpbwl-opt.tpbwl-is-checked .tpbwl-mark::after{opacity:1}
#tpb-waitlist .tpbwl-opt.tpbwl-is-focus{outline:3px solid rgba(31,92,77,.3);outline-offset:2px}
#tpb-waitlist .tpbwl-opt.tpbwl-is-locked{opacity:.45;cursor:not-allowed}
#tpb-waitlist .tpbwl-opt--pill{border-radius:999px;padding:9px 15px 9px 12px;gap:8px}

/* --- confirmation --- */
#tpb-waitlist .tpbwl-step--done{animation:none}
#tpb-waitlist .tpbwl-done{
  text-align:center;display:flex;flex-direction:column;align-items:center;
  padding:4px 0 2px;
}
#tpb-waitlist .tpbwl-done .tpbwl-title{margin-bottom:12px;text-wrap:balance}
#tpb-waitlist .tpbwl-done .tpbwl-lede{max-width:38ch;margin:0 auto;text-wrap:balance}

#tpb-waitlist .tpbwl-done-badge{
  position:relative;width:74px;height:74px;margin-bottom:24px;display:grid;place-items:center;
}
#tpb-waitlist .tpbwl-done-badge svg{width:74px;height:74px;position:relative;z-index:1;overflow:visible}
#tpb-waitlist .tpbwl-done-disc{
  fill:var(--tpbwl-accent-tint);transform-origin:50% 50%;
  animation:tpbDiscPop .52s cubic-bezier(.22,1.25,.4,1) both;
}
#tpb-waitlist .tpbwl-done-tick{
  fill:none;stroke:var(--tpbwl-accent);stroke-width:2.6;
  stroke-linecap:round;stroke-linejoin:round;
  stroke-dasharray:20;stroke-dashoffset:20;
  animation:tpbTickDraw .46s cubic-bezier(.5,0,.2,1) .26s both;
}
#tpb-waitlist .tpbwl-done-ring{
  position:absolute;inset:0;border-radius:50%;
  border:1.5px solid var(--tpbwl-accent);opacity:0;
  animation:tpbRingOut 1.25s cubic-bezier(.2,.7,.3,1) .22s both;
}
#tpb-waitlist .tpbwl-done-ring--2{animation-delay:.42s}

#tpb-waitlist .tpbwl-done-email{
  display:inline-flex;align-items:center;gap:8px;
  margin:16px auto 0;padding:9px 15px;
  background:#F6F2EA;border:1px solid var(--tpbwl-border);border-radius:999px;
  font-size:13px;font-weight:600;color:var(--tpbwl-ink);
  max-width:100%;overflow-wrap:anywhere;text-align:left;
}
#tpb-waitlist .tpbwl-done-email svg{
  flex:0 0 15px;width:15px;height:15px;fill:none;stroke:var(--tpbwl-gold);
  stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;
}

@keyframes tpbDiscPop{from{transform:scale(.4);opacity:0}to{transform:scale(1);opacity:1}}
@keyframes tpbTickDraw{to{stroke-dashoffset:0}}
@keyframes tpbRingOut{0%{transform:scale(.9);opacity:.45}100%{transform:scale(1.75);opacity:0}}
@keyframes tpbRiseIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}

#tpb-waitlist .tpbwl-step--done .tpbwl-title{animation:tpbRiseIn .52s cubic-bezier(.2,.8,.3,1) .30s both}
#tpb-waitlist .tpbwl-step--done .tpbwl-lede {animation:tpbRiseIn .52s cubic-bezier(.2,.8,.3,1) .42s both}
#tpb-waitlist .tpbwl-done-email           {animation:tpbRiseIn .52s cubic-bezier(.2,.8,.3,1) .52s both}
#tpb-waitlist .tpbwl-foot-row[data-tpb-foot="4"]{animation:tpbRiseIn .52s cubic-bezier(.2,.8,.3,1) .62s both}

/* the site's own trigger button, if the shortcode is used */
.tpbwl-btn.tpb-waitlist-open{
  font-size:15px;font-weight:600;border:0;cursor:pointer;
  height:52px;padding:0 30px;border-radius:999px;
  background:#1F5C4D;color:#fff;
  display:inline-flex;align-items:center;justify-content:center;
}
.tpbwl-btn.tpb-waitlist-open:hover{background:#164337;color:#fff}

@media (prefers-reduced-motion: reduce){
  #tpb-waitlist *,
  #tpb-waitlist *::before,
  #tpb-waitlist *::after{
    animation-duration:.01ms !important;
    transition-duration:.01ms !important;
  }
}

@media (max-width:560px){
  #tpb-waitlist{--tpbwl-pad:22px;padding:0;align-items:flex-end}
  #tpb-waitlist .tpbwl-modal{max-width:none;border-radius:20px 20px 0 0;margin:0}
  #tpb-waitlist .tpbwl-title{font-size:26px}
  #tpb-waitlist .tpbwl-opts,
  #tpb-waitlist .tpbwl-q-hint,
  #tpb-waitlist .tpbwl-field--indent{margin-left:0}
}
