/* ==========================================================================
   Demo viva "workshop-join" (hero de /talleres): inscripción con pago y acceso a la sesión en vivo.
   Markup: resources/views/web/partials/anim/workshop-join.blade.php · Pasos: assets/js/anim/workshop-join.js
   Estados en la raíz:
     data-state  page | checkout | paying | joined | live
     data-cursor puntero visible · data-notif aviso al negocio · data-clock salto al día del taller
   La página pública (plantilla 4) no tiene modo oscuro: en oscuro cambian halo, sombra y flotantes.
   ========================================================================== */

.lla-ws {
  --lla-bg: #ffffff;
  --lla-surface: #f4f6fb;
  --lla-text: #1e2022;
  --lla-muted: #677788;
  --lla-border: #e7eaf3;
  --lla-bezel: #1d2129;
  --lla-bezel-edge: #3a404c;
  --lla-shadow: 0 32px 64px -24px rgba(22, 34, 58, .4), 0 10px 24px -10px rgba(22, 34, 58, .2);
  --lla-float-bg: #ffffff;
  --lla-float-text: #1e2022;
  --lla-float-shadow: 0 .75rem 2rem rgba(30, 32, 34, .15);
  --lla-glow-a: rgba(14, 165, 233, .18);
  --lla-glow-b: rgba(236, 72, 153, .14);
  --lla-cursor-fill: #1e2022;
  --lla-cursor-edge: #ffffff;
  --lla-cursor-ring: rgba(14, 116, 144, .55);
  --lla-brand: #0e7490;
  --lla-live: #dc2626;
  --lla-ok: #16a34a;
}

html[data-theme="dark"] .lla-ws {
  --lla-bezel-edge: #535b6a;
  --lla-float-bg: var(--ll-surface, #161d2d);
  --lla-float-text: var(--ll-heading, #eef2f8);
  --lla-float-shadow: 0 .75rem 2rem rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .06);
  --lla-glow-a: rgba(14, 165, 233, .14);
  --lla-glow-b: rgba(236, 72, 153, .12);
  --lla-shadow: 0 32px 64px -24px rgba(0, 0, 0, .8), 0 10px 24px -10px rgba(0, 0, 0, .55);
}

.lla-ws { max-width: 520px; margin-inline: auto; color: var(--lla-text); line-height: 1.3; text-align: left; }
.lla .lla-ws__stage { --lla-w: 560; --lla-h: 540; }
.lla-ws :where(b, small, strong, em, i) { margin: 0; font-size: inherit; font-style: normal; color: inherit; }
.lla-ws .bi::before { vertical-align: 0; }

.lla-ws__glow { position: absolute; border-radius: 50%; pointer-events: none; }
.lla-ws__glow--a { left: 10px; top: 10px; width: 400px; height: 400px; background: radial-gradient(closest-side, var(--lla-glow-a), transparent); }
.lla-ws__glow--b { left: 200px; top: 170px; width: 380px; height: 380px; background: radial-gradient(closest-side, var(--lla-glow-b), transparent); }

/* ---------- Flotantes ---------- */
.lla-ws__float { position: absolute; z-index: 3; animation: lla-ws-float 5s ease-in-out infinite; }
.lla-ws__chip {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px;
  background: var(--lla-float-bg); box-shadow: var(--lla-float-shadow); color: var(--lla-float-text);
  font-size: 13px; font-weight: 600; white-space: nowrap;
}
.lla-ws__chip .bi { font-size: 18px; }
.lla-ws__chip--zoom { left: 34px; top: 120px; }
.lla-ws__chip--zoom .bi { color: #2d8cff; }
.lla-ws__chip--rec { left: 30px; top: 470px; animation-delay: -2.5s; }
.lla-ws__chip--rec .bi { color: #ec4899; }

.lla-ws__notif, .lla-ws__clock {
  position: absolute; z-index: 8;
  background: var(--lla-float-bg); color: var(--lla-float-text); box-shadow: var(--lla-float-shadow);
  opacity: 0; transform: translateY(-14px) scale(.96);
  transition: opacity .4s var(--lla-ease), transform .45s var(--lla-ease);
}
.lla-ws__notif { left: 300px; top: 70px; width: 240px; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px; }
.lla-ws[data-notif] .lla-ws__notif { opacity: 1; transform: none; }
.lla-ws__notif-icon {
  flex: none; display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff; font-size: 18px;
}
.lla-ws__notif-body b { display: block; font-size: 13px; }
.lla-ws__notif-body small { display: block; font-size: 11.5px; opacity: .75; }
.lla-ws__clock { left: 330px; top: 80px; display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.lla-ws__clock .bi { color: var(--lla-live); font-size: 16px; }
.lla-ws[data-clock] .lla-ws__clock { opacity: 1; transform: none; }

/* ---------- Celular ---------- */
.lla-ws__phone {
  position: absolute; left: 150px; top: 6px; z-index: 2; width: 260px; height: 528px; padding: 8px; border-radius: 40px;
  background: var(--lla-bezel); box-shadow: inset 0 0 0 1.5px var(--lla-bezel-edge), var(--lla-shadow);
}
.lla-ws__screen { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 33px; background: var(--lla-bg); font-size: 10.5px; }
.lla-ws__notch { position: absolute; top: 8px; left: 50%; z-index: 6; width: 70px; height: 18px; border-radius: 999px; background: var(--lla-bezel); transform: translateX(-50%); }
.lla-ws__content { position: absolute; inset: 0; }
.lla-ws__urlbar { margin: 34px 12px 8px; padding: 5px 10px; border-radius: 999px; background: var(--lla-surface); color: var(--lla-muted); font-size: 9.5px; text-align: center; }
.lla-ws__urlbar .bi { margin-right: 4px; font-size: 8px; }

.lla-ws__cover {
  position: relative; display: flex; align-items: center; justify-content: center;
  height: 120px; margin: 0 12px; border-radius: 14px;
  background:
    radial-gradient(60% 80% at 20% 30%, rgba(56, 189, 248, .9), transparent 70%),
    radial-gradient(60% 80% at 80% 70%, rgba(244, 114, 182, .85), transparent 70%),
    linear-gradient(135deg, #a5f3fc, #fbcfe8);
  color: #fff; font-size: 38px;
}
/* Portada del taller: la foto real encima del degradado, que queda de respaldo.
   El sistema la pinta igual que aquí (page/template/4/workshop.blade.php: 220px, cover). */
.lla-ws__photo { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }

.lla-ws__status {
  position: absolute; top: 8px; left: 8px; display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 999px; font-size: 9px; font-weight: 700;
  transition: opacity .3s var(--lla-ease);
}
.lla-ws__status--soon { background: rgba(255, 255, 255, .92); color: var(--lla-brand); }
.lla-ws__status--live { background: var(--lla-live); color: #fff; opacity: 0; }
.lla-ws__status--live i { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: lla-ws-blink 1s steps(1, end) infinite; }
.lla-ws[data-state="live"] .lla-ws__status--soon { opacity: 0; }
.lla-ws[data-state="live"] .lla-ws__status--live { opacity: 1; }

.lla-ws__body { display: flex; flex-direction: column; gap: 5px; padding: 12px 16px; }
.lla-ws__title { font-size: 15px !important; font-weight: 800; }
.lla-ws__teacher { color: var(--lla-muted); }
.lla-ws__meta { display: flex; align-items: center; gap: 6px; color: var(--lla-text); }
.lla-ws__meta .bi { color: var(--lla-brand); }
.lla-ws__spots { margin-top: 4px; padding: 8px 10px; border-radius: 10px; background: var(--lla-surface); }
.lla-ws__spots-row { display: flex; justify-content: space-between; margin-bottom: 5px; }
.lla-ws__spots-row small { color: var(--lla-muted); }
.lla-ws__bar { display: block; height: 6px; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
.lla-ws__bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #0ea5e9, #0e7490); transition: width .6s var(--lla-ease); }
.lla-ws__price { margin-top: 4px; color: var(--lla-brand) !important; font-size: 16px !important; font-weight: 800; }

.lla-ws__btn {
  display: flex; align-items: center; justify-content: center; gap: 6px; height: 36px; margin-top: 4px;
  border-radius: 10px; color: #fff; font-size: 12px; font-weight: 700; transition: transform .15s var(--lla-ease);
}
.lla-ws__btn--join { background: var(--lla-brand); }
.lla-ws__btn--enter { display: none; background: var(--lla-live); box-shadow: 0 6px 16px -6px rgba(220, 38, 38, .6); }
.lla-ws__btn.is-pressed, .lla-ws__pay.is-pressed { transform: scale(.94); }
.lla-ws__done {
  display: none; align-items: center; justify-content: center; gap: 6px; height: 36px; margin-top: 4px;
  border-radius: 10px; background: #dcfce7; color: var(--lla-ok); font-size: 12px; font-weight: 700;
}
.lla-ws:is([data-state="joined"]) .lla-ws__btn--join { display: none; }
.lla-ws:is([data-state="joined"]) .lla-ws__done { display: flex; animation: lla-ws-pop .45s var(--lla-ease); }
.lla-ws[data-state="live"] .lla-ws__btn--join { display: none; }
.lla-ws[data-state="live"] .lla-ws__btn--enter { display: flex; animation: lla-ws-pop .45s var(--lla-ease); }

/* ---------- Hoja de pago ---------- */
.lla-ws__backdrop { position: absolute; inset: 0; background: rgba(17, 24, 39, .4); opacity: 0; transition: opacity .35s var(--lla-ease); pointer-events: none; }
.lla-ws__sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; flex-direction: column; gap: 9px;
  padding: 16px 16px 22px; border-radius: 20px 20px 0 0; background: #fff; box-shadow: 0 -10px 30px rgba(17, 24, 39, .2);
  transform: translateY(105%); transition: transform .45s var(--lla-ease);
}
.lla-ws:is([data-state="checkout"], [data-state="paying"]) .lla-ws__backdrop { opacity: 1; }
.lla-ws:is([data-state="checkout"], [data-state="paying"]) .lla-ws__sheet { transform: none; }
.lla-ws__sheet-title { font-size: 13px !important; }
.lla-ws__line { display: flex; justify-content: space-between; gap: 8px; }
.lla-ws__card { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--lla-border); border-radius: 8px; color: var(--lla-muted); }
.lla-ws__card .bi { color: #635bff; font-size: 14px; }
.lla-ws__pay {
  position: relative; display: flex; align-items: center; justify-content: center; height: 36px;
  border-radius: 10px; background: var(--lla-brand); color: #fff; font-weight: 700; font-size: 12px; transition: transform .15s var(--lla-ease);
}
.lla-ws__pay-wait { position: absolute; display: none; }
.lla-ws[data-state="paying"] .lla-ws__pay-label { visibility: hidden; }
.lla-ws[data-state="paying"] .lla-ws__pay-wait { display: inline-flex; }

/* ---------- Puntero ---------- */
.lla-ws__cursor {
  position: absolute; top: 0; left: 0; z-index: 10; width: 22px; height: 22px; pointer-events: none; opacity: 0;
  transform: translate(330px, 500px); transition: transform .6s var(--lla-ease), opacity .3s var(--lla-ease); will-change: transform, opacity;
}
.lla-ws[data-cursor] .lla-ws__cursor { opacity: 1; }
.lla-ws__cursor svg { position: relative; display: block; width: 22px; height: 22px; fill: var(--lla-cursor-fill); stroke: var(--lla-cursor-edge); stroke-width: 1.4; stroke-linejoin: round; }
.lla-ws__cursor-ring { position: absolute; left: -10px; top: -12px; width: 28px; height: 28px; border: 2px solid var(--lla-cursor-ring); border-radius: 50%; opacity: 0; }
.lla-ws__cursor.is-tap svg { animation: lla-ws-press .3s var(--lla-ease); }
.lla-ws__cursor.is-tap .lla-ws__cursor-ring { animation: lla-ws-ripple .5s var(--lla-ease); }

/* ---------- Celular angosto (<400 px): solo el teléfono ---------- */
@container (max-width: 399px) {
  .lla .lla-ws__stage { --lla-w: 290; --lla-h: 540; }
  .lla-ws__phone { left: 15px; }
  .lla-ws__float { display: none; }
  .lla-ws__notif { left: 25px; top: 40px; }
  .lla-ws__clock { left: 50px; top: 90px; }
  .lla-ws__glow--a { left: -60px; }
  .lla-ws__glow--b { left: 0; }
}

@keyframes lla-ws-float { 50% { transform: translateY(-6px); } }
@keyframes lla-ws-press { 50% { transform: scale(.85); } }
@keyframes lla-ws-ripple { 0% { opacity: 1; transform: scale(.4); } 100% { opacity: 0; transform: scale(1.4); } }
@keyframes lla-ws-pop { 0% { transform: scale(.85); opacity: 0; } 70% { transform: scale(1.04); opacity: 1; } 100% { transform: scale(1); } }
@keyframes lla-ws-blink { 50% { opacity: 0; } }
