/* ====================================================================
   === SWEETALERT2 POPUP DESIGN SYSTEM (.swx) ===
   Tách riêng để nạp được ở MỌI nơi có SweetAlert: layout panel/admin/boss,
   trang đăng nhập/đăng ký/quên mật khẩu, và landing page.
   - Helper swal* (swalError/Success/Confirm/Loading/Input) gắn class
     .swx + .swx--<loại> (định nghĩa trong vendor.bundle.js & sweetalert2.min.js).
   - Màu theo ngữ nghĩa: success=xanh lá, error=đỏ, warning=cam, info=xanh dương.
   - KHÔNG đụng .x-notify-popup / .hl-nm / #modalNotifyByType / .dsw (thiết kế riêng).
   ==================================================================== */

/* ---------- SweetAlert2 popup ---------- */
.swx.swal2-popup {
  border-radius: 22px;
  padding: 26px 26px 22px;
  box-shadow: 0 24px 60px -12px rgba(15, 23, 42, .28), 0 8px 20px -8px rgba(15, 23, 42, .12);
  font-family: 'Inter', 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.swx .swal2-title {
  font-size: 19px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.4;
  letter-spacing: -.01em;
}
.swx .swal2-html-container {
  font-size: 14.5px;
  line-height: 1.6;
  color: #64748b;
}
.swx .swal2-input,
.swx .swal2-textarea {
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  box-shadow: none;
  font-size: 14.5px;
}
.swx .swal2-input:focus,
.swx .swal2-textarea:focus {
  border-color: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, .22);
}

/* ---------- Icon -> huy hiệu vuông bo góc gradient (giống popup "Tài khoản xem thử") ---------- */
.swx .swal2-icon {
  border: none !important;
  border-radius: 20px !important;
  margin: 6px auto 18px !important;
  color: #fff !important;
  box-shadow: 0 10px 24px -6px rgba(15, 23, 42, .3);
}
.swx .swal2-icon .swal2-icon-content { color: #fff !important; }
/* Nền gradient theo loại popup */
.swx--success .swal2-icon.swal2-success { background: linear-gradient(135deg, #22c55e, #16a34a) !important; }
.swx--error   .swal2-icon.swal2-error   { background: linear-gradient(135deg, #f87171, #dc2626) !important; }
.swx--warning .swal2-icon.swal2-warning { background: linear-gradient(135deg, #fbbf24, #f59e0b) !important; }
.swx--info    .swal2-icon.swal2-info    { background: linear-gradient(135deg, #60a5fa, #2563eb) !important; }
.swx .swal2-icon.swal2-question         { background: linear-gradient(135deg, #818cf8, #6366f1) !important; }
/* ERROR: dấu X trắng */
.swx .swal2-icon.swal2-error .swal2-x-mark-line-left,
.swx .swal2-icon.swal2-error .swal2-x-mark-line-right { background-color: #fff !important; }
/* SUCCESS: ẩn vòng tròn/đường cong mặc định, dấu check trắng */
.swx .swal2-icon.swal2-success .swal2-success-ring,
.swx .swal2-icon.swal2-success .swal2-success-fix,
.swx .swal2-icon.swal2-success .swal2-success-circular-line-left,
.swx .swal2-icon.swal2-success .swal2-success-circular-line-right { display: none !important; }
.swx .swal2-icon.swal2-success .swal2-success-line-tip,
.swx .swal2-icon.swal2-success .swal2-success-line-long { background-color: #fff !important; }

/* ---------- Actions / buttons ---------- */
.swx-actions { gap: 10px; margin-top: 22px; }
.swx-confirm,
.swx-cancel {
  border-radius: 12px !important;
  padding: 11px 24px !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  box-shadow: none !important;
  margin: 0 !important;
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
}
.swx-confirm:focus,
.swx-cancel:focus { box-shadow: none !important; outline: none !important; }
.swx-confirm:hover { transform: translateY(-1px); filter: brightness(1.05); }
.swx-cancel {
  background: #f1f5f9 !important;
  color: #475569 !important;
}
.swx-cancel:hover { background: #e2e8f0 !important; transform: translateY(-1px); }

/* Nút confirm: gradient theo ngữ nghĩa + đổ bóng màu (giống nút gradient popup xem thử) */
.swx--success .swx-confirm { background: linear-gradient(135deg, #22c55e, #16a34a) !important; color: #fff !important; box-shadow: 0 8px 18px -6px rgba(22, 163, 74, .5) !important; }
.swx--success .swx-confirm:hover { box-shadow: 0 12px 24px -7px rgba(22, 163, 74, .6) !important; }
.swx--error .swx-confirm { background: linear-gradient(135deg, #f87171, #dc2626) !important; color: #fff !important; box-shadow: 0 8px 18px -6px rgba(220, 38, 38, .5) !important; }
.swx--error .swx-confirm:hover { box-shadow: 0 12px 24px -7px rgba(220, 38, 38, .6) !important; }
.swx--warning .swx-confirm { background: linear-gradient(135deg, #fbbf24, #f59e0b) !important; color: #fff !important; box-shadow: 0 8px 18px -6px rgba(245, 158, 11, .5) !important; }
.swx--warning .swx-confirm:hover { box-shadow: 0 12px 24px -7px rgba(245, 158, 11, .6) !important; }
.swx--info .swx-confirm { background: linear-gradient(135deg, #60a5fa, #2563eb) !important; color: #fff !important; box-shadow: 0 8px 18px -6px rgba(37, 99, 235, .5) !important; }
.swx--info .swx-confirm:hover { box-shadow: 0 12px 24px -7px rgba(37, 99, 235, .6) !important; }

/* Backdrop mờ + blur nhẹ */
.swal2-container.swal2-backdrop-show { background: rgba(15, 23, 42, .45); }
@supports ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
  .swal2-container.swal2-backdrop-show { backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
}

/* ---------- Dark mode ---------- */
body.dark_mode .swx.swal2-popup { box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .6); }
body.dark_mode .swx .swal2-title { color: #f1f5f9 !important; }
body.dark_mode .swx .swal2-html-container { color: #cbd5e1; }
body.dark_mode .swx .swal2-input,
body.dark_mode .swx .swal2-textarea {
  background: #2b2b3c;
  border-color: #3a3a4d;
  color: #e2e8f0 !important;
}
body.dark_mode .swx-cancel { background: #2f2f3f !important; color: #cbd5e1 !important; }
body.dark_mode .swx-cancel:hover { background: #3a3a4d !important; }
