/* ==========================================================================
   Demo viva "integrations" (hero de /integraciones): Marketing → Integraciones.
   En SEO se agrega un tag y el ID de Google Analytics; en IA / Traducción se
   conecta OpenAI, se activa y la tienda pública se ve en inglés.
   Markup: resources/views/web/partials/anim/integrations.blade.php
   Estados en la raíz:
     data-tab  seo | ai     data-tagged  tag nuevo agregado
     data-verified · data-active  (llave de IA)   data-en  tienda traducida
     data-cursor  puntero visible
   Panel y tienda no tienen modo oscuro: solo halo y sombra.
   ========================================================================== */

/* ---------- Paleta ---------- */
.lla-ig {
  --lla-surface: #f8f9fa;
  --lla-text: #1e2022;
  --lla-muted: #677788;
  --lla-border: #e7eaf3;
  --lla-primary: #377dff;
  --lla-success: #00c9a7;
  --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(124, 58, 237, .12);
  --lla-cursor-fill: #1e2022;
  --lla-cursor-edge: #ffffff;
  --lla-cursor-ring: rgba(55, 125, 255, .55);
  --lla-brand: #db2777;
}
html[data-theme="dark"] .lla-ig {
  --lla-glow-a: rgba(77, 159, 255, .14);
  --lla-glow-b: rgba(167, 139, 250, .1);
  --lla-shadow: 0 32px 64px -24px rgba(0, 0, 0, .8), 0 10px 24px -10px rgba(0, 0, 0, .55);
}

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

/* ---------- Panel ---------- */
.lla-ig__win { position: absolute; left: 0; top: 18px; width: 500px; height: 440px; overflow: hidden; border: 1px solid var(--lla-border); border-radius: 14px; background: #f5f7fb; box-shadow: var(--lla-shadow); }
.lla-ig__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-ig__dots { display: flex; gap: 5px; }
.lla-ig__dots i { width: 9px; height: 9px; border-radius: 50%; background: #ff5f57; }
.lla-ig__dots i:nth-child(2) { background: #febc2e; }
.lla-ig__dots i:nth-child(3) { background: #28c840; }
.lla-ig__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-ig__url .bi { color: #198754; font-size: 9px; }
.lla-ig__panel { position: relative; height: calc(100% - 32px); padding: 12px; }
.lla-ig__tabs { display: flex; gap: 10px; margin-bottom: 10px; padding: 0 10px; border: 1px solid var(--lla-border); border-radius: 10px; background: #fff; font-size: 9.8px; white-space: nowrap; }
.lla-ig__tabs span { padding: 9px 0 7px; border-bottom: 2px solid transparent; color: var(--lla-muted); transition: color .25s, border-color .25s; }
.lla-ig[data-tab="seo"] .lla-ig__t-seo, .lla-ig[data-tab="ai"] .lla-ig__t-ai { border-color: var(--lla-primary); color: var(--lla-primary); font-weight: 600; }
.lla-ig__tabs .is-pressed { transform: scale(.95); }

.lla-ig__card { position: absolute; left: 12px; right: 12px; top: 58px; overflow: hidden; border: 1px solid var(--lla-border); border-radius: 12px; background: #fff; opacity: 0; transform: translateY(6px); transition: opacity .35s var(--lla-ease), transform .4s var(--lla-ease); }
.lla-ig[data-tab="seo"] .lla-ig__view--seo, .lla-ig[data-tab="ai"] .lla-ig__view--ai { opacity: 1; transform: none; }
.lla-ig__card header { display: flex; align-items: center; gap: 7px; padding: 10px 14px; border-bottom: 1px solid var(--lla-border); font-size: 13px; font-weight: 600; }
.lla-ig__card header .bi { color: var(--lla-primary); }
.lla-ig__body { padding: 12px 14px; font-size: 11.5px; }
.lla-ig__fld { display: grid; grid-template-columns: 112px 1fr; align-items: start; gap: 10px; margin-bottom: 10px; }
.lla-ig__fld label { padding-top: 6px; font-weight: 600; }
.lla-ig__fld label .bi { color: var(--lla-muted); font-size: 10px; }
.lla-ig__fld a { margin-left: 3px; color: var(--lla-primary); font-weight: 500; }
.lla-ig__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-height: 32px; padding: 4px 6px; border: 1px solid #dfe3ea; border-radius: 6px; }
.lla-ig__tags em { padding: 2px 7px; border: 1px solid var(--lla-primary); border-radius: 5px; background: rgba(55, 125, 255, .08); color: var(--lla-primary); font-size: 10.5px; font-weight: 600; }
.lla-ig__newtag { display: none; }
.lla-ig[data-tagged] .lla-ig__newtag { display: inline; animation: lla-ig-pop .35s var(--lla-ease); }
.lla-ig__tagin { flex: 1; min-width: 90px; font-size: 11px; }
.lla-ig__tagin:empty::before { content: attr(data-ph); color: #9aa5b4; }
.lla-ig__in { display: flex; align-items: center; height: 30px; padding: 0 10px; border: 1px solid #dfe3ea; border-radius: 6px; font-size: 11.5px; }
.lla-ig .is-focus { border-color: rgba(55, 125, 255, .5); box-shadow: 0 0 0 3px rgba(55, 125, 255, .12); }
.lla-ig .is-focus::after { content: ""; width: 1px; height: 13px; margin-left: 1px; background: var(--lla-text); animation: lla-ig-caret 1s steps(1) infinite; }
.lla-ig__tagin.is-focus { box-shadow: none; }
.lla-ig__card footer { display: flex; justify-content: flex-end; padding: 9px 14px; border-top: 1px solid var(--lla-border); }
.lla-ig__btn { display: inline-flex; align-items: center; gap: 4px; 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-ig__btn .bi { font-size: 9px; }
.lla-ig__btn--sm { padding: 5px 10px; font-size: 10.5px; }
.lla-ig__btn.is-pressed, .lla-ig__use.is-pressed { transform: scale(.95); filter: brightness(.9); }

.lla-ig__intro { margin-bottom: 8px !important; color: var(--lla-muted); font-size: 10.5px; line-height: 1.45; }
.lla-ig__prov { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px; padding: 8px 0; border-top: 1px solid #f1f3f7; }
.lla-ig__pname { display: flex; align-items: center; gap: 6px; }
.lla-ig__pname b { font-weight: 700; }
.lla-ig__ver, .lla-ig__act { display: none; padding: 2px 6px; border-radius: 4px; color: #fff; font-size: 9.5px; font-weight: 700; }
.lla-ig__ver { background: #00c9a7; }
.lla-ig__act { background: var(--lla-primary); }
.lla-ig[data-verified]:not([data-active]) .lla-ig__ver { display: inline; animation: lla-ig-pop .35s var(--lla-ease); }
.lla-ig[data-active] .lla-ig__act { display: inline; animation: lla-ig-pop .35s var(--lla-ease); }
.lla-ig__use { display: none; padding: 4px 8px; border-radius: 5px; background: rgba(55, 125, 255, .1); color: var(--lla-primary); font-size: 10px; font-weight: 600; transition: transform .15s var(--lla-ease); }
.lla-ig[data-verified]:not([data-active]) .lla-ig__use { display: inline-block; }
.lla-ig__keyrow { display: flex; grid-column: 1 / -1; gap: 6px; }
.lla-ig__key { display: flex; flex: 1; align-items: center; height: 28px; overflow: hidden; border: 1px solid #dfe3ea; border-radius: 6px; }
.lla-ig__key .bi { display: grid; place-items: center; height: 100%; padding: 0 8px; border-right: 1px solid #dfe3ea; color: var(--lla-muted); font-size: 11px; }
.lla-ig__key em { display: flex; align-items: center; height: 100%; padding: 0 8px; font-size: 11px; letter-spacing: .04em; }
.lla-ig__model { display: flex; align-items: center; width: 90px; padding: 0 8px; border: 1px solid #dfe3ea; border-radius: 6px; color: var(--lla-muted); font-size: 10.5px; }
.lla-ig__prov--on { padding-bottom: 10px; }

/* ---------- Celular ---------- */
.lla-ig__phone { position: absolute; left: 514px; top: 40px; width: 200px; height: 412px; 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-ig__screen { position: relative; height: 100%; overflow: hidden; border-radius: 29px; background: #fff; font-size: 10.5px; }
.lla-ig__island { position: absolute; top: 8px; left: 50%; z-index: 5; width: 56px; height: 17px; border-radius: 999px; background: #000; transform: translateX(-50%); }
.lla-ig__home { position: absolute; bottom: 6px; left: 50%; width: 36%; height: 4px; border-radius: 999px; background: rgba(0, 0, 0, .85); transform: translateX(-50%); }
.lla-ig__snav { display: flex; align-items: center; gap: 6px; margin: 34px 11px 0; padding-bottom: 8px; border-bottom: 1px solid #f1f2f5; }
.lla-ig__snav b { overflow: hidden; font-size: 10px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.lla-ig__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-ig__flag { display: inline-grid; margin-left: auto; padding: 2px 5px; border: 1px solid #e5e7eb; border-radius: 6px; font-size: 8.5px; font-weight: 700; white-space: nowrap; }
.lla-ig__flag em { grid-area: 1 / 1; transition: opacity .3s; }
.lla-ig__flag em + em, .lla-ig[data-en] .lla-ig__flag em:first-child { opacity: 0; }
.lla-ig[data-en] .lla-ig__flag em + em { opacity: 1; }
.lla-ig__lang { position: absolute; left: 11px; right: 11px; top: 74px; bottom: 18px; display: flex; flex-direction: column; gap: 6px; transition: opacity .45s var(--lla-ease), filter .45s; }
.lla-ig__lang--1, .lla-ig[data-en] .lla-ig__lang--0 { opacity: 0; filter: blur(3px); }
.lla-ig[data-en] .lla-ig__lang--1 { opacity: 1; filter: none; }
.lla-ig__sh { margin-bottom: 2px !important; font-size: 13px !important; font-weight: 800; }
.lla-ig__prod { display: flex; align-items: center; gap: 7px; padding: 6px; border: 1px solid #eef0f3; border-radius: 10px; }
.lla-ig__prod > i { display: grid; flex: none; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: #fdf2f8; font-size: 19px; }
.lla-ig__prod > span { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.lla-ig__prod b { overflow: hidden; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.lla-ig__prod small { overflow: hidden; color: var(--lla-muted); font-size: 8.5px; text-overflow: ellipsis; white-space: nowrap; }
.lla-ig__prod strong { font-size: 10px; font-weight: 700; }
.lla-ig__cta { margin-top: auto; margin-bottom: 26px; padding: 8px; border-radius: 9px; background: var(--lla-brand); color: #fff; font-size: 11px; font-weight: 700; text-align: center; }
.lla-ig__ai { position: absolute; left: 50%; bottom: 86px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: #1e1b4b; color: #e0e7ff; font-size: 9px; font-weight: 700; white-space: nowrap; opacity: 0; transform: translate(-50%, 6px); transition: opacity .3s .3s, transform .4s var(--lla-ease) .3s; }
.lla-ig__ai .bi { color: #fde68a; }
.lla-ig[data-en] .lla-ig__ai { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Puntero ---------- */
.lla-ig__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-ig[data-cursor] .lla-ig__cursor { opacity: 1; }
.lla-ig__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-ig__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-ig__cursor.is-tap svg { animation: lla-ig-press .3s var(--lla-ease); }
.lla-ig__cursor.is-tap .lla-ig__cursor-ring { animation: lla-ig-ripple .5s var(--lla-ease); }

/* ---------- Angosto ---------- */
@container (max-width: 479px) {
  .lla .lla-ig__stage { --lla-w: 520; --lla-h: 920; }
  .lla-ig__win { left: 10px; top: 8px; }
  .lla-ig__phone { left: 160px; top: 480px; }
}

@keyframes lla-ig-caret { 50% { opacity: 0; } }
@keyframes lla-ig-pop { 0% { transform: scale(.6); } 70% { transform: scale(1.08); } 100% { transform: none; } }
@keyframes lla-ig-press { 50% { transform: scale(.85); } }
@keyframes lla-ig-ripple {
  0% { opacity: .9; transform: scale(.4); }
  100% { opacity: 0; transform: scale(1.4); }
}
