/* =========================
   BASE / LAYOUT
========================= */

/* background canvas */
#wd-bg{
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: #0a0a0b;
}

/* iOS/tema: evita overflow orizzontale */
html, body,
body.wd-waitlist-mode,
body.wd-waitlist-mode .wp-site-blocks,
body.wd-waitlist-mode main,
body.wd-waitlist-mode #primary{
  width: 100%;
  max-width: 100%;
  overflow-x: clip !important;
}

*, *::before, *::after { box-sizing: border-box; }

.wd-waitlist{
  width: 100%;
  max-width: 560px;                /* coerente */
  margin: 0 auto;
  padding: 110px 14px 40px;        /* padding mobile safe */
  text-align: center;
  position: relative;
  z-index: 2;
  color: #e6e9ef;
  background: transparent !important;
}

.wd-brand{
  letter-spacing: .22em;
  font-size: 12px;
  opacity: .8;
  margin-bottom: 14px;
}

.wd-title{
  margin: 0 0 10px;
  font-size: 30px;
  line-height: 1.12;
  color: #fff;
}

.wd-subtitle{
  margin: 0 0 22px;
  opacity: .85;
  line-height: 1.5;
}

/* =========================
   FORM
========================= */

.wd-waitlist-form{
  width: 100%;
  max-width: 580px;
  margin: 0 auto;

  position: relative;
  padding: 26px;
  border-radius: 20px;

  background: rgba(18,18,20,0.75);
  border: 1px solid rgba(255,255,255,0.10);

  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  display: grid;
  gap: 12px;
  text-align: left;

  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06),
    0 0 40px rgba(255,255,255,0.06),
    0 0 120px rgba(255,255,255,0.04);
}

/* glow pulito (senza blur negativo) */
.wd-waitlist-form::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius: 20px;
  pointer-events:none;
  z-index:-1;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06),
    0 0 40px rgba(255,255,255,0.08),
    0 0 120px rgba(255,255,255,0.06);
}

.wd-label{
  font-size: 12px;
  opacity: .85;
}

.wd-waitlist-form input,
.wd-waitlist-form select{
  width: 100%;
  max-width: 100%;

  height: 52px;
  line-height: 52px;
  padding: 0 14px;

  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(18,18,20,0.75);
  color: #fff;
  outline: none;
}

.wd-waitlist-form input::placeholder{
  color: rgba(255,255,255,0.35);
}

.wd-waitlist input:focus,
.wd-waitlist select:focus{
  border-color: rgba(255,255,255,0.20);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.08);
}

/* select arrow */
.wd-waitlist-form select{
  -webkit-appearance: none;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255,255,255,0.55) 50%),
    linear-gradient(135deg, rgba(255,255,255,0.55) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 22px,
    calc(100% - 13px) 22px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 38px;
}

/* button */
.wd-waitlist-form button{
  width: 100%;
  max-width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: #ffffff;
  color: #0b0f17;
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.wd-waitlist-form button:hover{
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0,0,0,0.35);
  filter: brightness(0.98);
}

.wd-msg{
  min-height: 18px;
  font-size: 13px;
  opacity: .9;
  margin-top: 2px;
}

.wd-footnote{
  margin-top: 14px;
  font-size: 12px;
  opacity: .7;
}

/* =========================
   TURNSTILE (NO SCALE HACKS)
   -> Non puoi "rimpicciolire" davvero il widget.
   -> Devi solo evitare tagli e centrarlo.
========================= */

.wd-waitlist-form .cf-turnstile{
  width: 100%;
  display: flex;
  justify-content: center;
  overflow: visible;   /* evita taglio */
}

.wd-waitlist-form .cf-turnstile iframe{
  display:block;
  max-width: 100%;
}

/* se su iphone mini dà taglio, riduci padding del form */
@media (max-width: 380px){
  .wd-waitlist-form{ padding: 20px; }
}

/* =========================
   OTP BOX
========================= */

.wd-otp-wrap{
  width: 100%;
  max-width: 580px;
  margin: 28px auto 0;
  padding: 24px;
  border-radius: 22px;

  background: rgba(15,15,18,0.72);
  border: 1px solid rgba(255,255,255,0.08);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  box-shadow:
    0 0 0 1px rgba(255,255,255,0.05),
    0 0 60px rgba(255,255,255,0.05);

  text-align: center;
}

.wd-otp-title{
  font-size: 13px;
  opacity: .85;
  margin-bottom: 10px;
}

.wd-otp{
  display:flex;
  justify-content:center;
  gap:10px;
  margin-bottom: 12px;
}

.wd-otp input{
  width: 44px;
  height: 52px;
  text-align:center;
  font-size: 18px;
  font-weight: 800;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(18,18,20,0.85);
  color: #fff;
  outline:none;
}

.wd-otp input:focus{
  border-color: rgba(255,255,255,0.22);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.08);
}

.wd-otp-msg{
  min-height: 18px;
  font-size: 13px;
  opacity: .85;
  margin-top: 8px;
}

/* =========================
   EXPECT / CAROUSEL (FIXED)
   - una sola riga
   - niente "due sotto"
   - loop fluido
========================= */

.wd-expect{
  width: 100%;
  max-width: 580px;
  margin: 40px auto 0;
  padding: 22px;
  border-radius: 22px;

  background: rgba(15,15,18,0.70);
  border: 1px solid rgba(255,255,255,0.08);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  box-shadow:
    0 0 0 1px rgba(255,255,255,0.05),
    0 0 60px rgba(255,255,255,0.05);
}

.wd-expect-title{
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .7;
  margin: 0 0 10px;
}

.wd-carousel{
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  contain: layout paint; /* evita bug iOS che allarga pagina */
}

/* gradient sides */
.wd-carousel::before,
.wd-carousel::after{
  content:"";
  position:absolute;
  top:0; bottom:0;
  width: 60px;
  z-index: 2;
  pointer-events:none;
}
.wd-carousel::before{
  left:0;
  background: linear-gradient(to right, rgba(11,15,23,1), rgba(11,15,23,0));
}
.wd-carousel::after{
  right:0;
  background: linear-gradient(to left, rgba(11,15,23,1), rgba(11,15,23,0));
}

/* LA REGOLA CHIAVE: mai width:100% qui */
.wd-track{
  display:flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 10px;
  padding: 12px;

  width: max-content;       /* fondamentale per scorrere */
  will-change: transform;
  transform: translate3d(0,0,0);

  animation: wdScroll 22s linear infinite;
}

/* le card non devono mai andare a capo */
.wd-item{
  flex: 0 0 auto;
  min-width: 220px;
  padding: 12px 12px;
  border-radius: 12px;
  background: rgba(18,24,38,0.7);
  border: 1px solid rgba(255,255,255,0.08);
}

.wd-item strong{
  display:block;
  font-size: 13px;
  color:#fff;
  margin-bottom: 4px;
}
.wd-item span{
  display:block;
  font-size: 12px;
  opacity:.75;
  line-height:1.45;
}

/* loop: hai duplicato gli item, quindi -50% */
@keyframes wdScroll{
  from { transform: translate3d(0,0,0); }
  to   { transform: translate3d(-50%,0,0); }
}

/* mobile più veloce (non 5s, troppo rapido e brutto) */
@media (max-width: 480px){
  .wd-track{ animation-duration: 14s; }
}

@media (prefers-reduced-motion: reduce){
  .wd-track{ animation: none; }
}

/* =========================
   HIDE HEADER & FOOTER
========================= */

body.wd-waitlist-mode header,
body.wd-waitlist-mode .site-header,
body.wd-waitlist-mode .wp-block-template-part,
body.wd-waitlist-mode footer,
body.wd-waitlist-mode .site-footer{
  display: none !important;
}

body.wd-waitlist-mode{
  margin: 0 !important;
  padding: 0 !important;
}

body.wd-waitlist-mode main,
body.wd-waitlist-mode #primary,
body.wd-waitlist-mode .wp-site-blocks{
  padding: 0 !important;
  margin: 0 !important;
}





/* =========================
   CAROUSEL — FINAL FIX
========================= */

.wd-carousel{
  position: relative;
  overflow: hidden !important;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  contain: layout paint;
}

/* gradient sides */
.wd-carousel::before,
.wd-carousel::after{
  content:"";
  position:absolute;
  top:0; bottom:0;
  width: 60px;
  z-index: 2;
  pointer-events:none;
}
.wd-carousel::before{
  left:0;
  background: linear-gradient(to right, rgba(11,15,23,1), rgba(11,15,23,0));
}
.wd-carousel::after{
  right:0;
  background: linear-gradient(to left, rgba(11,15,23,1), rgba(11,15,23,0));
}

/* TRACK: deve essere SEMPRE una riga */
.wd-carousel .wd-track{
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;

  width: max-content !important;
  max-width: none !important;

  animation: wdScroll 22s linear infinite;
  will-change: transform;
  transform: translate3d(0,0,0);
}

/* ogni blocco interno è una riga */
.wd-carousel .wd-track-inner{
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 10px;
  padding: 12px;
  flex: 0 0 auto;
}

/* ITEM: MAI full width, MAI a capo */
.wd-carousel .wd-item{
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: none !important;

  min-width: 220px;
  padding: 12px 12px;
  border-radius: 12px;
  background: rgba(18,24,38,0.7);
  border: 1px solid rgba(255,255,255,0.08);
}

.wd-carousel .wd-item strong{
  display:block;
  font-size: 13px;
  color:#fff;
  margin-bottom: 4px;
}
.wd-carousel .wd-item span{
  display:block;
  font-size: 12px;
  opacity:.75;
  line-height:1.45;
}

/* Loop perfetto: sposta di 1 blocco (metà track) */
@keyframes wdScroll{
  from { transform: translate3d(0,0,0); }
  to   { transform: translate3d(-50%,0,0); }
}

/* Mobile: più veloce e card leggermente più piccole */
@media (max-width: 480px){
  .wd-carousel .wd-track{ animation-duration: 14s; }
  .wd-carousel .wd-item{ min-width: 200px; }
}

@media (prefers-reduced-motion: reduce){
  .wd-carousel .wd-track{ animation: none; }
}


/* =========================
   LOGO TOP
========================= */
.wd-logo{
  display: flex;
  justify-content: center;
  margin: 0 0 14px;
}

.wd-logo img{
  width: 78px;
  height: 78px;
  max-width: 30vw;
  object-fit: contain;
  border-radius: 999px; /* se vuoi tondo */
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.10),
    0 10px 30px rgba(0,0,0,0.45);
}

/* un po’ più grande su desktop */
@media (min-width: 768px){
  .wd-logo img{
    width: 88px;
    height: 88px;
  }
}


/* =========================
   OTP BUTTON (Verify code) – Premium style
   Metti QUESTO IN FONDO al CSS
========================= */

.wd-otp-wrap .wd-otp-btn{
  width: 100% !important;
  max-width: 360px;                 /* bello centrato */
  margin: 10px auto 0 !important;
  display: block !important;

  padding: 12px 16px !important;
  border-radius: 14px !important;

  border: 1px solid rgba(255,255,255,0.10) !important;
  background: #ffffff !important;
  color: #0b0f17 !important;

  font-weight: 800 !important;
  font-size: 14px !important;
  line-height: 1 !important;

  cursor: pointer !important;
  -webkit-appearance: none !important;
  appearance: none !important;

  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease !important;
}

.wd-otp-wrap .wd-otp-btn:hover{
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0,0,0,0.35);
  filter: brightness(0.98);
}

.wd-otp-wrap .wd-otp-btn:active{
  transform: translateY(0);
}

.wd-otp-wrap .wd-otp-btn:disabled{
  opacity: .55 !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
}

/* focus pulito */
.wd-otp-wrap .wd-otp-btn:focus{
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.10) !important;
}