/* Demo "store-connect" (/mayoristas, "Así se conectan dos tiendas"). Base: ll-anim.css + fl-phone.css (cursor).
   Lienzo 960x540 con dos paneles lado a lado; en contenedor < 640 px se apilan (480x1060).
   Clases acumulativas en la raíz (las pone el JS): is-invited · is-accepted · is-share1 · is-share2 · is-priced · is-live */

.lla-sc {
  --sc-you: #4f46e5; --sc-them: #16a34a; --sc-win: #ffffff; --sc-bar: #f4f6fb; --sc-field: #f8fafc;
  --lla-brand: #4f46e5; --lla-cursor-ring: rgba(79, 70, 229, .55);
  max-width: 980px;
}
html[data-theme="dark"] .lla-sc {
  --sc-you: #818cf8; --sc-them: #4ade80; --sc-win: var(--ll-surface, #161d2d); --sc-bar: rgba(255, 255, 255, .05); --sc-field: rgba(255, 255, 255, .04);
  --lla-text: var(--ll-heading, #eef2f8); --lla-muted: #9aa5b8; --lla-border: rgba(255, 255, 255, .1);
}

.lla .lla-sc__stage { --lla-w: 960; --lla-h: 540; }
.lla-sc__layer { position: absolute; inset: 0; }

.lla-sc__win {
  position: absolute; top: 20px; width: 440px; height: 500px; overflow: hidden; border-radius: 18px;
  background: var(--sc-win); color: var(--lla-text); box-shadow: var(--lla-float-shadow); border: 1px solid var(--lla-border);
  font-size: 12px;
}
.lla-sc__win--you { left: 20px; }
.lla-sc__win--them { left: 500px; }

.lla-sc__bar { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px; background: var(--sc-bar); border-bottom: 1px solid var(--lla-border); font-weight: 700; font-size: 12px; }
.lla-sc__dots { display: flex; gap: 5px; }
.lla-sc__dots i { width: 9px; height: 9px; border-radius: 50%; background: #cbd5e1; }
.lla-sc__who { margin-left: auto; padding: 3px 9px; border-radius: 999px; font-size: 10px; font-weight: 800; color: #fff; }
.lla-sc__who--you { background: var(--sc-you); }
.lla-sc__who--them { background: var(--sc-them); }

.lla-sc__body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; }
.lla-sc__label { display: block; margin-top: 6px !important; color: var(--lla-muted); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }

/* Invitar */
.lla-sc__invite { display: flex; gap: 8px; }
.lla-sc__input { flex: 1; display: flex; align-items: center; height: 36px; padding: 0 10px; border-radius: 10px; border: 1.5px solid var(--lla-border); background: var(--sc-field); font-size: 12px; }
.lla-sc__prefix { color: var(--lla-muted); }
.lla-sc__typed { font-weight: 700; }
.lla-sc__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 10px;
  background: var(--sc-you); color: #fff; font-weight: 700; font-size: 12px; transition: transform .15s var(--lla-ease);
}
.lla-sc__btn--ok { height: 30px; padding: 0 12px; background: var(--sc-them); font-size: 11.5px; }

/* Conexiones */
.lla-sc__conn { display: grid; min-height: 46px; }
.lla-sc__conn > span { grid-area: 1 / 1; display: flex; align-items: center; transition: opacity .35s var(--lla-ease), transform .4s var(--lla-ease); }
.lla-sc__conn-empty { justify-content: center; border: 1.5px dashed var(--lla-border); border-radius: 12px; color: var(--lla-muted); font-size: 11px; }
.lla-sc__conn-row { gap: 10px; padding: 0 12px; border-radius: 12px; background: var(--sc-field); border: 1px solid var(--lla-border); opacity: 0; transform: translateY(6px); }
.lla-sc.is-invited .lla-sc__conn-empty { opacity: 0; }
.lla-sc.is-invited .lla-sc__conn-row { opacity: 1; transform: none; }
.lla-sc__avatar { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, #22c55e, #15803d); color: #fff; }
.lla-sc__status { margin-left: auto; display: inline-grid; font-size: 10px; font-weight: 800; }
.lla-sc__status > span { grid-area: 1 / 1; padding: 3px 9px; border-radius: 999px; text-align: center; transition: opacity .3s; }
.lla-sc__status-wait { background: rgba(245, 158, 11, .16); color: #b45309; }
.lla-sc__status-ok { background: rgba(22, 163, 74, .14); color: var(--sc-them); opacity: 0; }
.lla-sc.is-accepted .lla-sc__status-wait { opacity: 0; }
.lla-sc.is-accepted .lla-sc__status-ok { opacity: 1; }
html[data-theme="dark"] .lla-sc__status-wait { color: #fbbf24; }

/* Productos que compartes */
.lla-sc__list { display: flex; flex-direction: column; gap: 6px; opacity: .45; transition: opacity .4s var(--lla-ease); }
.lla-sc.is-accepted .lla-sc__list { opacity: 1; }
.lla-sc__item, .lla-sc__pricing { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--lla-border); }
.lla-sc__thumb { flex: none; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(160deg, #fef3c7, #fde68a); color: #b45309; font-size: 15px; }
.lla-sc__item-name { flex: 1; min-width: 0; }
.lla-sc__item-name b { display: block; font-size: 12px; }
.lla-sc__item-name small { display: block; color: var(--lla-muted); font-size: 10.5px; }
.lla-sc__toggle { position: relative; flex: none; width: 34px; height: 20px; border-radius: 999px; background: #cbd5e1; transition: background .25s; }
.lla-sc__toggle::after { content: ''; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .25s var(--lla-ease); }
html[data-theme="dark"] .lla-sc__toggle { background: #475569; }
.lla-sc.is-share1 [data-ref="toggle1"], .lla-sc.is-share2 [data-ref="toggle2"] { background: var(--sc-you); }
.lla-sc.is-share1 [data-ref="toggle1"]::after, .lla-sc.is-share2 [data-ref="toggle2"]::after { transform: translateX(14px); }

/* Invitación en el panel del cliente */
.lla-sc__inv {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(79, 70, 229, .08); border: 1px solid rgba(79, 70, 229, .25);
  opacity: 0; transform: translateY(-8px); transition: opacity .35s var(--lla-ease), transform .4s var(--lla-ease), background .3s, border-color .3s;
}
.lla-sc.is-invited .lla-sc__inv { opacity: 1; transform: none; }
.lla-sc.is-accepted .lla-sc__inv { background: rgba(22, 163, 74, .08); border-color: rgba(22, 163, 74, .3); }
.lla-sc__inv-icon { flex: none; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 9px; background: var(--sc-you); color: #fff; font-size: 15px; }
.lla-sc__inv-txt { flex: 1; min-width: 0; }
.lla-sc__inv-txt b { display: block; font-size: 12px; }
.lla-sc__inv-txt small { display: block; color: var(--lla-muted); font-size: 10.5px; }
.lla-sc__inv-act { display: inline-grid; }
.lla-sc__inv-act > span { grid-area: 1 / 1; justify-self: end; transition: opacity .3s; }
.lla-sc__inv-done { display: inline-flex; align-items: center; gap: 4px; color: var(--sc-them); font-weight: 800; font-size: 11.5px; opacity: 0; }
.lla-sc.is-accepted .lla-sc__btn--ok { opacity: 0; }
.lla-sc.is-accepted .lla-sc__inv-done { opacity: 1; }

/* Precio del cliente */
.lla-sc__pricing { flex-wrap: wrap; opacity: .35; transition: opacity .4s var(--lla-ease); }
.lla-sc.is-share1 .lla-sc__pricing { opacity: 1; }
.lla-sc__seg { display: inline-flex; padding: 2px; border-radius: 9px; background: var(--sc-field); border: 1px solid var(--lla-border); }
.lla-sc__seg i { padding: 4px 8px; border-radius: 7px; font-size: 10.5px; font-weight: 700; color: var(--lla-muted); transition: background .25s, color .25s; }
.lla-sc__seg i:first-child { background: var(--sc-win); color: var(--lla-text); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.lla-sc.is-priced .lla-sc__seg i:first-child { background: transparent; color: var(--lla-muted); box-shadow: none; }
.lla-sc.is-priced .lla-sc__seg-pct { background: var(--sc-them); color: #fff; }
.lla-sc__markup { width: 100%; padding-left: 42px; font-size: 11.5px; color: var(--lla-muted); max-height: 0; overflow: hidden; opacity: 0; transition: max-height .35s var(--lla-ease), opacity .3s; }
.lla-sc__markup b { color: var(--sc-them); font-size: 13px; }
.lla-sc.is-priced .lla-sc__markup { max-height: 22px; opacity: 1; }

/* Vista de la tienda */
.lla-sc__shop { position: relative; padding: 10px; border-radius: 14px; background: var(--sc-field); border: 1px solid var(--lla-border); }
.lla-sc__url { margin: 0 auto 10px; width: 70%; padding: 4px 10px; border-radius: 999px; background: var(--sc-win); color: var(--lla-muted); font-size: 10px; text-align: center; }
.lla-sc__url .bi { margin-right: 4px; font-size: 8px; }
.lla-sc__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.lla-sc__card {
  display: flex; flex-direction: column; gap: 3px; padding: 7px; border-radius: 11px; background: var(--sc-win); border: 1px solid var(--lla-border);
  opacity: 0; transform: scale(.9); transition: opacity .35s var(--lla-ease), transform .45s var(--lla-ease);
}
.lla-sc__card b { font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lla-sc__card strong { color: var(--sc-them); font-size: 12px; font-weight: 800; }
.lla-sc__card-img { display: flex; align-items: center; justify-content: center; height: 44px; border-radius: 8px; background: linear-gradient(160deg, #fef3c7, #fde68a); color: #b45309; font-size: 20px; }
.lla-sc__card--own { opacity: 1; transform: none; }
.lla-sc__card--own .lla-sc__card-img { background: linear-gradient(160deg, #fce7f3, #fbcfe8); color: #be185d; }
.lla-sc.is-live .lla-sc__card { opacity: 1; transform: none; }
.lla-sc.is-live .lla-sc__card:nth-child(2) { transition-delay: .15s; }
.lla-sc__live {
  position: absolute; right: 10px; top: -12px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px;
  background: var(--sc-them); color: #fff; font-size: 10.5px; font-weight: 800; opacity: 0; transform: translateY(6px); transition: opacity .3s .3s, transform .4s .3s var(--lla-ease);
}
.lla-sc.is-live .lla-sc__live { opacity: 1; transform: none; }

/* Flecha entre paneles */
.lla-sc__link {
  position: absolute; left: 462px; top: 252px; z-index: 5; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--sc-win); color: var(--lla-muted); border: 1px solid var(--lla-border); box-shadow: var(--lla-float-shadow); font-size: 15px; transition: background .3s, color .3s;
}
.lla-sc.is-accepted .lla-sc__link { background: var(--sc-them); color: #fff; border-color: transparent; }

.lla-sc .is-pressed { transform: scale(.94); }

/* Contenedor angosto: paneles apilados */
@container (max-width: 639px) {
  .lla .lla-sc__stage { --lla-w: 480; --lla-h: 1060; }
  .lla-sc__win--them { left: 20px; top: 540px; }
  .lla-sc__link { left: 222px; top: 512px; transform: rotate(90deg); }
}

