/* =========================================================
   TOAST NOTIFICATIONS
   File: assets/css/toast.css
   Professional top-right notification stack
   ========================================================= */

#toastRoot,
.toast-root,
.toast-container {
  position: fixed !important;
  top: 22px !important;
  right: 22px !important;
  left: auto !important;
  bottom: auto !important;
  z-index: 999999 !important;

  width: min(420px, calc(100vw - 32px));
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  gap: 12px;

  pointer-events: none;
}

.toast {
  width: 100%;
  max-width: 420px;
  display: flex;
  align-items: flex-start;
  gap: 12px;

  padding: 14px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #e5e7eb;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);

  opacity: 0;
  transform: translateX(28px);
  transition: opacity 0.24s ease, transform 0.24s ease;

  pointer-events: auto;
  overflow: hidden;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-weight: 900;
  color: #fff;
}

.toast-success .toast-icon,
.toast.success .toast-icon {
  background: #10b981;
}

.toast-error .toast-icon,
.toast.error .toast-icon {
  background: #ef4444;
}

.toast-warning .toast-icon,
.toast.warning .toast-icon {
  background: #f59e0b;
}

.toast-info .toast-icon,
.toast.info .toast-icon {
  background: #3b82f6;
}

.toast-body {
  min-width: 0;
  flex: 1;
}

.toast-title {
  font-size: 14px;
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 3px;
}

.toast-message {
  font-size: 13px;
  color: #475569;
  line-height: 1.45;
  word-break: break-word;
}

.toast-close {
  border: 0;
  background: #f8fafc;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  color: #64748b;
  cursor: pointer;
  flex: 0 0 auto;
  font-size: 18px;
  line-height: 1;
}

.toast-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

@media (max-width: 560px) {
  #toastRoot,
  .toast-root,
  .toast-container {
    top: 12px !important;
    right: 12px !important;
    left: 12px !important;
    width: auto;
    align-items: stretch !important;
  }

  .toast {
    max-width: none;
  }
}

/* =========================================================
   ALFAA DEBUG PATCH 20260521
   - Login viewport fit
   - Top toast height control
   - Action menus outside scroll area
   ========================================================= */
#toastRoot, .toast-root, .toast-container { top:18px !important; max-height:calc(100vh - 36px) !important; overflow:visible !important; }
.toast { max-height:92px !important; min-height:0 !important; align-items:center !important; }
.toast-message { display:-webkit-box !important; -webkit-line-clamp:2 !important; -webkit-box-orient:vertical !important; overflow:hidden !important; }
