/* Toast Container */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  width: 100%;
  pointer-events: none;
}

/* Toast Content */
.toast-content {
  position: relative;
  display: flex;
  align-items: flex-start;
  padding: 16px;
  gap: 12px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid #e0e0e0;
  transition: all 0.3s ease;
  transform: translateX(100%);
  pointer-events: all;
}

/* Toast Animations */
.toast-enter {
  animation: toast-slide-in 0.3s ease forwards;
}

.toast-leave {
  animation: toast-slide-out 0.3s ease forwards;
}

@keyframes toast-slide-in {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toast-slide-out {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.toast-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  border-radius: 50%;
  margin-top: 2px;
}

.toast-success .toast-icon {
  background: #2e7d32;
  color: white;
}

.toast-error .toast-icon {
  background: #d32f2f;
  color: white;
}

.toast-warning .toast-icon {
  background: #f57c00;
  color: white;
}

.toast-info .toast-icon {
  background: var(--color-primary, #1976d2);
  color: white;
}

.toast-body {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.4;
}

.toast-message {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  word-wrap: break-word;
}

.toast-close {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  width: 20px;
  height: 20px;
  display: flex;
  font-weight: 900;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition: opacity 0.2s ease;
  pointer-events: all;
}

.toast-close:hover {
  opacity: 1;
}

/* Toast Types */
.toast-success {
  border-left: 4px solid #2e7d32;
}

.toast-success .toast-title {
  color: #2e7d32;
}

.toast-success .toast-message {
  color: #666;
}

.toast-error {
  border-left: 4px solid #d32f2f;
}

.toast-error .toast-title {
  color: #d32f2f;
}

.toast-error .toast-message {
  color: #666;
}

.toast-warning {
  border-left: 4px solid #f57c00;
}

.toast-warning .toast-title {
  color: #f57c00;
}

.toast-warning .toast-message {
  color: var(--typo-secondary);
}

.toast-info {
  border-left: 4px solid var(--color-primary);
}

.toast-info .toast-title {
  color: var(--color-primary);
}

.toast-info .toast-message {
  color: var(--typo-secondary);
}

/* Toast Progress Bar */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-color: rgba(0, 0, 0, 0.1);
}

.toast-progress-bar {
  height: 100%;
  width: 100%;
  transform-origin: left;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

.toast-success .toast-progress-bar {
  background-color: #2e7d32;
}

.toast-error .toast-progress-bar {
  background-color: #d32f2f;
}

.toast-warning .toast-progress-bar {
  background-color: #f57c00;
}

.toast-info .toast-progress-bar {
  background-color: var(--color-primary);
}

/* Progress Animation */
@keyframes toast-progress {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

/* Responsive Design */
@media (max-width: 480px) {
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
  
  .toast-content {
    padding: 12px;
    gap: 10px;
  }
  
  .toast-title,
  .toast-message {
    font-size: var(--font-xs);
  }
}