/* ============================================================
   ABWEBSITE — Shared UI Components (Phase E)
   Toast · Badges · Icon helpers
   ============================================================ */

/* ---------- Toast System ---------- */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: min(380px, calc(100vw - 32px));
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 10px 40px rgba(16, 24, 40, 0.18);
  border-left: 4px solid #0d6efd;
  animation: toastIn 0.28s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: #1f2938;
}

.toast.hide {
  animation: toastOut 0.25s ease forwards;
}

.toast-success { border-left-color: #198754; }
.toast-error   { border-left-color: #dc3545; }
.toast-warning { border-left-color: #ffc107; }
.toast-info    { border-left-color: #0d6efd; }

.toast-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-success .toast-icon { color: #198754; }
.toast-error   .toast-icon { color: #dc3545; }
.toast-warning .toast-icon { color: #b8860b; }
.toast-info    .toast-icon { color: #0d6efd; }

.toast-body { flex: 1; min-width: 0; }
.toast-title {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 2px;
  color: #101828;
}
.toast-msg { color: #475467; word-wrap: break-word; }

.toast-close {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: #98a2b3;
  cursor: pointer;
  padding: 2px;
  line-height: 1;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.toast-close:hover { color: #101828; background: #f2f4f7; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(40px); }
}

@media (max-width: 480px) {
  .toast-container {
    top: auto;
    bottom: 20px;
    right: 12px;
    left: 12px;
    max-width: none;
  }
  .toast { animation-name: toastInMobile; }
  .toast.hide { animation-name: toastOutMobile; }
  @keyframes toastInMobile {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  @keyframes toastOutMobile {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(24px); }
  }
}

/* ---------- Lucide icon sizing helpers ---------- */
.icon {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  vertical-align: -0.15em;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-sm { width: 16px; height: 16px; }
.icon-md { width: 20px; height: 20px; }
.icon-lg { width: 24px; height: 24px; }
.icon-xl { width: 28px; height: 28px; }