/* ====================================================
   TOAST NOTIFICATIONS — King Burger's Store (Cyberpunk)
   ==================================================== */

.kb-toast-container {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  pointer-events: none;
  max-width: min(92vw, 380px);
}

.kb-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem 0.875rem 0.875rem;
  background: #0d0d1f;
  color: #d8e4ff;
  border-radius: 6px;
  border: 1px solid rgba(0, 240, 255, 0.18);
  box-shadow:
    0 0 18px rgba(0, 240, 255, 0.08),
    0 8px 30px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(0, 240, 255, 0.06);
  font-family: 'Rajdhani', 'Orbitron', 'Inter', sans-serif;
  font-size: 0.875rem;
  line-height: 1.45;
  font-weight: 500;
  opacity: 0;
  transform: translateX(120%);
  transition:
    transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1),
    opacity   0.25s ease;
  position: relative;
  overflow: hidden;
}

/* Scanline overlay */
.kb-toast::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 240, 255, 0.018) 3px,
    rgba(0, 240, 255, 0.018) 4px
  );
  pointer-events: none;
}

/* Neon left accent strip */
.kb-toast::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--cp-cyan, #00f0ff);
  box-shadow: 0 0 8px var(--cp-cyan, #00f0ff), 0 0 16px var(--cp-cyan, #00f0ff);
}

.kb-toast.kb-show {
  opacity: 1;
  transform: translateX(0);
}

.kb-toast.kb-leave {
  opacity: 0;
  transform: translateX(120%);
}

.kb-toast-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: #06060f;
  background: var(--cp-cyan, #00f0ff);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.6);
}

.kb-toast-body {
  flex: 1;
  min-width: 0;
  padding-top: 1px;
}

.kb-toast-title {
  font-family: 'Orbitron', 'Rajdhani', sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.75rem;
  margin: 0 0 0.125rem;
  color: #00f0ff;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.55);
}

.kb-toast-message {
  margin: 0;
  color: rgba(216, 228, 255, 0.82);
  font-size: 0.8125rem;
  line-height: 1.5;
  word-wrap: break-word;
}

.kb-toast-close {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 240, 255, 0.2);
  background: transparent;
  color: rgba(0, 240, 255, 0.5);
  cursor: pointer;
  border-radius: 4px;
  font-size: 0.875rem;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  padding: 0;
}

.kb-toast-close:hover {
  background: rgba(0, 240, 255, 0.08);
  color: #00f0ff;
  border-color: rgba(0, 240, 255, 0.5);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.25);
}

/* ── Variants ── */
.kb-toast-success::before {
  background: #00f0ff;
  box-shadow: 0 0 8px #00f0ff, 0 0 16px #00f0ff;
}
.kb-toast-success .kb-toast-icon {
  background: #00f0ff;
  color: #06060f;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.6);
}
.kb-toast-success .kb-toast-title { color: #00f0ff; text-shadow: 0 0 8px rgba(0, 240, 255, 0.55); }

.kb-toast-error::before {
  background: #ff0066;
  box-shadow: 0 0 8px #ff0066, 0 0 16px #ff0066;
}
.kb-toast-error .kb-toast-icon {
  background: #ff0066;
  color: #fff;
  box-shadow: 0 0 8px rgba(255, 0, 102, 0.6);
}
.kb-toast-error .kb-toast-title { color: #ff0066; text-shadow: 0 0 8px rgba(255, 0, 102, 0.55); }

.kb-toast-info::before {
  background: #9d00ff;
  box-shadow: 0 0 8px #9d00ff, 0 0 16px #9d00ff;
}
.kb-toast-info .kb-toast-icon {
  background: #9d00ff;
  color: #fff;
  box-shadow: 0 0 8px rgba(157, 0, 255, 0.6);
}
.kb-toast-info .kb-toast-title { color: #b44dff; text-shadow: 0 0 8px rgba(157, 0, 255, 0.55); }

/* ── Progress bar (auto-dismiss timer) ── */
.kb-toast-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  background: #00f0ff;
  box-shadow: 0 0 6px rgba(0, 240, 255, 0.8);
  opacity: 0.8;
  width: 100%;
  transform-origin: left;
  animation: kb-toast-progress linear forwards;
}
.kb-toast-success .kb-toast-progress { background: #00f0ff; box-shadow: 0 0 6px rgba(0, 240, 255, 0.8); }
.kb-toast-error   .kb-toast-progress { background: #ff0066; box-shadow: 0 0 6px rgba(255, 0, 102, 0.8); }
.kb-toast-info    .kb-toast-progress { background: #9d00ff; box-shadow: 0 0 6px rgba(157, 0, 255, 0.8); }

@keyframes kb-toast-progress {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .kb-toast {
    transition: opacity 0.15s ease;
    transform: none !important;
  }
  .kb-toast-progress { animation: none; display: none; }
}

/* ── Mobile ── */
@media (max-width: 640px) {
  .kb-toast-container {
    top: 0.75rem;
    right: 0.75rem;
    left: 0.75rem;
    max-width: none;
  }
  .kb-toast { transform: translateY(-120%); }
  .kb-toast.kb-leave { transform: translateY(-120%); }
}
