/* ───────── roleta de saída ───────── */

.roleta {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(1, 13, 9, 0.82);
  opacity: 0;
  transition: opacity 220ms ease;
}
.roleta.visivel { opacity: 1; }
body.roleta-aberta { overflow: hidden; }

.roleta-caixa {
  position: relative;
  width: min(100%, 400px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 28px 22px 22px;
  border-radius: var(--raio-card);
  background: var(--noite-2);
  box-shadow: inset 0 0 0 2px var(--noite-3), 0 24px 60px rgba(0, 0, 0, 0.5);
  text-align: center;
  transform: translateY(16px) scale(0.96);
  transition: transform 320ms var(--mola);
}
.roleta.visivel .roleta-caixa { transform: none; }

.roleta-fechar {
  position: absolute;
  top: 8px; right: 8px;
  width: 44px; height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--texto-apagado);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}
.roleta-fechar:hover { color: var(--branco); background: var(--noite-3); }

.roleta-selo {
  margin: 0 0 6px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ouro);
}
.roleta h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.7rem;
  line-height: 1.15;
}
.roleta-sub { margin: 8px 0 0; color: var(--texto-apagado); font-size: 0.95rem; }

.roleta-roda {
  position: relative;
  width: min(72vw, 270px);
  aspect-ratio: 1;
  margin: 20px auto 18px;
  border-radius: 50%;
  box-shadow: 0 0 0 6px var(--ouro), 0 0 40px rgba(255, 200, 30, 0.35);
}
.roleta-disco {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  transition: transform 3600ms cubic-bezier(.12, .7, .14, 1);
}
.roleta-disco path { stroke: var(--noite); stroke-width: 1.5; }
.roleta-disco text {
  font-family: var(--display);
  font-size: 12px;
  text-anchor: middle;
  dominant-baseline: middle;
}
.roleta-ponteiro {
  position: absolute;
  z-index: 1;
  top: -14px; left: 50%;
  width: 0; height: 0;
  margin-left: -13px;
  border: 13px solid transparent;
  border-top: 24px solid var(--branco);
  border-bottom: 0;
  filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.4));
}
.roleta-miolo {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 52px; height: 52px;
  margin: -26px 0 0 -26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--noite);
  box-shadow: 0 0 0 4px var(--ouro);
  font-size: 1.5rem;
}

.roleta .botao { width: 100%; }
.roleta-girar:disabled { opacity: 0.8; cursor: default; }

.roleta-preco { margin: 10px 0 4px; font-size: 1.1rem; color: var(--texto-apagado); }
.roleta-preco b { font-family: var(--display); font-weight: 400; font-size: 2.2rem; color: var(--verde); margin-left: 6px; }

.roleta-itens {
  margin: 14px 0;
  padding: 0;
  list-style: none;
  text-align: left;
  display: grid;
  gap: 8px;
  font-size: 0.95rem;
}
.roleta-itens li { position: relative; padding-left: 28px; }
.roleta-itens li::before { content: "✓"; position: absolute; left: 4px; color: var(--verde); font-weight: 700; }

.roleta-relogio { margin: 0 0 14px; font-size: 0.95rem; color: var(--prata); }
.roleta-relogio b { color: var(--ouro); font-variant-numeric: tabular-nums; }
.roleta-micro { margin: 4px 0 0; font-size: 0.82rem; color: var(--texto-apagado); }
.roleta-aula {
  display: inline-block;
  margin-top: 14px;
  padding: 8px;
  font-size: 0.92rem;
  color: var(--prata);
}

/* Lembrete depois de fechar: ocupa o lugar da barra de CTA, o zap continua à direita. */
.roleta-pilula {
  position: fixed;
  z-index: 62;
  left: 16px;
  right: 90px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--ouro);
  color: var(--noite);
  font-family: var(--display);
  font-size: 1rem;
  text-decoration: none;
  box-shadow: 0 4px 0 #B58A00, 0 10px 24px rgba(0, 0, 0, 0.35);
  animation: roleta-chegar 420ms var(--mola) both;
}
.roleta-pilula b { font-weight: 400; font-variant-numeric: tabular-nums; }
body.roleta-ativa .barra-cta { transform: translateY(110%); }
body.roleta-ativa .barra-cta.visivel ~ .zap { bottom: calc(16px + env(safe-area-inset-bottom)); }

@media (min-width: 700px) {
  .roleta-pilula { left: auto; right: 92px; padding: 0 24px; }
}

@keyframes roleta-chegar {
  from { transform: translateY(120%); }
}

@media (prefers-reduced-motion: reduce) {
  .roleta, .roleta-caixa, .roleta-pilula { transition: none; animation: none; }
}
