/*
 * Toast Component
 * Notification messages
 */

.toast-container {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  padding: 1rem;
}

.toast-container-top-right {
  top: 0;
  right: 0;
}

.toast-container-top-left {
  top: 0;
  left: 0;
}

.toast-container-bottom-right {
  bottom: 0;
  right: 0;
}

.toast-container-bottom-left {
  bottom: 0;
  left: 0;
}

.toast-container-top-center {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}

.toast-container-bottom-center {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

/* Toast Item */
.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 300px;
  max-width: 400px;
  margin-bottom: 0.75rem;
  padding: 0.875rem 1rem;
  background-color: var(--theme-surface);
  border: 1px solid var(--theme-border);
  border-radius: var(--border-radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  pointer-events: auto;
  animation: toast-slide-in 0.3s ease-out;
}

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

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

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

/* Toast Icon */
.toast-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
}

.toast-success .toast-icon {
  color: var(--color-success);
}

.toast-error .toast-icon {
  color: var(--color-error);
}

.toast-warning .toast-icon {
  color: var(--color-warning);
}

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

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

.toast-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--theme-text-primary);
  margin-bottom: 0.25rem;
}

.toast-message {
  font-size: 0.875rem;
  color: var(--theme-text-secondary);
  line-height: 1.4;
}

/* Toast Close */
.toast-close {
  flex-shrink: 0;
  padding: 0.25rem;
  color: var(--theme-text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--transition-speed);
}

.toast-close:hover {
  color: var(--theme-text-primary);
}

/* Toast Variants */
.toast-success {
  border-left: 3px solid var(--color-success);
}

.toast-error {
  border-left: 3px solid var(--color-error);
}

.toast-warning {
  border-left: 3px solid var(--color-warning);
}

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

/* Toast Progress */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background-color: var(--theme-accent);
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  animation: toast-progress 5s linear;
}

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

/* Snackbar Style */
.snackbar {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background-color: var(--theme-text-primary);
  color: var(--theme-bg);
  border-radius: var(--border-radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-size: 0.875rem;
  font-weight: 500;
}

.snackbar-action {
  padding: 0.25rem 0.5rem;
  color: var(--theme-accent);
  background: none;
  border: none;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: opacity var(--transition-speed);
}

.snackbar-action:hover {
  opacity: 0.8;
}