/* ─────────────────────────────────────────────────────────────
   toast-style.css — theme-aware SweetAlert2 toast styling
   Requires theme-core.css to be loaded BEFORE this file.
   Pairs with the showMessage() function in utils.js.
   ───────────────────────────────────────────────────────────── */

.ax-toast {
  border-radius: var(--radius-md, 12px) !important;
  box-shadow: var(--shadow-color-lg, 0 12px 32px rgba(0, 0, 0, 0.14)) !important;
  padding: 12px 16px !important;
  background: var(--bg-surface, #fff) !important;
  border: 1px solid var(--border-color, #e6e6f0);
  border-left: 4px solid var(--accent, #4f35e8);
}

.ax-toast-success {
  border-left-color: var(--success, #059669);
}

.ax-toast-error {
  border-left-color: var(--danger, #ef4444);
}

.ax-toast-warning {
  border-left-color: var(--gold, #f59e0b);
}

.ax-toast-info {
  border-left-color: var(--info, #3b82f6);
}

.ax-toast-title {
  font-size: 13.5px !important;
  font-weight: 700 !important;
  color: var(--text-primary, #16162a) !important;
}

.ax-toast-text {
  font-size: 12.5px !important;
  color: var(--text-secondary, #6b7280) !important;
}

.ax-toast .swal2-icon {
  width: 26px !important;
  height: 26px !important;
  margin: 0 12px 0 0 !important;
  transform: scale(0.72);
}

.ax-toast-progress {
  background: rgba(0, 0, 0, 0.12) !important;
}

[data-theme="dark"] .ax-toast-progress {
  background: rgba(255, 255, 255, 0.15) !important;
}

/* ── Slide-in / slide-out animation ──────────────────────────── */
@keyframes ax-toast-slide-in {
  from {
    opacity: 0;
    transform: translateX(24px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes ax-toast-slide-out {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
  }

  to {
    opacity: 0;
    transform: translateX(24px) scale(0.96);
  }
}

.ax-toast-in {
  animation: ax-toast-slide-in 0.28s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.ax-toast-out {
  animation: ax-toast-slide-out 0.22s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@media (max-width: 480px) {
  .ax-toast {
    padding: 10px 13px !important;
  }

  .ax-toast-title {
    font-size: 13px !important;
  }

  .ax-toast-text {
    font-size: 12px !important;
  }
}
