/* ==========================================================================
   Demo viva "checkout-mode" (hero de /checkout): con checkout estándar el
   cliente pasa al pago; el dueño cambia a "Pedir por WhatsApp", guarda, y el
   mismo carrito ahora abre WhatsApp con el pedido armado.
   Markup: resources/views/web/partials/anim/checkout-mode.blade.php
   Estados en la raíz:
     data-mode   standard | whatsapp   (radio marcado en el panel)
     data-live   la tienda ya usa "Pedir por WhatsApp" (tras Guardar)
     data-phone  cart | pay | wa       (pantalla del celular)
     data-cursor puntero visible
   Panel y tienda no tienen modo oscuro: solo halo y sombra.
   ========================================================================== */

/* ---------- Paleta ---------- */
.lla-ck {
  --lla-bg: #ffffff;
  --lla-surface: #f8f9fa;
  --lla-text: #1e2022;
  --lla-muted: #677788;
  --lla-border: #e7eaf3;
  --lla-primary: #377dff;
  --lla-shadow: 0 32px 64px -24px rgba(22, 34, 58, .38), 0 10px 24px -10px rgba(22, 34, 58, .18);
  --lla-glow-a: rgba(55, 125, 255, .16);
  --lla-glow-b: rgba(37, 211, 102, .14);
  --lla-cursor-fill: #1e2022;
  --lla-cursor-edge: #ffffff;
  --lla-cursor-ring: rgba(55, 125, 255, .55);
  --lla-brand: #db2777;
  --lla-wa: #25d366;
  --lla-wa-dark: #075e54;
}
html[data-theme="dark"] .lla-ck {
  --lla-glow-a: rgba(77, 159, 255, .14);
  --lla-glow-b: rgba(37, 211, 102, .1);
  --lla-shadow: 0 32px 64px -24px rgba(0, 0, 0, .8), 0 10px 24px -10px rgba(0, 0, 0, .55);
}

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

/* ---------- Panel ---------- */
.lla-ck__win { position: absolute; left: 0; top: 30px; width: 476px; height: 430px; overflow: hidden; border: 1px solid var(--lla-border); border-radius: 14px; background: #f5f7fb; box-shadow: var(--lla-shadow); }
.lla-ck__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-ck__dots { display: flex; gap: 5px; }
.lla-ck__dots i { width: 9px; height: 9px; border-radius: 50%; background: #ff5f57; }
.lla-ck__dots i:nth-child(2) { background: #febc2e; }
.lla-ck__dots i:nth-child(3) { background: #28c840; }
.lla-ck__url { display: flex; align-items: center; gap: 6px; flex: 1; max-width: 260px; height: 20px; margin-inline: auto; padding: 0 10px; border-radius: 6px; background: #fff; color: var(--lla-muted); font-size: 11px; }
.lla-ck__url .bi { color: #198754; font-size: 9px; }
.lla-ck__card { margin: 14px; overflow: hidden; border: 1px solid var(--lla-border); border-radius: 12px; background: #fff; }
.lla-ck__card header { padding: 10px 14px; border-bottom: 1px solid var(--lla-border); font-size: 13.5px; font-weight: 600; }
.lla-ck__body { padding: 10px 14px 12px; font-size: 11.5px; }
.lla-ck__muted { margin-bottom: 9px !important; color: var(--lla-muted); font-size: 10.5px; }
.lla-ck__label { display: block; margin-bottom: 7px; font-size: 11.5px; font-weight: 700; }
.lla-ck__label--sep { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--lla-border); }
.lla-ck__radio { display: flex; gap: 8px; margin-bottom: 7px; }
.lla-ck__radio > i { flex: none; width: 14px; height: 14px; margin-top: 1px; border: 1px solid #c4cad3; border-radius: 50%; }
.lla-ck__radio > span { display: flex; flex-direction: column; gap: 2px; }
.lla-ck__radio strong { font-weight: 700; }
.lla-ck__radio small { color: var(--lla-muted); font-size: 10.5px; }
.lla-ck[data-mode="whatsapp"] [data-ref="rWa"] > i, .lla-ck[data-mode="standard"] .lla-ck__radio--std > i { border-color: var(--lla-primary); background: var(--lla-primary); box-shadow: inset 0 0 0 3px #fff; }
.lla-ck__num { display: none; flex-direction: column; gap: 3px; margin-top: 4px; }
.lla-ck__num small { color: var(--lla-text); font-weight: 600; }
.lla-ck__num em { display: flex; align-items: center; gap: 6px; width: 180px; height: 26px; padding: 0 9px; border: 1px solid #dfe3ea; border-radius: 6px; font-size: 11px; }
.lla-ck__num .bi { color: var(--lla-wa); }
.lla-ck[data-mode="whatsapp"] .lla-ck__num { display: flex; animation: lla-ck-in .35s var(--lla-ease); }
.lla-ck__switch { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.lla-ck__switch i { position: relative; width: 26px; height: 15px; border-radius: 8px; background: var(--lla-primary); }
.lla-ck__switch i::after { content: ""; position: absolute; right: 2px; top: 2px; width: 11px; height: 11px; border-radius: 50%; background: #fff; }
.lla-ck__switch strong { font-weight: 700; }
.lla-ck__foot { display: flex; justify-content: flex-end; }
.lla-ck__save { padding: 6px 14px; border-radius: 6px; background: var(--lla-primary); color: #fff; font-size: 11.5px; font-weight: 600; transition: transform .15s var(--lla-ease), filter .15s; }
.lla-ck__save.is-pressed { transform: scale(.95); filter: brightness(.9); }

/* ---------- Celular ---------- */
.lla-ck__phone { position: absolute; left: 500px; top: 40px; width: 212px; height: 420px; 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-ck__screen { position: relative; height: 100%; overflow: hidden; border-radius: 29px; background: #fff; font-size: 11px; }
.lla-ck__island { position: absolute; top: 8px; left: 50%; z-index: 5; width: 56px; height: 17px; border-radius: 999px; background: #000; transform: translateX(-50%); }
.lla-ck__home { position: absolute; bottom: 6px; left: 50%; z-index: 5; width: 36%; height: 4px; border-radius: 999px; background: rgba(0, 0, 0, .85); transform: translateX(-50%); }
.lla-ck__view { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 34px 12px 18px; background: #fff; opacity: 0; transform: translateX(16px); transition: opacity .35s var(--lla-ease), transform .4s var(--lla-ease); }
.lla-ck[data-phone="cart"] .lla-ck__view--cart, .lla-ck[data-phone="pay"] .lla-ck__view--pay, .lla-ck[data-phone="wa"] .lla-ck__view--wa { opacity: 1; transform: none; }
.lla-ck__nav { display: flex; align-items: center; gap: 6px; padding-bottom: 8px; border-bottom: 1px solid #f1f2f5; }
.lla-ck__nav b { overflow: hidden; font-size: 10.5px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.lla-ck__nav > .bi { margin-left: auto; color: #198754; font-size: 10px; }
.lla-ck__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-ck__h { margin: 10px 0 8px !important; font-size: 13.5px !important; font-weight: 800; }
.lla-ck__item { display: flex; align-items: center; gap: 7px; padding: 6px; border: 1px solid #eef0f3; border-radius: 10px; }
.lla-ck__item > i { display: grid; flex: none; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: #fdf2f8; font-size: 20px; }
.lla-ck__item > span { display: flex; flex-direction: column; min-width: 0; }
.lla-ck__item b { overflow: hidden; font-size: 10.5px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.lla-ck__item small { color: var(--lla-muted); font-size: 9.5px; }
.lla-ck__item strong { margin-left: auto; font-size: 10.5px; font-weight: 700; }
.lla-ck__tot { display: flex; justify-content: space-between; margin-top: 8px; }
.lla-ck__tot--b { padding-top: 7px; border-top: 1px solid #f1f2f5; font-size: 12px; font-weight: 800; }
.lla-ck__cta { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: auto; padding: 10px; border-radius: 10px; background: var(--lla-brand); color: #fff; font-size: 11.5px; font-weight: 700; transition: background-color .35s, transform .15s var(--lla-ease), filter .15s; }
.lla-ck__cta.is-pressed { transform: scale(.97); filter: brightness(.9); }
.lla-ck__cta em { display: inline-flex; align-items: center; gap: 6px; }
.lla-ck__cta-wa { display: none !important; }
.lla-ck[data-live] [data-ref="cta"] { background: var(--lla-wa); }
.lla-ck[data-live] .lla-ck__cta-wa { display: inline-flex !important; }
.lla-ck[data-live] .lla-ck__cta-std { display: none; }

.lla-ck__pm { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; padding: 8px; border: 1px solid #e5e7eb; border-radius: 10px; }
.lla-ck__pm > i { flex: none; width: 13px; height: 13px; border: 1px solid #c4cad3; border-radius: 50%; }
.lla-ck__pm.is-on { border-color: var(--lla-brand); background: #fdf2f8; }
.lla-ck__pm.is-on > i { border-color: var(--lla-brand); background: var(--lla-brand); box-shadow: inset 0 0 0 3px #fff; }
.lla-ck__pm > span { display: flex; flex-direction: column; min-width: 0; }
.lla-ck__pm b { font-size: 10.5px; font-weight: 700; }
.lla-ck__pm small { color: var(--lla-muted); font-size: 9px; }
.lla-ck__pm em { margin-left: auto; color: var(--lla-muted); font-size: 14px; }

.lla-ck__view--wa { padding: 0; background: #efeae2; }
.lla-ck__wahead { display: flex; align-items: center; gap: 7px; padding: 32px 10px 8px; background: var(--lla-wa-dark); color: #fff; }
.lla-ck__wahead b { overflow: hidden; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.lla-ck__chat { display: flex; flex: 1; flex-direction: column; justify-content: flex-end; padding: 10px 8px; }
.lla-ck__bubble { align-self: flex-end; max-width: 88%; padding: 7px 9px 4px; border-radius: 9px 2px 9px 9px; background: #d9fdd3; box-shadow: 0 1px 1px rgba(0, 0, 0, .08); font-size: 10.5px; }
.lla-ck__bubble p { margin-bottom: 6px !important; line-height: 1.35; }
.lla-ck__bubble strong { font-weight: 700; }
.lla-ck__bubble small { display: flex; justify-content: flex-end; gap: 3px; color: #667781; font-size: 8.5px; }
.lla-ck__bubble small .bi { color: #53bdeb; }
.lla-ck[data-phone="wa"] .lla-ck__bubble { animation: lla-ck-pop .45s var(--lla-ease) .25s both; }
.lla-ck__wabar { display: flex; align-items: center; gap: 6px; margin: 0 6px 20px; }
.lla-ck__wabar span { flex: 1; padding: 7px 10px; border-radius: 999px; background: #fff; color: #8696a0; font-size: 10px; }
.lla-ck__wabar .bi { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #00a884; color: #fff; font-size: 11px; }

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

/* ---------- Angosto ---------- */
@container (max-width: 479px) {
  .lla .lla-ck__stage { --lla-w: 500; --lla-h: 920; }
  .lla-ck__win { left: 12px; top: 10px; }
  .lla-ck__phone { left: 144px; top: 480px; }
}

@keyframes lla-ck-in { from { transform: translateY(-4px); } to { transform: none; } }
@keyframes lla-ck-pop { from { transform: translateY(10px) scale(.96); } to { transform: none; } }
@keyframes lla-ck-press { 50% { transform: scale(.85); } }
@keyframes lla-ck-ripple {
  0% { opacity: .9; transform: scale(.4); }
  100% { opacity: 0; transform: scale(1.4); }
}
