/* ================================================================
   TOAST NOTIFICATION SYSTEM — Dark Gaming Theme
   Đồng nhất với index.css / style.css / dashboard.css
   ================================================================ */

#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: min(420px, calc(100vw - 32px));
}

/* ── Base Toast ── */
.toast {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 15px 17px;
  border-radius: 16px;
  background: rgba(12, 18, 34, 0.96);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  color: #e8eeff;
  font-family: "Be Vietnam Pro", "Manrope", sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.09) inset,
    0 12px 40px rgba(0, 0, 0, 0.50),
    0 2px 8px rgba(0, 0, 0, 0.30);
  border: 1px solid rgba(255, 255, 255, 0.09);
  pointer-events: all;
  opacity: 0;
  transform: translateY(18px) scale(0.97);
  transition: opacity 0.30s ease, transform 0.30s ease;
  min-width: 280px;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Icon */
.toast-icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Message */
.toast-msg {
  flex: 1;
  min-width: 0;
}

/* Close button */
.toast-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.40);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
  transition: color 0.20s ease;
}

.toast-close:hover {
  color: #fff;
}

/* ── Toast Types ── */
.toast-success {
  background: linear-gradient(135deg, rgba(10, 40, 28, 0.97), rgba(12, 18, 34, 0.97));
  border-color: rgba(52, 211, 153, 0.28);
  box-shadow:
    0 0 0 1px rgba(52, 211, 153, 0.14) inset,
    0 12px 40px rgba(0, 0, 0, 0.50),
    0 0 24px rgba(52, 211, 153, 0.10);
}

.toast-error {
  background: linear-gradient(135deg, rgba(48, 15, 15, 0.97), rgba(12, 18, 34, 0.97));
  border-color: rgba(248, 113, 113, 0.28);
  box-shadow:
    0 0 0 1px rgba(248, 113, 113, 0.12) inset,
    0 12px 40px rgba(0, 0, 0, 0.50),
    0 0 24px rgba(248, 113, 113, 0.10);
}

.toast-info {
  background: linear-gradient(135deg, rgba(10, 20, 48, 0.97), rgba(12, 18, 34, 0.97));
  border-color: rgba(99, 102, 241, 0.28);
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.12) inset,
    0 12px 40px rgba(0, 0, 0, 0.50),
    0 0 24px rgba(99, 102, 241, 0.10);
}

.toast-warning {
  background: linear-gradient(135deg, rgba(36, 24, 5, 0.97), rgba(12, 18, 34, 0.97));
  border-color: rgba(245, 158, 11, 0.28);
  box-shadow:
    0 0 0 1px rgba(245, 158, 11, 0.12) inset,
    0 12px 40px rgba(0, 0, 0, 0.50),
    0 0 24px rgba(245, 158, 11, 0.10);
}

/* ── HOT + Low Stock Badges (used in exchange/store cards) ── */
.badge-hot {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #f59e0b, #6366f1);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 999px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.32);
}

.badge-low-stock {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(248, 113, 113, 0.14);
  color: #fca5a5;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(248, 113, 113, 0.26);
}

/* ── Confetti Animation ── */
.confetti-wrap {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -20px;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  animation: confettiFall linear forwards;
}

@keyframes confettiFall {
  0%   { transform: translateY(0) rotate(0deg);   opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* ── Ref Link Box ── */
.ref-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.20);
  border-radius: 13px;
  padding: 13px 16px;
  margin-top: 16px;
  transition: border-color 0.18s ease;
}

.ref-box:focus-within {
  border-color: rgba(34, 211, 238, 0.36);
  background: rgba(34, 211, 238, 0.10);
}

.ref-box input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  color: #e8eeff;
  font-family: "Fira Mono", "Consolas", monospace;
  outline: none;
}

.ref-box input::selection {
  background: rgba(99, 102, 241, 0.40);
}

.ref-box button {
  background: linear-gradient(135deg, #6366f1, #22d3ee);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.30);
}

.ref-box button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.44);
}

/* ── Responsive ── */
@media (max-width: 480px) {
  #toast-container {
    bottom: 16px;
    right: 12px;
    left: 12px;
  }
}
