/* /public/css/alerts.css */
/* Toasts (non-blocking) + Confirm modal (blocking) */

/* ---------- Toasts ---------- */
.custom-alert {
  position: fixed;
  top: -100px;                 /* start off-screen */
  left: 50%;
  transform: translateX(-50%);
  padding: 16px 24px;
  border-radius: 8px;
  color: #fff;
  background-color: #333;      /* default */
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  z-index: 100000;             /* above header */
  opacity: 0;
  transition: all .5s cubic-bezier(0.68,-0.55,0.27,1.55);
  font-size: .95rem;
  font-weight: 500;
  max-width: 90%;
  text-align: center;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  align-self: auto;            /* ignore body flex */
}

.custom-alert.show { opacity: 1; top: 30px; }

/* states */
.custom-alert.success { background-color: #28a745; }
.custom-alert.error   { background-color: #dc3545; }
.custom-alert.loading { background-color: #007bff; }

/* spinner for .loading */
.alert-spinner {
  border: 3px solid rgba(255,255,255,.3);
  border-top: 3px solid #fff;
  border-radius: 50%;
  width: 20px; height: 20px;
  animation: spin 1s linear infinite;
}
@keyframes spin { 0%{transform:rotate(0)} 100%{transform:rotate(360deg)} }

/* ---------- Confirm Modal ---------- */
.custom-modal {
  position: fixed;
  inset: 0;                           /* full-viewport */
  background: rgba(0,0,0,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100001;                     /* above toasts */
}

.custom-modal .modal-content {
  background: #fff;
  border-radius: 10px;
  padding: 16px 20px;
  width: 92%;
  max-width: 420px;
  box-shadow: 0 12px 30px rgba(0,0,0,.2);
  text-align: center;
}

.custom-modal .modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 12px;
}

/* lightweight buttons */
.custom-modal .btn { 
  border: 0; border-radius: 8px; padding: 8px 14px; cursor: pointer;
}
.custom-modal .btn-primary  { background:#0d6efd; color:#fff; }
.custom-modal .btn-danger   { background:#dc3545; color:#fff; }
.custom-modal .btn-secondary{ background:#6c757d; color:#fff; }
