/*
  Tela do cliente — cor da loja no fundo, marca no centro, o resto entra e sai
  de baixo para cima. Nada aqui é clicável; é uma vitrine viva.
*/

.tela {
  --cor: #4425a7;
  --cor-escura: color-mix(in srgb, var(--cor) 72%, #000);
  --cor-clara: color-mix(in srgb, var(--cor) 55%, #fff);
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, var(--cor-clara) 0%, var(--cor) 48%, var(--cor-escura) 100%);
  color: #fff;
  font-family: inherit;
  user-select: none;
  cursor: none;
}

.tela-luz {
  position: absolute;
  border-radius: 999px;
  filter: blur(60px);
  opacity: 0.45;
  background: #fff;
  mix-blend-mode: soft-light;
  animation: tela-flutua 14s ease-in-out infinite;
}

.tela-luz-a {
  width: 46vmin;
  height: 46vmin;
  left: -8vmin;
  top: 12vmin;
}

.tela-luz-b {
  width: 38vmin;
  height: 38vmin;
  right: -6vmin;
  bottom: 8vmin;
  animation-delay: -6s;
}

@keyframes tela-flutua {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(4vmin, -3vmin, 0) scale(1.08);
  }
}

.tela-cena {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5vmin;
  text-align: center;
}

/* A marca da loja, num pedestal translúcido: a logo que a loja usa no
   cabeçalho já foi desenhada para a cor dela (a da Metra é branca), então
   pedestal branco a apagaria. A inicial entra quando não há logo. */
.tela-marca {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28vmin;
  height: 28vmin;
  border-radius: 24%;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28), inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  padding: 4vmin;
}

.tela-marca img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tela-marca-inicial {
  font-size: 12vmin;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.04em;
}

.tela-nome {
  margin-top: 4vmin;
  font-size: 5.2vmin;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.tela-frase {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 9vmin;
  padding: 0 6vmin;
  font-size: 2.8vmin;
  font-weight: 600;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.82);
}

.tela-frase strong {
  color: #fff;
  font-weight: 800;
}

/* ---------- a conta ---------- */

.tela-conta {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 4vmin;
  padding: 5vmin 6vmin;
}

.tela-conta-cabeca {
  display: flex;
  align-items: center;
  gap: 2vmin;
  margin-bottom: 3vmin;
}

.tela-marca-pequena {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 8vmin;
  height: 8vmin;
  border-radius: 24%;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  padding: 1.2vmin;
  flex-shrink: 0;
}

.tela-marca-pequena img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tela-marca-pequena span {
  font-size: 3.6vmin;
  font-weight: 900;
  color: #fff;
}

.tela-conta-titulo {
  font-size: 2.2vmin;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.tela-itens {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, #000 85%, transparent 100%);
}

.tela-itens-rolagem {
  display: grid;
  gap: 0.6vmin;
  align-content: end;
  min-height: 100%;
}

.tela-item {
  display: grid;
  grid-template-columns: 7vmin minmax(0, 1fr) auto;
  gap: 2vmin;
  align-items: center;
  padding: 1.6vmin 2.4vmin;
  border-radius: 2vmin;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(6px);
}

.tela-item-qtd {
  font-size: 3vmin;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.85);
}

.tela-item-nome {
  font-size: 2.9vmin;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tela-item-detalhe {
  font-size: 2vmin;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tela-item-total {
  font-size: 3vmin;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.tela-total {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  text-align: right;
}

.tela-total-rotulo {
  font-size: 2.4vmin;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.tela-total-valor {
  margin-top: 1vmin;
  font-size: 11vmin;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.tela-total-linha {
  margin-top: 2vmin;
  font-size: 2.4vmin;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
  font-variant-numeric: tabular-nums;
}

.tela-total-linha strong {
  color: #fff;
  font-weight: 800;
}

.tela-cliente {
  margin-top: 3vmin;
  font-size: 2.4vmin;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
}

/* ---------- pagamento ---------- */

.tela-passo-titulo {
  font-size: 6vmin;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.tela-passo-sub {
  margin-top: 2vmin;
  font-size: 2.8vmin;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
}

.tela-anel {
  position: relative;
  width: 16vmin;
  height: 16vmin;
  margin-bottom: 4vmin;
}

.tela-anel::before,
.tela-anel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 1.2vmin solid rgba(255, 255, 255, 0.18);
}

.tela-anel::after {
  border-color: #fff transparent transparent transparent;
  animation: tela-gira 0.9s linear infinite;
}

@keyframes tela-gira {
  to {
    transform: rotate(360deg);
  }
}

.tela-pagar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6vmin;
  align-items: center;
  text-align: left;
}

.tela-qr {
  width: 52vmin;
  height: 52vmin;
  padding: 3vmin;
  border-radius: 4vmin;
  background: #fff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
}

.tela-qr svg,
.tela-qr img {
  width: 100%;
  height: 100%;
  display: block;
}

.tela-pagar-valor {
  margin-top: 2vmin;
  font-size: 9vmin;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.tela-pagar-passos {
  margin-top: 3vmin;
  display: grid;
  gap: 1.2vmin;
  font-size: 2.6vmin;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
}

.tela-pagar-passos span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4vmin;
  height: 4vmin;
  margin-right: 1.4vmin;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 2vmin;
  font-weight: 900;
}

.tela-relogio {
  margin-top: 3.5vmin;
  display: inline-flex;
  align-items: center;
  gap: 1.4vmin;
  padding: 1.4vmin 2.4vmin;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  font-size: 3.2vmin;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.tela-relogio-urgente {
  background: rgba(220, 38, 38, 0.55);
}

.tela-relogio-rotulo {
  font-size: 2.2vmin;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
}

/* ---------- confirmado ---------- */

.tela-check {
  width: 26vmin;
  height: 26vmin;
  margin-bottom: 4vmin;
}

.tela-check circle {
  fill: none;
  stroke: #fff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 302;
  stroke-dashoffset: 302;
  animation: tela-traca 0.7s ease-out forwards;
}

.tela-check path {
  fill: none;
  stroke: #fff;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: tela-traca 0.45s ease-out 0.5s forwards;
}

@keyframes tela-traca {
  to {
    stroke-dashoffset: 0;
  }
}

.tela-verde {
  background: radial-gradient(120% 90% at 50% 0%, #34d399 0%, #059669 50%, #065f46 100%);
}

.tela-vermelha {
  background: radial-gradient(120% 90% at 50% 0%, #fb7185 0%, #e11d48 50%, #9f1239 100%);
}

.tela-cinza {
  background: radial-gradient(120% 90% at 50% 0%, #64748b 0%, #334155 50%, #0f172a 100%);
}

.tela-rodape {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2.4vmin;
  text-align: center;
  font-size: 1.8vmin;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.tela-desligada {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f0a1f;
  color: rgba(255, 255, 255, 0.7);
  font-size: 2.6vmin;
  font-weight: 600;
  text-align: center;
  padding: 6vmin;
}
