/* toast.css — Toast notification component */

/* Container — fixed top-right stack */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: var(--z-toast, 9000);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
  max-width: 380px;
  width: 100%;
}

/* Individual Toast */
.toast {
  pointer-events: auto;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  display: flex;
  flex-direction: row;
  gap: 0.75rem;
  align-items: center;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur-md));
  -webkit-backdrop-filter: blur(var(--blur-md));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  animation: toastSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  color: var(--text-primary);
}

/* Exit animation */
.toast.removing {
  animation: toastSlideOut 0.25s ease-in forwards;
}

/* Icon */
.toast-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.toast-icon svg {
  width: 20px;
  height: 20px;
}

/* Content */
.toast-content {
  flex-grow: 1;
  font-size: 0.875rem;
  line-height: var(--line-height-normal);
}

/* Close button */
.toast-close {
  background: transparent;
  border: none;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  opacity: 0.6;
  transition: opacity var(--transition-fast), background var(--transition-fast);
  flex-shrink: 0;
}

.toast-close:hover {
  opacity: 1;
  background: var(--glass-bg-hover);
}

.toast-close svg {
  width: 14px;
  height: 14px;
}

/* Type: Success */
.toast-success {
  border-left: 3px solid var(--success);
}

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

/* Type: Error */
.toast-error {
  border-left: 3px solid var(--error);
}

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

/* Type: Warning */
.toast-warning {
  border-left: 3px solid var(--warning);
}

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

/* Type: Info */
.toast-info {
  border-left: 3px solid var(--info);
}

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

/* Light theme overrides */
[data-theme="light"] .toast {
  background: var(--glass-bg);
  border-color: var(--glass-border);
  box-shadow: var(--glass-shadow);
}

[data-theme="light"] .toast-close:hover {
  background: var(--glass-bg-hover);
}

/* Responsive — narrower on small screens */
@media (max-width: 480px) {
  .toast-container {
    left: 0.5rem;
    right: 0.5rem;
    max-width: none;
  }
}
