/* =====================================================================
   Toastr theme — đồng bộ phong cách toast hệ thống hỗ trợ:
   nền nhạt, viền trái màu, icon tròn (dùng background-image như toastr gốc).
   Nạp SAU toastr.min.css để ghi đè.
   ===================================================================== */

#toast-container > div[class*="toast-"] {
  position: relative;
  width: auto !important;
  min-width: 260px;
  max-width: 380px;
  margin: 0 0 10px !important;
  /* Chừa chỗ icon bên trái (38px) + nút đóng bên phải (34px) */
  padding: 13px 36px 13px 46px !important;
  border-radius: 12px !important;
  overflow: visible !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .12) !important;
  opacity: 1 !important;
  color: #1e293b !important;
  font-size: .9rem;
  line-height: 1.45;
  border: 1px solid transparent;
  border-left-width: 4px;
  /* Icon hiển thị qua background-image (như cơ chế gốc của toastr) */
  background-repeat: no-repeat !important;
  background-position: 14px center !important;
  background-size: 22px 22px !important;
}
#toast-container > div[class*="toast-"]:hover {
  box-shadow: 0 10px 28px rgba(15, 23, 42, .18) !important;
}

#toast-container > div[class*="toast-"] .toast-title { font-weight: 700; margin-bottom: 2px; }
#toast-container > div[class*="toast-"] .toast-message { word-break: break-word; }
#toast-container > div[class*="toast-"] .toast-message a,
#toast-container > div[class*="toast-"] .toast-message label { color: inherit; text-decoration: underline; }

/* Nút đóng */
#toast-container > div[class*="toast-"] .toast-close-button {
  position: absolute;
  top: 8px;
  right: 10px;
  color: #94a3b8;
  opacity: .85;
  font-size: 16px;
  font-weight: 400;
  text-shadow: none;
  line-height: 1;
}
#toast-container > div[class*="toast-"] .toast-close-button:hover { color: #475569; opacity: 1; }

/* Progress bar */
#toast-container > div[class*="toast-"] > .toast-progress { opacity: .25; }

/* ---- Success ---- */
#toast-container > div.toast-success {
  background-color: #f0fdf4 !important;
  border-color: rgba(21, 128, 61, .25);
  border-left-color: #15803d;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8' fill='%2315803d'/%3E%3Cpath d='M11.4 5.6 7 10 4.6 7.6' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}

/* ---- Error ---- */
#toast-container > div.toast-error {
  background-color: #fef2f2 !important;
  border-color: rgba(220, 38, 38, .25);
  border-left-color: #dc2626;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8' fill='%23dc2626'/%3E%3Cpath d='M5.5 5.5 10.5 10.5 M10.5 5.5 5.5 10.5' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") !important;
}

/* ---- Warning ---- */
#toast-container > div.toast-warning {
  background-color: #fffbeb !important;
  border-color: rgba(180, 83, 9, .25);
  border-left-color: #b45309;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8' fill='%23b45309'/%3E%3Cpath d='M8 4 V9' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round'/%3E%3Ccircle cx='8' cy='11.6' r='1' fill='%23fff'/%3E%3C/svg%3E") !important;
}

/* ---- Info ---- */
#toast-container > div.toast-info {
  background-color: #eff6ff !important;
  border-color: rgba(37, 99, 235, .25);
  border-left-color: #2563eb;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8' fill='%232563eb'/%3E%3Cpath d='M8 7 V11.5' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round'/%3E%3Ccircle cx='8' cy='4.6' r='1' fill='%23fff'/%3E%3C/svg%3E") !important;
}

/* Dark mode */
[data-bs-theme="dark"] #toast-container > div[class*="toast-"] { color: #e2e8f0 !important; }
[data-bs-theme="dark"] #toast-container > div.toast-success { background-color: rgba(21,128,61,.18) !important; }
[data-bs-theme="dark"] #toast-container > div.toast-error   { background-color: rgba(220,38,38,.18) !important; }
[data-bs-theme="dark"] #toast-container > div.toast-warning { background-color: rgba(180,83,9,.18) !important; }
[data-bs-theme="dark"] #toast-container > div.toast-info    { background-color: rgba(37,99,235,.18) !important; }
