/* ==========================================================================
   components/toast.css — Toast Notifications
   ========================================================================== */

.toast-container {
  position: fixed;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  pointer-events: none;
  width: max-content;
  max-width: calc(100vw - var(--space-8));
}

.toast {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 260px;
  max-width: 420px;
  padding: 12px 16px;
  background: var(--color-green-deep);
  color: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  font-size: var(--text-base);
  pointer-events: auto;
  animation: toast-in .3s ease both;
}

.toast.hide {
  animation: toast-out .3s ease both;
}

.toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.toast-message {
  flex: 1;
  line-height: var(--leading-normal);
}

.toast-close {
  color: rgba(255,255,255,.7);
  font-size: 18px;
  display: flex;
  align-items: center;
  transition: var(--transition-fast);
  flex-shrink: 0;
}
.toast-close:hover {
  color: #fff;
}

/* ---------- Variants ---------- */
.toast-success {
  background: var(--color-success);
}
.toast-error {
  background: var(--color-danger);
}
.toast-warning {
  background: var(--color-warning);
}
.toast-info {
  background: var(--color-info);
}

/* ---------- Progress bar (auto-dismiss) ---------- */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: rgba(255,255,255,.4);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  transform-origin: left;
  animation: bar-shrink linear forwards;
}
@keyframes bar-shrink {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}
