/* Lista da Vez · tablet interativo desenhado em código */
.ldv-secao {
  --ldv-c1: hsl(262 60% 55%);
  --ldv-c2: hsl(200 55% 48%);
  --ldv-c3: hsl(345 55% 55%);
  --ldv-c4: hsl(150 40% 42%);
  --ldv-c5: hsl(220 15% 45%);
}
.ldv-dupla { align-items: start; }
.ldv-texto .lista-check { margin-top: 28px; }
.ldv-texto .lista-check strong { color: var(--texto); font-weight: 600; }

.ldv-palco { container-type: inline-size; position: sticky; top: 100px; }
@media (max-width: 900px) { .ldv-palco { position: static; } }
.ldv-nota { text-align: center; }

/* moldura */
.ldv-tablet {
  position: relative;
  padding: clamp(10px, 2.4cqw, 18px);
  border-radius: clamp(18px, 3.6cqw, 30px);
  background: linear-gradient(160deg, var(--superficie-2), var(--fundo-2));
  border: 1px solid var(--linha-forte);
  box-shadow: var(--sombra), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.ldv-tablet::before { /* câmera frontal */
  content: ''; position: absolute; left: 50%; top: clamp(4px, 1cqw, 7px); width: 6px; height: 6px; margin-left: -3px;
  border-radius: 50%; background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, .5);
}
.ldv-tela {
  display: flex; flex-direction: column;
  border-radius: clamp(10px, 1.8cqw, 16px); overflow: hidden;
  background: var(--fundo); border: 1px solid var(--linha);
  font-size: clamp(10.5px, 2.15cqw, 14px); line-height: 1.35;
}

/* barra de status */
.ldv-barra { display: flex; align-items: center; gap: .8em; padding: .7em 1.1em; border-bottom: 1px solid var(--linha); background: var(--fundo-2); font-size: .9em; color: var(--texto-2); }
.ldv-loja { font-weight: 600; color: var(--texto); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ldv-hora { margin-left: auto; }
.ldv-barra .selo { font-size: .8em; padding: 2px 8px; }

/* corpo em duas colunas */
.ldv-corpo { display: grid; grid-template-columns: .95fr 1.05fr; gap: 1px; background: var(--linha); }
.ldv-fila, .ldv-atend { background: var(--fundo); padding: 1em 1.1em 1.1em; min-width: 0; }
.ldv-h { font: 600 .8em/1 var(--font-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--texto-3); margin: 0 0 .9em; }

.ldv-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: .4em; }
.ldv-item { display: flex; align-items: center; gap: .6em; min-height: 44px; padding: .4em .6em; border-radius: .8em; color: var(--texto-2); position: relative; will-change: transform; }
.ldv-item.ldv-vez { background: rgba(var(--acento-rgb), .1); box-shadow: inset 0 0 0 1px rgba(var(--acento-rgb), .35); color: var(--texto); flex-wrap: wrap; }
.ldv-item.ldv-vez .ldv-nome { font-weight: 600; }
.ldv-item .ldv-btn { margin-left: auto; }
.ldv-nome { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ldv-pos { margin-left: auto; font-size: .8em; color: var(--texto-3); white-space: nowrap; }
.ldv-pausa { margin-top: .6em; border-top: 1px dashed var(--linha-forte); border-radius: 0; padding-top: .8em; color: var(--texto-3); }
.ldv-pausa .ldv-avatar { opacity: .55; }
.ldv-avatar {
  flex: none; width: 2.3em; height: 2.3em; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 1em; color: var(--texto);
  background: var(--cor, var(--marca)); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .22);
}
.ldv-avatar-g { width: 3em; height: 3em; font-size: 1.1em; }

/* botões (alvo ≥ 44px) */
.ldv-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  min-height: 44px; padding: 0 1.1em; border-radius: .8em; border: 1px solid transparent;
  font-weight: 600; font-size: 1em; cursor: pointer; white-space: nowrap;
  transition: background .2s, border-color .2s, transform .15s var(--ease);
}
.ldv-btn:active { transform: translateY(1px); }
.ldv-btn svg { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ldv-btn-marca { background: var(--marca); color: var(--texto); box-shadow: 0 6px 18px rgba(var(--marca-rgb), .35); }
.ldv-btn-marca:hover { background: var(--marca-hover); }
.ldv-btn-ok { background: var(--verde); color: var(--fundo); }
.ldv-btn-ok:hover { filter: brightness(1.08); }
.ldv-btn-nao { background: rgba(255, 255, 255, .06); border-color: var(--linha-forte); color: var(--texto); }
.ldv-btn-nao:hover { border-color: rgba(255, 255, 255, .35); }
.ldv-btn-mic { width: 100%; background: rgba(var(--acento-rgb), .12); border-color: rgba(var(--acento-rgb), .4); color: var(--acento-2); margin-top: .8em; position: relative; }
.ldv-btn-mic:hover { background: rgba(var(--acento-rgb), .2); }
.ldv-btn-mic.ouvindo { color: var(--texto); border-color: var(--acento); }
.ldv-btn-mic.ouvindo svg { animation: ldv-mic 1s infinite; }
@keyframes ldv-mic { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }

/* painel de atendimento */
.ldv-atend { position: relative; display: flex; flex-direction: column; }
.ldv-estado { display: flex; flex-direction: column; justify-content: center; gap: .55em; flex: 1; min-height: 12.5em; position: relative; }
.ldv-estado-titulo { font-family: var(--font-display); font-size: 1.35em; line-height: 1.15; letter-spacing: -.02em; color: var(--texto); }
.ldv-estado-titulo strong { color: var(--acento-2); font-weight: 600; }
.ldv-estado-sub { color: var(--texto-2); font-size: .92em; }
.ldv-estado-sub strong { color: var(--texto); }
.ldv-ic-grande { width: 2.6em; height: 2.6em; fill: none; stroke: var(--texto-3); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: .2em; }
.ldv-ic-ok { stroke: var(--verde); }
.ldv-estrela { stroke: var(--ambar); fill: var(--ambar); animation: ldv-estrela .7s var(--ease) both; }
@keyframes ldv-estrela { from { transform: scale(.3) rotate(-30deg); opacity: 0; } to { transform: none; opacity: 1; } }
.ldv-quem { display: flex; align-items: center; gap: .8em; }
.ldv-quem strong { display: block; font-size: 1.15em; color: var(--texto); }
.ldv-sub { color: var(--texto-2); font-size: .9em; }
.ldv-botoes { display: grid; grid-template-columns: 1fr 1fr; gap: .6em; margin-top: .4em; }
.ldv-chips { display: flex; flex-wrap: wrap; gap: .45em; }
.ldv-chip { min-height: 44px; padding: 0 .95em; border-radius: 999px; border: 1px solid var(--linha-forte); background: rgba(255, 255, 255, .04); color: var(--texto-2); font-size: .92em; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.ldv-chip:hover { color: var(--texto); border-color: rgba(255, 255, 255, .35); }
.ldv-chip[aria-pressed="true"] { background: rgba(var(--acento-rgb), .16); color: var(--texto); border-color: rgba(var(--acento-rgb), .5); }
.ldv-transcricao { margin-top: .5em; padding: .55em .8em; border-radius: .6em; background: var(--fundo-2); border: 1px solid var(--linha); color: var(--texto); font-size: .95em; min-height: 2.6em; font-variant-numeric: normal; }
.ldv-transcricao::after { content: ''; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--acento); animation: ldv-cursor 1s steps(2) infinite; }
.ldv-transcricao.pronta::after { display: none; }
@keyframes ldv-cursor { to { opacity: 0; } }

/* confete em CSS (só transform/opacity) */
.ldv-estado-vendeu { overflow: hidden; }
.ldv-confete { position: absolute; inset: 0; pointer-events: none; }
.ldv-confete span { position: absolute; left: 50%; top: 42%; width: .45em; height: .75em; border-radius: 2px; background: var(--acento); opacity: 0; }
.ldv-confete span:nth-child(3n) { background: var(--verde); }
.ldv-confete span:nth-child(3n+1) { background: var(--ambar); }
.ldv-confete span:nth-child(4n) { background: var(--info); border-radius: 50%; }
.ldv-estado-vendeu.festa .ldv-confete span { animation: ldv-confete 1.1s var(--ease) both; }
.ldv-confete span:nth-child(1) { --dx: -9em; --dy: -5em; --rot: 400deg; }
.ldv-confete span:nth-child(2) { --dx: -6em; --dy: -7em; --rot: -520deg; animation-delay: .05s; }
.ldv-confete span:nth-child(3) { --dx: -3em; --dy: -8em; --rot: 300deg; animation-delay: .1s; }
.ldv-confete span:nth-child(4) { --dx: 1em; --dy: -8.5em; --rot: -380deg; }
.ldv-confete span:nth-child(5) { --dx: 4em; --dy: -7.5em; --rot: 460deg; animation-delay: .07s; }
.ldv-confete span:nth-child(6) { --dx: 7em; --dy: -5.5em; --rot: -300deg; animation-delay: .12s; }
.ldv-confete span:nth-child(7) { --dx: 10em; --dy: -3em; --rot: 540deg; animation-delay: .03s; }
.ldv-confete span:nth-child(8) { --dx: -10em; --dy: -1em; --rot: -420deg; animation-delay: .09s; }
.ldv-confete span:nth-child(9) { --dx: -5em; --dy: 3em; --rot: 360deg; animation-delay: .14s; }
.ldv-confete span:nth-child(10) { --dx: 0; --dy: 4.5em; --rot: -500deg; animation-delay: .06s; }
.ldv-confete span:nth-child(11) { --dx: 5.5em; --dy: 3em; --rot: 320deg; animation-delay: .11s; }
.ldv-confete span:nth-child(12) { --dx: 9em; --dy: 1em; --rot: -360deg; animation-delay: .02s; }
@keyframes ldv-confete {
  0% { transform: translate(0, 0) rotate(0); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; }
}

/* rodapé: placar + ranking */
.ldv-rodape { display: grid; grid-template-columns: 1.1fr .9fr; gap: 1px; background: var(--linha); border-top: 1px solid var(--linha); }
.ldv-placar, .ldv-ranking { background: var(--fundo-2); padding: .9em 1.1em 1em; margin: 0; min-width: 0; }
.ldv-placar-linha { display: flex; justify-content: space-between; align-items: baseline; gap: .6em; font-size: .9em; color: var(--texto-2); }
.ldv-placar-linha strong { color: var(--texto); font-size: 1.1em; }
.ldv-placar-linha small { color: var(--acento-2); font-weight: 600; }
.ldv-barra-meta { height: .6em; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; margin: .55em 0; }
.ldv-barra-meta span { display: block; height: 100%; width: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--marca-escura), var(--acento)); transform-origin: left; transition: transform .8s var(--ease); }
.ldv-ranking { list-style: none; display: grid; gap: .3em; align-content: start; }
.ldv-ranking li { display: flex; align-items: center; gap: .55em; font-size: .9em; color: var(--texto-2); will-change: transform; }
.ldv-ranking li .tnum { margin-left: auto; color: var(--texto); }
.ldv-rk-pos { flex: none; width: 1.6em; height: 1.6em; border-radius: 50%; display: grid; place-items: center; font-size: .78em; font-weight: 700; background: rgba(255, 255, 255, .08); color: var(--texto-2); }
.ldv-ranking li:first-child .ldv-rk-pos { background: var(--ambar); color: var(--fundo); }
.ldv-ranking li:first-child .ldv-rk-nome { color: var(--texto); font-weight: 600; }
.ldv-rk-nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* container estreito (celular): botão Atender ocupa a linha de baixo */
@container (max-width: 520px) {
  .ldv-item.ldv-vez .ldv-btn { flex: 1 1 100%; margin-left: 0; }
  .ldv-botoes { grid-template-columns: 1fr; }
  .ldv-barra .selo { display: none; }
}
@container (max-width: 360px) {
  .ldv-corpo { grid-template-columns: 1fr; }
  .ldv-rodape { grid-template-columns: 1fr; }
  .ldv-estado { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .ldv-confete { display: none; }
  .ldv-estrela, .ldv-btn-mic.ouvindo svg, .ldv-transcricao::after { animation: none; }
  .ldv-item, .ldv-ranking li, .ldv-barra-meta span { transition: none !important; }
}

/* tela real do tablet (captura) */
.ldv-real { margin: 56px auto 0; max-width: 980px; }
.ldv-vitrine img { aspect-ratio: 16 / 10; }
.ldv-real .nota { text-align: center; margin-top: 14px; }
