/**
 * Aurelux LMS — Toast Notification Styles
 *
 * Uses --alms-* CSS custom properties for theme consistency.
 */

/* ── Container ──────────────────────────────────────────────────────── */
.alms-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 420px;
  width: 100%;
}

/* ── Individual Toast ───────────────────────────────────────────────── */
.alms-toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--alms-radius, 8px);
  background: var(--alms-surface, #1e1e2e);
  border: 1px solid var(--alms-border, #2a2a3e);
  color: var(--alms-text, #e0e0e8);
  font-size: 0.875rem;
  line-height: 1.4;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  pointer-events: all;
  transform: translateX(120%);
  opacity: 0;
  transition: none;
}

.alms-toast--visible {
  animation: alms-toast-slide-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.alms-toast--dismissed {
  animation: alms-toast-slide-out 0.3s cubic-bezier(0.55, 0, 1, 0.45) forwards;
}

/* ── Type Colors ────────────────────────────────────────────────────── */
.alms-toast--success {
  border-left: 4px solid var(--alms-success, #3dd68c);
  color: var(--alms-success, #3dd68c);
}

.alms-toast--error {
  border-left: 4px solid var(--alms-danger, #ff5370);
  color: var(--alms-danger, #ff5370);
}

.alms-toast--warning {
  border-left: 4px solid var(--alms-warning, #f5a623);
  color: var(--alms-warning, #f5a623);
}

.alms-toast--info {
  border-left: 4px solid var(--alms-primary, #7c6fff);
  color: var(--alms-primary, #7c6fff);
}

/* Message text always uses the base text color */
.alms-toast__message {
  flex: 1;
  color: var(--alms-text, #e0e0e8);
}

/* ── Icon ───────────────────────────────────────────────────────────── */
.alms-toast__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

/* ── Close Button ───────────────────────────────────────────────────── */
.alms-toast__close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--alms-muted, #9090b0);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.alms-toast__close:hover {
  opacity: 1;
}

/* ── Animations ─────────────────────────────────────────────────────── */
@keyframes alms-toast-slide-in {
  from {
    transform: translateX(120%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

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

/* ── Mobile ─────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .alms-toast-container {
    right: 10px;
    left: 10px;
    max-width: none;
  }
}
