/* Toast Container */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 420px;
  pointer-events: none;
}

/* Toast */
.toast {
  position: relative;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
  padding: 16px;
  min-width: 300px;
  max-width: 420px;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
  overflow: hidden;
}

.toast-show {
  opacity: 1;
  transform: translateX(0);
}

.toast-hide {
  opacity: 0;
  transform: translateX(100%);
}

/* Toast Content */
.toast-content {
  position: relative;
  z-index: 1;
}

.toast-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  font-size: 14px;
  font-weight: bold;
  border-radius: 50%;
  flex-shrink: 0;
}

.toast-title {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  color: #1a1a1a;
}

.toast-description {
  margin-top: 4px;
  margin-left: 30px;
  font-size: 13px;
  line-height: 18px;
  color: #666;
}

.toast-close {
  background: none;
  border: none;
  color: #999;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.2s;
}

.toast-close:hover {
  color: #666;
}

/* Toast Variants */
.toast-success {
  border-left: 4px solid #10b981;
}

.toast-success .toast-icon {
  background: #d1fae5;
  color: #059669;
}

.toast-error {
  border-left: 4px solid #ef4444;
}

.toast-error .toast-icon {
  background: #fee2e2;
  color: #dc2626;
}

.toast-warning {
  border-left: 4px solid #f59e0b;
}

.toast-warning .toast-icon {
  background: #fef3c7;
  color: #d97706;
}

.toast-info {
  border-left: 4px solid #3b82f6;
}

.toast-info .toast-icon {
  background: #dbeafe;
  color: #2563eb;
}

/* Progress Bar */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(0, 0, 0, 0.1);
  transform-origin: left;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .toast {
    background: #2a2a2a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
  }

  .toast-title {
    color: #f5f5f5;
  }

  .toast-description {
    color: #b3b3b3;
  }

  .toast-close {
    color: #999;
  }

  .toast-close:hover {
    color: #ccc;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }

  .toast {
    min-width: auto;
    max-width: none;
  }
}
