/**
 * UzaDebt - Shared Platform Feedback System (Modals & Toasts)
 * Loaded across Public Site, Customer Portal, and Admin Console.
 */

/* ── Confirmation & Alert Modal ──────────────────────────────────────── */
.ud-modal-backdrop[hidden] { display: none !important; }
.ud-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: rgba(13, 6, 20, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.ud-modal {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  color: #1c1b18;
  border: 1px solid #e4decb;
  border-radius: 12px;
  box-shadow: 0 24px 48px -12px rgba(13, 6, 20, 0.28);
  overflow: hidden;
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
}
.ud-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid #ede8da;
}
.ud-modal__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #1c1b18;
  letter-spacing: -0.01em;
}
.ud-modal__close {
  background: transparent;
  border: 0;
  color: #6e6a61;
  font-size: 22px;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 6px;
  cursor: pointer;
}
.ud-modal__close:hover {
  background: #f8f4ec;
  color: #1c1b18;
}
.ud-modal__body {
  padding: 18px 20px;
  font-size: 14px;
  line-height: 1.6;
  color: #4a463e;
}
.ud-modal__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  background: #faf8f4;
  border-top: 1px solid #ede8da;
}
.ud-modal__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.ud-modal__btn--cancel {
  background: #ffffff;
  color: #1c1b18;
  border-color: #d5cdbc;
}
.ud-modal__btn--cancel:hover {
  background: #f8f4ec;
  border-color: #b8ae99;
}
.ud-modal__btn--confirm {
  background: #6b21a8;
  color: #ffffff;
  border-color: #6b21a8;
}
.ud-modal__btn--confirm:hover {
  background: #581c87;
  border-color: #581c87;
}
.ud-modal__btn--danger {
  background: #dc2626;
  border-color: #dc2626;
}
.ud-modal__btn--danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

/* ── Toast Stack (Resume.co.tz RcToast Standard) ─────────────────────── */
.ud-toast-stack {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10060;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}
.ud-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #ffffff;
  color: #1c1b18;
  border: 1px solid #e4decb;
  border-left: 4px solid #6b21a8;
  box-shadow: 0 12px 28px -8px rgba(13, 6, 20, 0.2);
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.ud-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.ud-toast--success { border-left-color: #15803d; }
.ud-toast--error   { border-left-color: #dc2626; }
.ud-toast--warning { border-left-color: #d97706; }
.ud-toast--info    { border-left-color: #6b21a8; }

.ud-toast__close {
  background: transparent;
  border: 0;
  color: #6e6a61;
  font-size: 18px;
  line-height: 1;
  padding: 0 2px;
  cursor: pointer;
  flex-shrink: 0;
}
.ud-toast__close:hover { color: #1c1b18; }

@media (max-width: 560px) {
  .ud-toast-stack {
    top: auto;
    bottom: 16px;
    right: 16px;
    left: 16px;
    max-width: none;
  }
}
