/**
 * Toast Notification Styles
 */

/* Toast Containers */
.toast-container {
  position: fixed;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-height: 100vh;
  overflow: hidden;
}

.toast-container > * {
  pointer-events: auto;
}

.toast-top-right {
  top: 20px;
  right: 20px;
  align-items: flex-end;
}

.toast-top-left {
  top: 20px;
  left: 20px;
  align-items: flex-start;
}

.toast-bottom-right {
  bottom: 20px;
  right: 20px;
  align-items: flex-end;
  flex-direction: column-reverse;
}

.toast-bottom-left {
  bottom: 20px;
  left: 20px;
  align-items: flex-start;
  flex-direction: column-reverse;
}

.toast-top-center {
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  align-items: center;
}

.toast-bottom-center {
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  align-items: center;
  flex-direction: column-reverse;
}

/* Toast Base */
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(30, 30, 50, 0.95), rgba(20, 20, 40, 0.98));
  border-radius: 8px;
  border-left: 4px solid var(--toast-color, #2196F3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4),
              0 0 20px rgba(var(--toast-color, #2196F3), 0.2);
  min-width: 280px;
  max-width: 400px;
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.toast-top-left .toast,
.toast-bottom-left .toast {
  transform: translateX(-120%);
}

.toast-top-center .toast,
.toast-bottom-center .toast {
  transform: translateY(-50px);
}

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

.toast-hiding {
  transform: translateX(120%) !important;
  opacity: 0 !important;
}

.toast-top-left .toast-hiding,
.toast-bottom-left .toast-hiding {
  transform: translateX(-120%) !important;
}

.toast-top-center .toast-hiding,
.toast-bottom-center .toast-hiding {
  transform: translateY(-50px) !important;
}

/* Toast Icon */
.toast-icon {
  font-size: 24px;
  min-width: 32px;
  text-align: center;
  filter: drop-shadow(0 0 5px var(--toast-color, #2196F3));
}

/* Toast Content */
.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-weight: bold;
  font-size: 14px;
  color: #fff;
  margin-bottom: 2px;
  text-shadow: 0 0 10px var(--toast-color, #2196F3);
}

.toast-message {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  word-wrap: break-word;
}

/* Toast Close Button */
.toast-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 20px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.2s, transform 0.2s;
}

.toast-close:hover {
  color: #fff;
  transform: scale(1.2);
}

/* Toast Type Variations */
.toast-success {
  --toast-color: #4CAF50;
}

.toast-error {
  --toast-color: #f44336;
  animation: toast-shake 0.5s ease;
}

.toast-warning {
  --toast-color: #ff9800;
}

.toast-info {
  --toast-color: #2196F3;
}

.toast-achievement {
  --toast-color: #ffd700;
  background: linear-gradient(135deg, rgba(50, 40, 20, 0.95), rgba(30, 25, 15, 0.98));
}

.toast-milestone {
  --toast-color: #9c27b0;
  min-width: 320px;
}

.toast-surge {
  --toast-color: #00d4ff;
}

.toast-prestige {
  --toast-color: #9b59b6;
  background: linear-gradient(135deg, rgba(60, 30, 70, 0.95), rgba(40, 20, 50, 0.98));
}

.toast-reward {
  --toast-color: #e91e63;
  animation: toast-pulse 0.5s ease;
}

.toast-combo {
  --toast-color: #ff6600;
}

.toast-quest {
  --toast-color: #8bc34a;
}

.toast-challenge {
  --toast-color: #ff6666;
}

.toast-pet {
  --toast-color: #ff9800;
}

.toast-skill {
  --toast-color: #00bcd4;
}

.toast-manager {
  --toast-color: #607d8b;
}

.toast-artifact {
  --toast-color: #e040fb;
  background: linear-gradient(135deg, rgba(60, 20, 80, 0.95), rgba(40, 15, 55, 0.98));
}

.toast-daily {
  --toast-color: #4caf50;
  background: linear-gradient(135deg, rgba(30, 50, 30, 0.95), rgba(20, 40, 20, 0.98));
}

/* Animations */
@keyframes toast-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

@keyframes toast-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* Hover effect */
.toast:hover {
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.5),
              0 0 30px rgba(var(--toast-color, #2196F3), 0.3);
}

/* Progress bar (optional - for timed toasts) */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--toast-color, #2196F3);
  border-radius: 0 0 0 8px;
  animation: toast-progress linear forwards;
}

@keyframes toast-progress {
  from { width: 100%; }
  to { width: 0%; }
}

/* Mobile responsive */
@media (max-width: 480px) {
  .toast-container {
    left: 10px !important;
    right: 10px !important;
    transform: none !important;
  }

  .toast {
    min-width: auto;
    max-width: none;
    width: 100%;
  }

  .toast-top-center,
  .toast-bottom-center {
    left: 10px;
    right: 10px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .toast {
    transition: opacity 0.2s ease;
    transform: none !important;
  }

  .toast-visible {
    opacity: 1;
  }

  .toast-hiding {
    opacity: 0 !important;
  }

  .toast-error,
  .toast-reward {
    animation: none;
  }
}
