/* kids-ux-pack — success toast, soft SFX, mute toggle, nick confirm */
/* package-mobile-fix — sticky buy moved to kingdom-package.css */

.kb-kids-toast {
  position: fixed;
  left: 50%;
  top: 18%;
  z-index: 80;
  width: min(92vw, 22rem);
  transform: translate(-50%, -12px) scale(0.94);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.kb-kids-toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.kb-kids-toast__card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.95rem 1.05rem;
  border-radius: 1rem;
  border: 1.5px solid hsl(var(--primary) / 0.55);
  background: linear-gradient(165deg, rgb(8 18 30 / 0.96), rgb(4 10 18 / 0.98));
  box-shadow:
    0 0 0 1px hsl(var(--primary) / 0.18),
    0 18px 40px rgb(0 0 0 / 0.45),
    0 0 36px -8px hsl(var(--primary) / 0.55);
}

.kb-kids-toast__check {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
}

.kb-kids-toast__svg {
  width: 100%;
  height: 100%;
}

.kb-kids-toast__circle {
  stroke: hsl(var(--primary));
  stroke-width: 3;
  stroke-dasharray: 140;
  stroke-dashoffset: 140;
}

.kb-kids-toast__tick {
  stroke: hsl(var(--primary));
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
}

.kb-kids-toast.is-show .kb-kids-toast__circle {
  animation: kb-kids-circle 0.45s ease forwards;
}

.kb-kids-toast.is-show .kb-kids-toast__tick {
  animation: kb-kids-tick 0.35s 0.28s ease forwards;
}

@keyframes kb-kids-circle {
  to { stroke-dashoffset: 0; }
}

@keyframes kb-kids-tick {
  to { stroke-dashoffset: 0; }
}

.kb-kids-toast__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #fff;
}

.kb-kids-toast__sub {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgb(var(--foreground) / 0.78);
}

.kb-sfx-toggle {
  position: fixed;
  right: 0.85rem;
  bottom: calc(6.35rem + env(safe-area-inset-bottom, 0px));
  z-index: 48;
  display: grid;
  place-items: center;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 999px;
  border: 1.5px solid hsl(var(--primary) / 0.45);
  background: linear-gradient(165deg, hsl(var(--primary) / 0.22), rgb(6 12 20 / 0.92));
  color: hsl(var(--primary));
  box-shadow: 0 8px 22px rgb(0 0 0 / 0.35), 0 0 16px -4px hsl(var(--primary) / 0.45);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.kb-sfx-toggle:hover,
.kb-sfx-toggle:focus-visible {
  transform: scale(1.06);
  border-color: hsl(var(--primary) / 0.75);
  outline: none;
}

.kb-sfx-toggle[data-muted='true'] {
  color: rgb(var(--foreground) / 0.65);
  border-color: rgb(var(--foreground) / 0.18);
  background: rgb(8 12 18 / 0.88);
}

.kb-sfx-toggle__icon {
  width: 1.15rem;
  height: 1.15rem;
}

@media (min-width: 768px) {
  .kb-sfx-toggle {
    bottom: 1.25rem;
    right: 1.25rem;
  }
}

/* Nick confirmation (Robux) */
.robux-nick-confirm {
  margin-top: 1rem;
  padding: 1rem 1.05rem;
  border-radius: 0.9rem;
  border: 1.5px solid hsl(var(--primary) / 0.4);
  background: linear-gradient(165deg, hsl(var(--primary) / 0.14), rgb(6 12 20 / 0.85));
  text-align: center;
}

.robux-nick-confirm[hidden] {
  display: none !important;
}

.robux-nick-confirm__q {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: rgb(var(--foreground) / 0.9);
  line-height: 1.35;
}

.robux-nick-confirm__nick {
  display: inline;
  margin: 0 0.15rem;
  font-size: clamp(1.2rem, 4.5vw, 1.65rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: hsl(var(--primary));
  text-shadow: 0 0 22px hsl(var(--primary) / 0.35);
  word-break: break-word;
}

.robux-nick-confirm__actions {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.robux-nick-confirm.is-ok {
  border-color: hsl(var(--primary) / 0.55);
  background: linear-gradient(165deg, hsl(var(--primary) / 0.2), rgb(6 14 22 / 0.9));
}

.robux-nick-confirm__ok-badge {
  display: none;
  margin-top: 0.55rem;
  font-size: 0.8rem;
  font-weight: 800;
  color: hsl(var(--primary));
}

.robux-nick-confirm.is-ok .robux-nick-confirm__ok-badge {
  display: block;
}

.robux-nick-confirm.is-ok .robux-nick-confirm__actions {
  display: none;
}

/* Stronger Robux 1·2·3 kids steps */
.robux-flow .robux-steps--kids {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 1.15rem;
}

.robux-flow .robux-steps--kids .robux-step span {
  width: 2.35rem;
  height: 2.35rem;
  font-size: 1rem;
  font-weight: 900;
}

.robux-flow .robux-steps--kids .robux-step p {
  font-size: 0.68rem;
  letter-spacing: 0.01em;
  text-transform: none;
  font-weight: 800;
  line-height: 1.2;
}

.robux-flow .robux-steps--kids .robux-step[data-active='true'] span {
  transform: scale(1.12);
  box-shadow: 0 0 22px hsl(var(--primary) / 0.4);
}

.robux-flow .robux-steps--kids .robux-step[data-complete='true'] span {
  background: hsl(var(--primary) / 0.22);
}

@media (max-width: 420px) {
  .robux-flow .robux-steps--kids .robux-step p {
    font-size: 0.62rem;
  }

  .robux-flow .robux-steps--kids .robux-step span {
    width: 2.1rem;
    height: 2.1rem;
  }
}

/* Mobile sticky buy — moved to kingdom-package.css (package-mobile-fix)
   Avoid duplicate sticky+fixed rules that broke the Comprar agora button. */

@media (prefers-reduced-motion: reduce) {
  .kb-kids-toast,
  .kb-kids-toast.is-show .kb-kids-toast__circle,
  .kb-kids-toast.is-show .kb-kids-toast__tick,
  .kb-sfx-toggle {
    transition: none !important;
    animation: none !important;
  }

  .kb-kids-toast.is-show .kb-kids-toast__circle,
  .kb-kids-toast.is-show .kb-kids-toast__tick {
    stroke-dashoffset: 0;
  }
}
