/*
 * Index: animación "Manejá tu salón en tiempo real" (módulo Local).
 * La base común (tarjeta, ventana, cursor, escala) está en landing_animacion.css.
 * Colores de estado iguales a los del Salón real (static/css/local.css).
 */

.tlc-envivo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #9fe0b8;
  font-size: 11px;
  font-weight: 600;
  opacity: 0;
  transition: opacity .3s;
}
.tlc-envivo i { width: 7px; height: 7px; border-radius: 50%; background: #28c840; box-shadow: 0 0 6px #28c840; animation: tlc-titila 1s ease-in-out infinite alternate; }
@keyframes tlc-titila { to { opacity: .3; } }
.tlc-anim.is-vivo .tlc-envivo,
.tlc-anim:not(.tlc-en-plano) .tlc-envivo { opacity: 1; }

/* -------------------------------------------------------------- escenas */
.tlc-escena {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .4s, transform .45s cubic-bezier(.2, .8, .2, 1);
}
.tlc-en-plano .tlc-escena--plano,
.tlc-en-cocina .tlc-escena--cocina,
.tlc-en-ventas .tlc-escena--ventas,
.tlc-en-stats .tlc-escena--stats { opacity: 1; transform: none; }

.tlc-cab {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 14px;
  height: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #222;
  font-size: 11px;
}
.tlc-cab-tit { font-size: 14px; font-weight: 700; white-space: nowrap; }
.tlc-cab-tit i { color: #e85e31; margin-right: 4px; }
.tlc-tabs { display: flex; gap: 5px; }
.tlc-tabs b, .tlc-tabs i {
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid #e3e6eb;
  background: #fff;
  font-style: normal;
  font-weight: 600;
  font-size: 10px;
}
.tlc-tabs b { background: #222; border-color: #222; color: #fff; }

.tlc-solo-vivo { display: none; }
.tlc-anim.is-vivo .tlc-solo-vivo { display: inline-flex; }
.tlc-anim.is-vivo .tlc-solo-editor { display: none !important; }
.tlc-anim.is-vivo .tlc-cab-tit .tlc-solo-vivo { display: inline; }

.tlc-leyenda { align-items: center; gap: 5px; color: #6b7280; font-size: 10px; }
.tlc-dot { display: inline-block; width: 9px; height: 9px; margin-left: 6px; border-radius: 50%; border: 2px dashed #c9ccd2; background: #fff; }
.tlc-dot--abierta { border: 2px solid #10b981; background: #e9f9f2; }
.tlc-dot--cerrada { border: 2px solid #eab308; background: #fdf6dc; }
.tlc-dot--demorada { border: 2px solid #dc2626; background: #fdecec; }

.tlc-guardar {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e3e6eb;
  color: #9aa3b2;
  font-weight: 700;
  transition: background .25s, color .25s, border-color .25s, transform .15s;
}
.tlc-guardar em { display: none; font-style: normal; padding: 0 6px; border-radius: 999px; background: #fff; color: #e85e31; font-size: 9.5px; }
.tlc-guardar.is-sucio { background: #e85e31; border-color: #e85e31; color: #fff; }
.tlc-guardar.is-sucio em { display: inline-block; }
.tlc-guardar.is-ok { background: #e9f7ef; border-color: #b7e4c7; color: #1f9d55; }
.tlc-guardar.is-press { transform: scale(.93); }

.tlc-paleta {
  position: absolute;
  left: 16px;
  top: 50px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: #6b7280;
}
.tlc-paleta > span { margin-right: 4px; font-weight: 600; }
.tlc-paleta b {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 8px;
  border: 1px solid #e3e6eb;
  background: #fff;
  color: #222;
  font-weight: 600;
  transition: transform .15s, border-color .2s, box-shadow .2s;
}
.tlc-paleta b.is-press { transform: scale(.92); border-color: #e85e31; box-shadow: 0 0 0 3px rgba(232, 94, 49, .18); }
.tlc-ico { display: inline-block; width: 11px; height: 11px; border: 1.5px solid #6b7280; border-radius: 3px; }
.tlc-ico--redonda { border-radius: 50%; }
.tlc-ico--larga { width: 17px; height: 9px; }

/* --------------------------------------------------------------- plano */
.tlc-canvas {
  position: absolute;
  left: 16px;
  top: 80px;
  width: 562px;
  height: 312px;
  border-radius: 12px;
  border: 1px solid #e3e6eb;
  background:
    linear-gradient(rgba(29, 35, 48, .05) 1px, transparent 1px) 0 0 / 20px 20px,
    linear-gradient(90deg, rgba(29, 35, 48, .05) 1px, transparent 1px) 0 0 / 20px 20px,
    #fff;
  overflow: hidden;
  transition: top .4s;
}
.tlc-anim.is-vivo .tlc-canvas { background: #fbfbfc; }

.tlc-el {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
}
.tlc-el--barra { background: #ead9c3; border: 2px solid #b08a5b; color: #6b4a22; }
.tlc-el--cocina { background: #fdeee6; border: 2px solid #f2a57f; color: #9a3d12; }
.tlc-el--puerta { background: repeating-linear-gradient(45deg, #fff, #fff 5px, #f3e8d9 5px, #f3e8d9 10px); border: 2px dashed #b08a5b; color: #6b4a22; font-size: 8px; }
.tlc-el--planta { width: 30px; height: 30px; border-radius: 50%; background: #cfead4; border: 2px solid #6fbf7f; }
.tlc-el--mostrador { background: #fdebe3; border: 2px solid #e85e31; color: #e85e31; border-radius: 10px; }
.tlc-el--mostrador em {
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #e85e31;
  color: #fff;
  font-style: normal;
  font-size: 9px;
  box-shadow: 0 0 0 2px #fff;
}
.tlc-anim.is-vivo .tlc-el--mostrador em { display: flex; }

.tlc-mesa {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border-radius: 10px;
  border: 2px solid #c9ccd2;
  background: #fff;
  color: #222;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
  transition: background .35s, border-color .35s, box-shadow .25s;
}
.tlc-mesa--redonda { border-radius: 50%; }
.tlc-mesa b { font-size: 10.5px; }
.tlc-mesa small { font-size: 8.5px; color: #6b7280; white-space: nowrap; }
.tlc-vivo { display: none; }

/* Movimiento al arrastrar/redimensionar (lo maneja el JS con left/top/width). */
.tlc-mesa.is-movil { transition: left .9s cubic-bezier(.45, .05, .25, 1), top .9s cubic-bezier(.45, .05, .25, 1), width .6s cubic-bezier(.45, .05, .25, 1), background .35s, border-color .35s, box-shadow .25s; }
.tlc-mesa.is-alzada { box-shadow: 0 12px 24px rgba(28, 34, 48, .22); z-index: 3; }

/* Mesa nueva: aparece con un "pop". */
.tlc-mesa--nueva { opacity: 0; transform: scale(.4); transition: opacity .3s, transform .45s cubic-bezier(.3, 1.6, .5, 1), left .9s cubic-bezier(.45, .05, .25, 1), top .9s cubic-bezier(.45, .05, .25, 1), background .35s, border-color .35s, box-shadow .25s; }
.tlc-mesa--nueva.is-on { opacity: 1; transform: none; }

/* Estados en vivo (mismos colores que el Salón real) */
.tlc-anim.is-vivo .tlc-cap { display: none; }
.tlc-anim.is-vivo .tlc-mesa .tlc-vivo { display: block; }
.tlc-anim.is-vivo .tlc-mesa:not(.tlc-mesa--abierta):not(.tlc-mesa--cerrada):not(.tlc-mesa--demorada) { border-style: dashed; }
.tlc-anim.is-vivo .tlc-mesa:not(.tlc-mesa--abierta):not(.tlc-mesa--cerrada):not(.tlc-mesa--demorada) .tlc-vivo { color: #9aa3b2; }
.tlc-mesa.tlc-mesa--abierta { border: 2px solid #10b981; background: #e9f9f2; }
.tlc-mesa.tlc-mesa--abierta .tlc-vivo { color: #047857; font-weight: 600; }
.tlc-mesa.tlc-mesa--cerrada { border: 2px solid #eab308; background: #fdf6dc; }
.tlc-mesa.tlc-mesa--cerrada .tlc-vivo { color: #a16207; font-weight: 600; }
.tlc-mesa.tlc-mesa--demorada { border: 2px solid #dc2626; background: #fdecec; animation: tlc-pulso 1.4s ease-in-out infinite; }
.tlc-mesa.tlc-mesa--demorada .tlc-vivo { color: #b91c1c; font-weight: 700; }
@keyframes tlc-pulso {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, .35); }
  50% { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); }
}

/* Selección, tiradores y guías (como en el editor del plano) */
.tlc-sel { position: absolute; inset: -5px; border: 1.5px solid #3d7cff; border-radius: 12px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.tlc-mesa--redonda .tlc-sel { border-radius: 50%; }
.tlc-mesa.is-sel .tlc-sel { opacity: 1; }
.tlc-h { position: absolute; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border: 1.5px solid #3d7cff; border-radius: 2px; background: #fff; }
.tlc-sel .tlc-h:nth-child(1) { left: 0; top: 0; }
.tlc-sel .tlc-h:nth-child(2) { left: 100%; top: 0; }
.tlc-sel .tlc-h:nth-child(3) { left: 100%; top: 100%; }
.tlc-sel .tlc-h:nth-child(4) { left: 0; top: 100%; }
.tlc-sel .tlc-h--e { left: 100%; top: 50%; width: 6px; height: 14px; margin: -7px 0 0 -3px; }
.tlc-guia { position: absolute; background: #ff2f86; opacity: 0; transition: opacity .15s; }
.tlc-guia--v { top: 0; bottom: 0; width: 1px; }
.tlc-guia--h { left: 0; right: 0; height: 1px; }
.tlc-canvas.is-guias .tlc-guia { opacity: 1; }

.tlc-burbuja {
  position: absolute;
  left: 50%;
  top: -26px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #1c2230;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 6px);
  transition: opacity .3s, transform .35s cubic-bezier(.3, 1.6, .5, 1);
}
.tlc-burbuja i { color: #f2a57f; }
.tlc-mesa.is-burbuja .tlc-burbuja { opacity: 1; transform: translate(-50%, 0); }

/* -------------------------------------------------------------- cocina */
.tlc-kds { position: absolute; left: 16px; right: 16px; top: 54px; display: grid; gap: 10px; }
.tlc-comanda {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e3e6eb;
  border-left: 4px solid #9aa3b2;
  box-shadow: 0 2px 8px rgba(28, 34, 48, .06);
  transition: border-color .3s, opacity .45s, transform .45s cubic-bezier(.2, .8, .2, 1), max-height .45s, padding .45s, margin .45s;
  max-height: 120px;
}
.tlc-comanda--prep { border-left-color: #eab308; }
.tlc-comanda--nueva { opacity: 0; transform: translateY(-14px); }
.tlc-comanda--nueva.is-on { opacity: 1; transform: none; }
.tlc-comanda.is-prep { border-left-color: #eab308; }
.tlc-comanda.is-entregada { border-left-color: #10b981; opacity: 0; transform: translateX(40px); }
.tlc-com-info { flex: 1; min-width: 0; }
.tlc-com-cab { display: flex; align-items: center; gap: 8px; font-size: 10px; color: #6b7280; }
.tlc-com-cab strong { font-size: 14px; color: #222; }
.tlc-com-cab small { margin-left: auto; font-size: 9.5px; }
.tlc-estado {
  padding: 2px 8px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
  font-style: normal;
  font-weight: 700;
  font-size: 9px;
  transition: background .3s, color .3s;
}
.tlc-comanda--prep .tlc-estado, .tlc-comanda.is-prep .tlc-estado { background: #fef3c7; color: #92400e; }
.tlc-comanda.is-entregada .tlc-estado { background: #d1fae5; color: #047857; }
.tlc-comanda ul { margin: 7px 0 0; padding: 0; list-style: none; display: grid; gap: 3px; font-size: 11.5px; color: #222; }
.tlc-comanda li b { color: #e85e31; margin-right: 3px; }
.tlc-acl { margin-left: 6px; padding: 1px 6px; border-radius: 5px; background: #fff7e6; color: #b45309; font-size: 9px; font-weight: 700; }
.tlc-com-acc { display: flex; flex-direction: column; gap: 6px; }
.tlc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #e3e6eb;
  background: #fff;
  color: #222;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  transition: transform .15s, box-shadow .2s;
}
.tlc-btn--pri { background: #e85e31; border-color: #e85e31; color: #fff; }
.tlc-btn.is-press { transform: scale(.92); box-shadow: 0 0 0 4px rgba(232, 94, 49, .25); }
.tlc-solo-prep { display: none; }
.tlc-comanda.is-prep .tlc-solo-pend { display: none; }
.tlc-comanda.is-prep .tlc-solo-prep { display: inline-flex; }

.tlc-ticket {
  position: absolute;
  right: 22px;
  top: 214px;
  width: 132px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px 14px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(28, 34, 48, .18);
  font: 600 9.5px/1.35 "Courier New", monospace;
  color: #222;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.1s steps(9, end);
  /* Borde de papel cortado */
  -webkit-mask: radial-gradient(4px at 50% 100%, transparent 98%, #000) 0 0 / 8px 100% repeat-x;
          mask: radial-gradient(4px at 50% 100%, transparent 98%, #000) 0 0 / 8px 100% repeat-x;
}
.tlc-ticket b { text-align: center; letter-spacing: .12em; font-size: 10.5px; }
.tlc-ticket span:first-of-type { text-align: center; }
.tlc-ticket hr { width: 100%; margin: 4px 0; border: 0; border-top: 1px dashed #9aa3b2; }
.tlc-ticket i { font-style: normal; color: #b45309; }
.tlc-anim.is-ticket .tlc-ticket { clip-path: inset(0 0 0 0); }

/* -------------------------------------------------------------- ventas */
.tlc-total { margin-left: auto; color: #6b7280; font-size: 10px; }
.tlc-total b { margin-left: 4px; color: #222; font-size: 13px; transition: color .3s; }
.tlc-total b.is-flash { color: #1f9d55; }
.tlc-ventas { position: absolute; left: 16px; right: 16px; top: 54px; display: grid; gap: 8px; }
.tlc-venta {
  display: grid;
  grid-template-columns: 38px 82px 1fr auto 70px;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e3e6eb;
  font-size: 10.5px;
  color: #222;
  transition: box-shadow .3s, border-color .3s;
}
.tlc-venta > b { color: #e85e31; }
.tlc-venta > span { font-weight: 600; white-space: nowrap; }
.tlc-venta > span i { color: #9aa3b2; margin-right: 3px; }
.tlc-venta > small { color: #6b7280; font-size: 9.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tlc-venta > strong { text-align: right; font-size: 12px; }
.tlc-venta.is-flash { border-color: #b7e4c7; box-shadow: 0 0 0 4px rgba(31, 157, 85, .12); }
.tlc-badge { padding: 2px 9px; border-radius: 999px; font-style: normal; font-weight: 700; font-size: 9px; transition: background .3s, color .3s; }
.tlc-badge--cerrada { background: #fdf6dc; color: #a16207; }
.tlc-badge--cobrada { background: #e0ecff; color: #1d4ed8; }

/* -------------------------------------------------------- estadísticas */
.tlc-cards { position: absolute; left: 16px; right: 16px; top: 54px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tlc-cards > div { padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid #e3e6eb; }
.tlc-cards span { display: block; color: #6b7280; font-size: 9.5px; font-weight: 600; }
.tlc-cards b { display: block; margin-top: 3px; font: 900 19px/1.1 "Nunito", sans-serif; color: #222; font-variant-numeric: tabular-nums; }
.tlc-paneles { position: absolute; left: 16px; right: 16px; top: 128px; display: grid; grid-template-columns: 1.15fr 1fr; gap: 10px; }
.tlc-panel-g { height: 236px; padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid #e3e6eb; }
.tlc-panel-tit { display: block; margin-bottom: 10px; font-size: 11px; font-weight: 700; color: #222; }
.tlc-barras { height: 168px; display: flex; align-items: flex-end; gap: 10px; padding: 0 4px; border-bottom: 1px solid #e3e6eb; }
.tlc-barras i { flex: 1; height: 0; border-radius: 5px 5px 0 0; background: #f6c4b2; transition: height .7s cubic-bezier(.2, .8, .2, 1); }
.tlc-barras i:nth-child(2) { transition-delay: .06s; }
.tlc-barras i:nth-child(3) { transition-delay: .12s; }
.tlc-barras i:nth-child(4) { transition-delay: .18s; }
.tlc-barras i:nth-child(5) { transition-delay: .24s; }
.tlc-barras i:nth-child(6) { transition-delay: .3s; }
.tlc-barras i:nth-child(7) { transition-delay: .36s; }
.tlc-barras i.is-top { background: #e85e31; }
.tlc-anim.is-graficos .tlc-barras i { height: var(--h); }
.tlc-dias { display: flex; gap: 10px; padding: 5px 4px 0; }
.tlc-dias span { flex: 1; text-align: center; font-size: 9px; color: #9aa3b2; }
.tlc-top { display: grid; gap: 14px; margin-top: 6px; }
.tlc-top > div { display: grid; grid-template-columns: 62px 1fr 26px; align-items: center; gap: 8px; font-size: 10px; color: #222; }
.tlc-top i { display: block; height: 9px; width: 0; border-radius: 999px; background: linear-gradient(90deg, #e85e31, #f6a07f); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.tlc-top > div:nth-child(2) i { transition-delay: .1s; }
.tlc-top > div:nth-child(3) i { transition-delay: .2s; }
.tlc-top > div:nth-child(4) i { transition-delay: .3s; }
.tlc-top b { text-align: right; font-variant-numeric: tabular-nums; }
.tlc-anim.is-graficos .tlc-top i { width: var(--w); }

/* Sin animación: el salón en vivo, quieto. */
.tlc-anim.is-estatico .tlc-mesa--nueva { opacity: 1; transform: none; }
