/* ==========================================================================
   Demo viva "student-code" (hero de /estudiantes): la solicitud se aprueba,
   llega el correo con el código EST…, se copia y se valida en Suscripciones:
   el plan Ilimitado baja al precio de estudiante.
   Markup: resources/views/web/partials/anim/student-code.blade.php
   Estados en la raíz:
     data-chip  aprobada · data-mail  correo visible · data-copy  código copiado
     data-plan  modal del plan visible · data-applied  descuento aplicado
     data-cursor puntero visible
   Correo y panel no tienen modo oscuro: solo halo y sombra.
   ========================================================================== */

.lla-st {
  --lla-text: #1e2022;
  --lla-muted: #677788;
  --lla-border: #e7eaf3;
  --lla-primary: #377dff;
  --lla-ok: #00a389;
  --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, .18);
  --lla-glow-b: rgba(0, 201, 167, .14);
  --lla-cursor-fill: #1e2022;
  --lla-cursor-edge: #ffffff;
  --lla-cursor-ring: rgba(55, 125, 255, .55);
}
html[data-theme="dark"] .lla-st {
  --lla-glow-a: rgba(77, 159, 255, .14);
  --lla-glow-b: rgba(74, 217, 145, .1);
  --lla-shadow: 0 32px 64px -24px rgba(0, 0, 0, .8), 0 10px 24px -10px rgba(0, 0, 0, .55);
}

.lla-st { max-width: 480px; margin-inline: auto; color: var(--lla-text); line-height: 1.3; text-align: left; }
.lla .lla-st__stage { --lla-w: 480; --lla-h: 540; }
.lla-st :where(b, small, strong, em, i, p, s, ins, label) { margin: 0; font-size: inherit; font-style: normal; font-weight: inherit; color: inherit; }
.lla-st .bi::before { vertical-align: 0; }
.lla-st__glow { position: absolute; border-radius: 50%; pointer-events: none; }
.lla-st__glow--a { left: -40px; top: 0; width: 400px; height: 400px; background: radial-gradient(closest-side, var(--lla-glow-a), transparent); }
.lla-st__glow--b { left: 140px; top: 220px; width: 360px; height: 340px; background: radial-gradient(closest-side, var(--lla-glow-b), transparent); }

.lla-st__chip { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: #00c9a7; color: #fff; font-size: 12px; font-weight: 700; box-shadow: 0 8px 18px -8px rgba(0, 163, 137, .6); opacity: 0; transform: translate(70px, 64px); transition: opacity .4s var(--lla-ease), transform 1.2s cubic-bezier(.45, 0, .15, 1); }
.lla-st[data-chip] .lla-st__chip { opacity: 1; transform: translate(70px, 70px); }
.lla-st[data-plan] .lla-st__chip { transform: none; }

/* ---------- Correo ---------- */
.lla-st__mail { position: absolute; left: 0; top: 40px; width: 340px; overflow: hidden; border: 1px solid var(--lla-border); border-radius: 14px; background: #f7f7fb; box-shadow: var(--lla-shadow); opacity: 0; transform: translate(70px, 84px); transition: opacity .5s var(--lla-ease), transform 1.2s cubic-bezier(.45, 0, .15, 1); }
.lla-st[data-mail] .lla-st__mail { opacity: 1; transform: translate(70px, 70px); }
.lla-st[data-plan] .lla-st__mail { transform: none; }
.lla-st__mailbar { display: flex; align-items: center; gap: 9px; height: 42px; padding: 0 13px; border-bottom: 1px solid var(--lla-border); background: #fff; }
.lla-st__mailbar .bi { color: #3b82f6; font-size: 15px; }
.lla-st__mailbar span { display: flex; flex-direction: column; min-width: 0; }
.lla-st__mailbar b { font-size: 11.5px; font-weight: 700; }
.lla-st__mailbar small { overflow: hidden; color: var(--lla-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.lla-st__mbody { margin: 10px; padding: 14px 16px; border-radius: 8px; background: #fff; font-size: 11px; line-height: 1.5; }
.lla-st__icon { display: grid; place-items: center; width: 30px; height: 30px; margin-bottom: 10px; border-radius: 8px; background: #0b1220; color: #fff; font-size: 15px; font-weight: 800; }
.lla-st__mbody p { margin-bottom: 7px !important; color: #334155; }
.lla-st__code { display: block; margin: 10px 0; padding: 11px; border: 2px dashed var(--lla-primary); border-radius: 8px; background: #f1f5ff; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 17px; font-weight: 700; letter-spacing: 3px; text-align: center; transition: transform .15s var(--lla-ease), background-color .3s; }
.lla-st__code.is-pressed { transform: scale(.97); }
.lla-st[data-copy] .lla-st__code { background: #e3ecff; }
.lla-st__btn { display: inline-block; padding: 7px 14px; border-radius: 5px; background: var(--lla-primary); color: #fff; font-size: 11px; font-weight: 600; }
.lla-st__foot { display: block; margin-top: 9px; color: var(--lla-muted); font-size: 9.5px; }

/* ---------- Plan (Suscripciones) ---------- */
.lla-st__plan { position: absolute; left: 140px; top: 300px; z-index: 2; width: 336px; overflow: hidden; border: 1px solid var(--lla-border); border-radius: 12px; background: #fff; box-shadow: var(--lla-shadow); opacity: 0; transform: translate(24px, 28px) scale(.97); transition: opacity .7s ease .45s, transform 1s cubic-bezier(.2, .8, .2, 1) .45s; }
.lla-st[data-plan] .lla-st__plan { opacity: 1; transform: none; }
.lla-st__plan header { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--lla-border); }
.lla-st__plan header b { font-size: 13px; font-weight: 600; }
.lla-st__plan header .bi { color: var(--lla-muted); font-size: 11px; }
.lla-st__pbody { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; font-size: 11px; }
.lla-st__prow { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; padding: 9px 11px; border: 1px solid rgba(55, 125, 255, .4); border-radius: 9px; background: rgba(55, 125, 255, .05); }
.lla-st__prow > span { display: flex; flex-direction: column; }
.lla-st__prow b { font-size: 12.5px; font-weight: 700; }
.lla-st__prow small { color: var(--lla-muted); font-size: 10px; }
.lla-st__prow strong { display: flex; align-items: baseline; gap: 5px; font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.lla-st__prow s { display: none; color: var(--lla-muted); font-size: 11px; font-weight: 500; }
.lla-st__prow ins { display: none; color: var(--lla-ok); text-decoration: none; }
.lla-st[data-applied] .lla-st__prow s, .lla-st[data-applied] .lla-st__prow ins { display: inline; }
.lla-st[data-applied] .lla-st__prow em { display: none; }
.lla-st[data-applied] .lla-st__prow ins { animation: lla-st-pop .45s var(--lla-ease); }
.lla-st__pbody label { color: var(--lla-muted); font-size: 9.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.lla-st__group { display: flex; align-items: stretch; height: 30px; overflow: hidden; border: 1px solid #dfe3ea; border-radius: 6px; }
.lla-st__group > .bi { display: grid; place-items: center; padding: 0 9px; border-right: 1px solid #dfe3ea; color: var(--lla-muted); font-size: 11px; }
.lla-st__cin { display: flex; flex: 1; align-items: center; padding: 0 9px; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.lla-st__cin:empty::before { content: attr(data-ph); color: #9aa5b4; font-weight: 400; letter-spacing: 0; text-transform: none; }
.lla-st__cin.is-focus::after { content: ""; width: 1px; height: 13px; margin-left: 1px; background: var(--lla-text); animation: lla-st-caret 1s steps(1) infinite; }
.lla-st__val { display: grid; place-items: center; padding: 0 12px; border-left: 1px solid var(--lla-primary); color: var(--lla-primary); font-size: 11px; font-weight: 600; transition: background-color .15s; }
.lla-st__val.is-pressed { background: rgba(55, 125, 255, .12); }
.lla-st__ok { display: none; align-items: center; gap: 5px; color: var(--lla-ok); font-size: 10.5px; font-weight: 600; }
.lla-st[data-applied] .lla-st__ok { display: flex; animation: lla-st-in .4s var(--lla-ease); }
.lla-st__months { display: none; padding: 6px 9px; border-radius: 7px; background: #f1f5ff; color: #2a4a8a; font-size: 10px; }
.lla-st[data-applied] .lla-st__months { display: block; }

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

.lla-st[data-fade] :is(.lla-st__chip, .lla-st__mail, .lla-st__plan) { opacity: 0; transition: opacity .4s var(--lla-ease); }

@keyframes lla-st-caret { 50% { opacity: 0; } }
@keyframes lla-st-pop { 0% { transform: scale(.6); } 70% { transform: scale(1.1); } 100% { transform: none; } }
@keyframes lla-st-in { from { transform: translateY(-4px); } to { transform: none; } }
@keyframes lla-st-press { 50% { transform: scale(.85); } }
@keyframes lla-st-ripple {
  0% { opacity: .9; transform: scale(.4); }
  100% { opacity: 0; transform: scale(1.4); }
}
