/* ==========================================================================
   Demo viva "pay-setup" (hero de /pagos): conectar Stripe y Mercado Pago,
   activar Apple Pay / Google Pay y MSI, y ver cómo aparecen en el paso de pago.
   Markup: resources/views/web/partials/anim/pay-setup.blade.php
   Estados en la raíz:
     data-oauth   redirección a Stripe en curso
     data-stripe · data-mp · data-wallet · data-msi   (conectado / activado)
     data-cursor  puntero visible
   Panel y tienda no tienen modo oscuro: solo halo y sombra.
   ========================================================================== */

/* ---------- Paleta ---------- */
.lla-ps {
  --lla-surface: #f8f9fa;
  --lla-text: #1e2022;
  --lla-muted: #677788;
  --lla-border: #e7eaf3;
  --lla-primary: #377dff;
  --lla-success: #198754;
  --lla-shadow: 0 32px 64px -24px rgba(22, 34, 58, .38), 0 10px 24px -10px rgba(22, 34, 58, .18);
  --lla-glow-a: rgba(99, 91, 255, .16);
  --lla-glow-b: rgba(0, 158, 227, .13);
  --lla-cursor-fill: #1e2022;
  --lla-cursor-edge: #ffffff;
  --lla-cursor-ring: rgba(55, 125, 255, .55);
  --lla-brand: #db2777;
}
html[data-theme="dark"] .lla-ps {
  --lla-glow-a: rgba(124, 115, 255, .14);
  --lla-glow-b: rgba(0, 158, 227, .1);
  --lla-shadow: 0 32px 64px -24px rgba(0, 0, 0, .8), 0 10px 24px -10px rgba(0, 0, 0, .55);
}

/* ---------- Escena ---------- */
.lla-ps { max-width: 720px; margin-inline: auto; color: var(--lla-text); line-height: 1.3; text-align: left; }
.lla .lla-ps__stage { --lla-w: 720; --lla-h: 490; }
.lla-ps :where(b, small, strong, em, i, p) { margin: 0; font-size: inherit; font-style: normal; font-weight: inherit; color: inherit; }
.lla-ps .bi::before { vertical-align: 0; }
.lla-ps__glow { position: absolute; border-radius: 50%; pointer-events: none; }
.lla-ps__glow--a { left: -30px; top: 20px; width: 480px; height: 460px; background: radial-gradient(closest-side, var(--lla-glow-a), transparent); }
.lla-ps__glow--b { left: 420px; top: 60px; width: 340px; height: 420px; background: radial-gradient(closest-side, var(--lla-glow-b), transparent); }

/* ---------- Panel ---------- */
.lla-ps__win { position: absolute; left: 0; top: 26px; width: 492px; height: 450px; overflow: hidden; border: 1px solid var(--lla-border); border-radius: 14px; background: #f5f7fb; box-shadow: var(--lla-shadow); }
.lla-ps__chrome { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 12px; border-bottom: 1px solid var(--lla-border); background: var(--lla-surface); }
.lla-ps__dots { display: flex; gap: 5px; }
.lla-ps__dots i { width: 9px; height: 9px; border-radius: 50%; background: #ff5f57; }
.lla-ps__dots i:nth-child(2) { background: #febc2e; }
.lla-ps__dots i:nth-child(3) { background: #28c840; }
.lla-ps__url { display: flex; align-items: center; gap: 6px; flex: 1; max-width: 330px; height: 20px; margin-inline: auto; padding: 0 10px; border-radius: 6px; background: #fff; color: var(--lla-muted); font-size: 11px; }
.lla-ps__url .bi { color: #198754; font-size: 9px; }
.lla-ps__panel { position: relative; height: calc(100% - 32px); padding: 12px; }
.lla-ps__card { margin-bottom: 10px; overflow: hidden; border: 1px solid var(--lla-border); border-radius: 12px; background: #fff; }
.lla-ps__card header { display: flex; align-items: center; gap: 6px; padding: 9px 14px; border-bottom: 1px solid var(--lla-border); }
.lla-ps__card header b { font-size: 13px; font-weight: 600; }
.lla-ps__beta { padding: 1px 6px; border-radius: 4px; background: #ffc107; color: #1e2022; font-size: 9.5px; font-weight: 700; }
.lla-ps__gw, .lla-ps__row { display: flex; align-items: center; gap: 11px; padding: 9px 14px; border-top: 1px solid #f1f3f7; }
.lla-ps__card header + .lla-ps__gw, .lla-ps__card header + .lla-ps__row { border-top: 0; }
.lla-ps__gw img { flex: none; width: 32px; height: 32px; object-fit: contain; }
.lla-ps__gw > span:nth-child(2), .lla-ps__row > span:nth-child(2) { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.lla-ps__gw b, .lla-ps__row b { font-size: 12px; font-weight: 700; }
.lla-ps__gw small, .lla-ps__row small { overflow: hidden; color: var(--lla-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.lla-ps__act { display: inline-grid; flex: none; justify-items: end; }
.lla-ps__act em { grid-area: 1 / 1; }
.lla-ps__btn { padding: 5px 10px; border: 1px solid #e7eaf3; border-radius: 6px; background: #fff; box-shadow: 0 1px 2px rgba(22, 34, 58, .08); font-size: 10.5px; font-weight: 600; transition: transform .15s var(--lla-ease), background-color .15s; }
.lla-ps__btn.is-pressed { transform: scale(.94); background: #f1f3f7; }
.lla-ps__ok { padding: 4px 9px; border-radius: 6px; background: rgba(25, 135, 84, .12); color: var(--lla-success); font-size: 10.5px; font-weight: 700; visibility: hidden; }
.lla-ps[data-stripe] [data-gw="stripe"] .lla-ps__btn, .lla-ps[data-mp] [data-gw="mp"] .lla-ps__btn { visibility: hidden; }
.lla-ps[data-stripe] [data-gw="stripe"] .lla-ps__ok, .lla-ps[data-mp] [data-gw="mp"] .lla-ps__ok { visibility: visible; animation: lla-ps-pop .4s var(--lla-ease); }
.lla-ps__ic { display: grid; flex: none; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(55, 125, 255, .1); color: var(--lla-primary); font-size: 14px; }
.lla-ps__sw { position: relative; flex: none; width: 30px; height: 17px; border-radius: 9px; background: #e7eaf3; transition: background-color .25s; }
.lla-ps__sw::after { content: ""; position: absolute; left: 2px; top: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .25s var(--lla-ease); }
.lla-ps[data-wallet] [data-ref="swWallet"], .lla-ps[data-msi] [data-ref="swMsi"] { background: var(--lla-primary); }
.lla-ps[data-wallet] [data-ref="swWallet"]::after, .lla-ps[data-msi] [data-ref="swMsi"]::after { transform: translateX(13px); }
.lla-ps:not([data-stripe]) .lla-ps__row { opacity: .55; }

.lla-ps__oauth { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: rgba(255, 255, 255, .92); opacity: 0; transition: opacity .25s; pointer-events: none; }
.lla-ps[data-oauth] .lla-ps__oauth { opacity: 1; }
.lla-ps__oauth > span { position: relative; display: grid; place-items: center; width: 58px; height: 58px; }
.lla-ps__oauth img { width: 34px; height: 34px; }
.lla-ps__spin { position: absolute; inset: 0; border: 3px solid rgba(99, 91, 255, .2); border-top-color: #635bff; border-radius: 50%; animation: lla-ps-spin .8s linear infinite; }
.lla-ps__oauth small { color: var(--lla-muted); font-size: 11.5px; font-weight: 600; }

/* ---------- Celular ---------- */
.lla-ps__phone { position: absolute; left: 512px; top: 40px; width: 204px; height: 430px; padding: 7px; border-radius: 36px; background: #0a0a0c; box-shadow: inset 0 0 0 2px #8a8e97, inset 0 0 0 3.5px #2b2d33, var(--lla-shadow); }
.lla-ps__screen { position: relative; display: flex; flex-direction: column; gap: 6px; height: 100%; overflow: hidden; padding: 34px 11px 18px; border-radius: 29px; background: #fff; font-size: 10.5px; }
.lla-ps__island { position: absolute; top: 8px; left: 50%; width: 56px; height: 17px; border-radius: 999px; background: #000; transform: translateX(-50%); }
.lla-ps__home { position: absolute; bottom: 6px; left: 50%; width: 36%; height: 4px; border-radius: 999px; background: rgba(0, 0, 0, .85); transform: translateX(-50%); }
.lla-ps__nav { display: flex; align-items: center; gap: 6px; padding-bottom: 7px; border-bottom: 1px solid #f1f2f5; }
.lla-ps__nav b { overflow: hidden; font-size: 10.5px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.lla-ps__nav > .bi { margin-left: auto; color: #198754; font-size: 10px; }
.lla-ps__logo { display: grid; flex: none; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--lla-brand); color: #fff; font-size: 8.5px; font-weight: 800; }
.lla-ps__h { margin: 2px 0 0 !important; font-size: 13px !important; font-weight: 800; }
.lla-ps__apple { display: none; align-items: center; justify-content: center; gap: 2px; padding: 8px; border-radius: 8px; background: #000; color: #fff; font-size: 13px; font-weight: 600; }
.lla-ps__pm { display: none; align-items: center; gap: 7px; padding: 7px; border: 1px solid #e5e7eb; border-radius: 9px; }
.lla-ps__pm--base { display: flex; }
.lla-ps__pm > i { flex: none; width: 12px; height: 12px; border: 1px solid #c4cad3; border-radius: 50%; }
.lla-ps__pm--card { border-color: var(--lla-brand); background: #fdf2f8; }
.lla-ps__pm--card > i { border-color: var(--lla-brand); background: var(--lla-brand); box-shadow: inset 0 0 0 3px #fff; }
.lla-ps__pm > span { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.lla-ps__pm b { font-size: 10.5px; font-weight: 700; }
.lla-ps__pm small { overflow: hidden; color: var(--lla-muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.lla-ps__pm em { color: var(--lla-muted); font-size: 13px; }
.lla-ps__pm img { width: 20px; height: 20px; object-fit: contain; }
.lla-ps__msi { display: none; flex-direction: column; gap: 2px; margin-top: -2px; padding: 6px 8px; border: 1px dashed #c4cad3; border-radius: 8px; }
.lla-ps__msi small { color: var(--lla-muted); font-size: 9px; }
.lla-ps__msi b { font-size: 10.5px; font-weight: 700; }
.lla-ps[data-stripe] [data-pm="stripe"], .lla-ps[data-mp] [data-pm="mp"], .lla-ps[data-wallet] [data-pm="wallet"], .lla-ps[data-msi] [data-pm="msi"] { display: flex; animation: lla-ps-in .45s var(--lla-ease); }
.lla-ps__total { display: flex; justify-content: space-between; margin-top: auto; padding-top: 8px; border-top: 1px solid #f1f2f5; font-size: 12px; }
.lla-ps__total b { font-weight: 800; }

/* ---------- Puntero ---------- */
.lla-ps__cursor { position: absolute; top: 0; left: 0; z-index: 10; width: 22px; height: 22px; pointer-events: none; opacity: 0; transform: translate(460px, 460px); transition: transform .6s var(--lla-ease), opacity .3s var(--lla-ease); }
.lla-ps[data-cursor] .lla-ps__cursor { opacity: 1; }
.lla-ps__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-ps__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-ps__cursor.is-tap svg { animation: lla-ps-press .3s var(--lla-ease); }
.lla-ps__cursor.is-tap .lla-ps__cursor-ring { animation: lla-ps-ripple .5s var(--lla-ease); }

/* ---------- Angosto ---------- */
@container (max-width: 479px) {
  .lla .lla-ps__stage { --lla-w: 520; --lla-h: 940; }
  .lla-ps__win { left: 14px; top: 10px; }
  .lla-ps__phone { left: 158px; top: 490px; }
}

@keyframes lla-ps-spin { to { transform: rotate(360deg); } }
@keyframes lla-ps-pop { 0% { transform: scale(.7); } 70% { transform: scale(1.08); } 100% { transform: none; } }
@keyframes lla-ps-in { from { transform: translateY(-6px); } to { transform: none; } }
@keyframes lla-ps-press { 50% { transform: scale(.85); } }
@keyframes lla-ps-ripple {
  0% { opacity: .9; transform: scale(.4); }
  100% { opacity: 0; transform: scale(1.4); }
}
