/* ==========================================================================
   Demo viva "tasks-day" (hero de /tareas): vista del día del módulo de Tareas;
   se crea una tarea asignada con prioridad Alta y otra se marca Completada.
   Markup: resources/views/web/partials/anim/tasks-day.blade.php
   Estados en la raíz:
     data-modal  "Nueva tarea" abierto · data-prio  prioridad Alta elegida
     data-person persona marcada · data-created  tarea nueva en la lista
     data-done   primera tarea completada · data-cursor  puntero visible
   El panel no tiene modo oscuro: solo halo y sombra.
   ========================================================================== */

/* ---------- Paleta ---------- */
.lla-tk {
  --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(245, 202, 153, .16);
  --lla-cursor-fill: #1e2022;
  --lla-cursor-edge: #ffffff;
  --lla-cursor-ring: rgba(55, 125, 255, .55);
}
html[data-theme="dark"] .lla-tk {
  --lla-glow-a: rgba(77, 159, 255, .14);
  --lla-glow-b: rgba(245, 202, 153, .1);
  --lla-shadow: 0 32px 64px -24px rgba(0, 0, 0, .8), 0 10px 24px -10px rgba(0, 0, 0, .55);
}

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

/* ---------- Ventana ---------- */
.lla-tk__win { position: absolute; left: 0; top: 10px; width: 680px; height: 460px; overflow: hidden; border: 1px solid var(--lla-border); border-radius: 14px; background: #f5f7fb; box-shadow: var(--lla-shadow); }
.lla-tk__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-tk__dots { display: flex; gap: 5px; }
.lla-tk__dots i { width: 9px; height: 9px; border-radius: 50%; background: #ff5f57; }
.lla-tk__dots i:nth-child(2) { background: #febc2e; }
.lla-tk__dots i:nth-child(3) { background: #28c840; }
.lla-tk__url { display: flex; align-items: center; gap: 6px; flex: 1; max-width: 340px; height: 20px; margin-inline: auto; padding: 0 10px; border-radius: 6px; background: #fff; color: var(--lla-muted); font-size: 11px; }
.lla-tk__url .bi { color: #198754; font-size: 9px; }
.lla-tk__panel { position: relative; height: calc(100% - 32px); padding: 12px; }
.lla-tk__card { height: 100%; overflow: hidden; border: 1px solid var(--lla-border); border-radius: 12px; background: #fff; }
.lla-tk__head { display: flex; align-items: center; gap: 7px; padding: 10px 12px 6px; font-size: 10.5px; }
.lla-tk__head > .bi { color: var(--lla-muted); font-size: 12px; }
.lla-tk__head > b { margin-right: auto; font-size: 14.5px; font-weight: 600; }
.lla-tk__search { display: flex; align-items: center; gap: 6px; width: 130px; height: 26px; padding: 0 8px; border: 1px solid #dfe3ea; border-radius: 6px; color: #97a4af; }
.lla-tk__sel { position: relative; height: 26px; padding: 5px 20px 0 8px; border: 1px solid #dfe3ea; border-radius: 6px; white-space: nowrap; }
.lla-tk__sel::after, .lla-tk__selin::after { content: ""; position: absolute; right: 8px; top: 9px; width: 5px; height: 5px; border-right: 1.5px solid #677788; border-bottom: 1.5px solid #677788; transform: rotate(45deg); }
.lla-tk__ghost { display: flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px; border: 1px solid #c4cad3; border-radius: 6px; white-space: nowrap; }
.lla-tk__add { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; background: var(--lla-primary); color: #fff; font-size: 12px; transition: transform .15s var(--lla-ease), filter .15s; }
.lla-tk__add.is-pressed { transform: scale(.9); filter: brightness(.9); }
.lla-tk__day { display: flex; align-items: center; gap: 8px; padding: 4px 12px 10px; border-bottom: 1px solid var(--lla-border); font-size: 11.5px; }
.lla-tk__day > .bi { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid #c4cad3; border-radius: 6px; font-size: 10px; }
.lla-tk__day strong { font-weight: 700; }
.lla-tk__day > span { display: flex; gap: 5px; margin-left: auto; }
.lla-tk__day > span .bi { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid #c4cad3; border-radius: 6px; font-size: 11px; }

.lla-tk__list { display: flex; flex-direction: column; gap: 7px; padding: 10px 12px; }
.lla-tk__item { padding: 8px 12px; border: 1px solid var(--lla-border); border-radius: 9px; background: #fff; transition: opacity .35s; }
.lla-tk__item--late { border-left: 3px solid #dc3545; }
.lla-tk__top { display: flex; justify-content: space-between; gap: 10px; }
.lla-tk__top b { font-size: 12.5px; font-weight: 600; transition: color .3s; }
.lla-tk__top small { display: inline-flex; align-items: center; gap: 4px; color: var(--lla-muted); font-size: 10.5px; white-space: nowrap; }
.lla-tk__top small .bi { color: #dc3545; }
.lla-tk__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; font-size: 10.5px; }
.lla-tk__meta > small { display: inline-flex; align-items: center; gap: 3px; color: var(--lla-muted); }
.lla-tk__p { padding: 2px 7px; border-radius: 5px; font-size: 10px; font-weight: 700; }
.lla-tk__p--low { background: rgba(113, 134, 157, .1); color: #71869d; }
.lla-tk__p--medium { background: rgba(9, 165, 190, .1); color: #09a5be; }
.lla-tk__p--high { background: rgba(245, 202, 153, .25); color: #e0912c; }
.lla-tk__p--urgent { background: rgba(237, 76, 120, .1); color: #ed4c78; }
.lla-tk__rep { padding: 1px 6px; border: 1px solid #e7eaf3; border-radius: 5px; background: #f8f9fa; font-size: 10px; }
.lla-tk__st { position: relative; display: inline-grid; padding: 3px 20px 3px 8px; border: 1px solid #dfe3ea; border-radius: 6px; font-size: 10.5px; transition: border-color .2s, box-shadow .2s; }
.lla-tk__st::after { content: ""; position: absolute; right: 8px; top: 8px; width: 5px; height: 5px; border-right: 1.5px solid #677788; border-bottom: 1.5px solid #677788; transform: rotate(45deg); }
.lla-tk__st em { grid-area: 1 / 1; }
.lla-tk__st em + em, .lla-tk[data-done] .lla-tk__st em:first-child { visibility: hidden; }
.lla-tk[data-done] .lla-tk__st em + em { visibility: visible; }
.lla-tk__st.is-pressed { border-color: rgba(55, 125, 255, .5); box-shadow: 0 0 0 3px rgba(55, 125, 255, .12); }
.lla-tk[data-done] .lla-tk__item--done { opacity: .65; }
.lla-tk[data-done] .lla-tk__item--done .lla-tk__top b { color: var(--lla-muted); text-decoration: line-through; }
.lla-tk__item--new { display: none; }
.lla-tk[data-created] .lla-tk__item--new { display: block; animation: lla-tk-in .5s var(--lla-ease) both; }

/* ---------- Modal ---------- */
.lla-tk__backdrop { position: absolute; inset: 0; background: rgba(19, 33, 68, .35); opacity: 0; transition: opacity .3s var(--lla-ease); }
.lla-tk[data-modal] .lla-tk__backdrop { opacity: 1; }
.lla-tk__modal { position: absolute; left: 50%; top: 18px; width: 440px; overflow: hidden; border-radius: 12px; background: #fff; box-shadow: 0 24px 50px -12px rgba(19, 33, 68, .45); opacity: 0; transform: translate(-50%, -14px); transition: opacity .3s var(--lla-ease), transform .35s var(--lla-ease); }
.lla-tk[data-modal] .lla-tk__modal { opacity: 1; transform: translate(-50%, 0); }
.lla-tk__modal header { display: flex; align-items: center; justify-content: space-between; padding: 11px 16px; border-bottom: 1px solid var(--lla-border); }
.lla-tk__modal header b { font-size: 14.5px; font-weight: 600; }
.lla-tk__modal header .bi { color: var(--lla-muted); font-size: 12px; }
.lla-tk__form { display: grid; grid-template-columns: 1.2fr .8fr 1fr; gap: 8px 10px; padding: 12px 16px; }
.lla-tk__form label { display: flex; flex-direction: column; gap: 4px; }
.lla-tk__form small { font-size: 10.5px; }
.lla-tk__wide { grid-column: 1 / -1; }
.lla-tk__in { position: relative; display: flex; align-items: center; height: 28px; padding: 0 9px; border: 1px solid #dfe3ea; border-radius: 6px; font-size: 11.5px; transition: border-color .2s, box-shadow .2s; }
.lla-tk__in.is-focus, .lla-tk__in.is-pressed { border-color: rgba(55, 125, 255, .5); box-shadow: 0 0 0 3px rgba(55, 125, 255, .12); }
.lla-tk__in.is-focus::after { content: ""; width: 1px; height: 13px; margin-left: 1px; background: var(--lla-text); animation: lla-tk-caret 1s steps(1) infinite; }
.lla-tk__selin { display: inline-grid; align-items: center; padding-right: 22px; }
.lla-tk__selin em { grid-area: 1 / 1; }
.lla-tk__selin em + em, .lla-tk[data-prio] .lla-tk__selin em:first-child { visibility: hidden; }
.lla-tk[data-prio] .lla-tk__selin em + em { visibility: visible; color: #e0912c; font-weight: 700; }
.lla-tk__people { display: flex; flex-direction: column; gap: 4px; padding: 7px 9px; border: 1px solid #e7eaf3; border-radius: 6px; }
.lla-tk__people > small { margin-bottom: 2px; font-weight: 600; }
.lla-tk__check { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; }
.lla-tk__check i { display: grid; place-items: center; width: 13px; height: 13px; border: 1px solid #c4cad3; border-radius: 3px; }
.lla-tk[data-person] [data-ref="person"] i { border-color: var(--lla-primary); background: var(--lla-primary); }
.lla-tk[data-person] [data-ref="person"] i::after { content: ""; width: 6px; height: 3px; margin-top: -2px; border-left: 1.5px solid #fff; border-bottom: 1.5px solid #fff; transform: rotate(-45deg); }
.lla-tk__modal footer { display: flex; justify-content: flex-end; padding: 10px 16px; border-top: 1px solid var(--lla-border); }
.lla-tk__create { display: inline-flex; align-items: center; gap: 5px; padding: 6px 13px; 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-tk__create.is-pressed { transform: scale(.95); filter: brightness(.9); }

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

@keyframes lla-tk-caret { 50% { opacity: 0; } }
@keyframes lla-tk-in { from { transform: translateY(-8px); background: rgba(55, 125, 255, .08); } to { transform: none; background: #fff; } }
@keyframes lla-tk-press { 50% { transform: scale(.85); } }
@keyframes lla-tk-ripple {
  0% { opacity: .9; transform: scale(.4); }
  100% { opacity: 0; transform: scale(1.4); }
}
