:root{
  --kpru-lg-radius:18px;
  --kpru-lg-blur:18px;
  --kpru-lg-sat:180%;
  --kpru-lg-border:rgba(255,255,255,.26);
  --kpru-lg-shadow:0 18px 45px rgba(15,23,42,.22);
  --kpru-lg-bg1:rgba(255,255,255,.26);
  --kpru-lg-bg2:rgba(255,255,255,.12);
  --kpru-lg-text:#eaf4ff;
  --kpru-lg-muted:rgba(234,244,255,.76);
}
[data-bs-theme="light"]{
  --kpru-lg-border:rgba(148,163,184,.28);
  --kpru-lg-shadow:0 14px 35px rgba(15,23,42,.10);
  --kpru-lg-bg1:rgba(255,255,255,.72);
  --kpru-lg-bg2:rgba(255,255,255,.42);
  --kpru-lg-text:#1e293b;
  --kpru-lg-muted:rgba(30,41,59,.78);
}

body.kpru-notify-liquid .toast,
body.kpru-notify-liquid .alert,
body.kpru-notify-liquid .swal2-popup,
body.kpru-notify-liquid .swal2-toast,
body.kpru-notify-liquid .iziToast,
body.kpru-notify-liquid .toastify,
body.kpru-notify-liquid .notyf__toast,
body.kpru-notify-liquid .jconfirm .jconfirm-box{
  position:relative;
  overflow:hidden;
  border:1px solid var(--kpru-lg-border)!important;
  border-radius:var(--kpru-lg-radius)!important;
  background:linear-gradient(135deg,var(--kpru-lg-bg1),var(--kpru-lg-bg2))!important;
  box-shadow:var(--kpru-lg-shadow)!important;
  backdrop-filter:blur(var(--kpru-lg-blur)) saturate(var(--kpru-lg-sat));
  -webkit-backdrop-filter:blur(var(--kpru-lg-blur)) saturate(var(--kpru-lg-sat));
  color:var(--kpru-lg-text)!important;
}

body.kpru-notify-liquid .toast::before,
body.kpru-notify-liquid .alert::before,
body.kpru-notify-liquid .swal2-popup::before,
body.kpru-notify-liquid .swal2-toast::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  pointer-events:none;
  background:
    linear-gradient(135deg,rgba(255,255,255,.24),transparent 42%),
    radial-gradient(circle at 18% 12%,rgba(255,255,255,.24),transparent 28%);
}
body.kpru-notify-liquid .toast>*,
body.kpru-notify-liquid .alert>*,
body.kpru-notify-liquid .swal2-popup>*,
body.kpru-notify-liquid .swal2-toast>*{
  position:relative;
  z-index:1;
}
body.kpru-notify-liquid .toast-header,
body.kpru-notify-liquid .swal2-title,
body.kpru-notify-liquid .alert-heading{
  color:var(--kpru-lg-text)!important;
  background:transparent!important;
}
body.kpru-notify-liquid .toast-body,
body.kpru-notify-liquid .swal2-html-container{
  color:var(--kpru-lg-text)!important;
}
body.kpru-notify-liquid .swal2-actions button,
body.kpru-notify-liquid .toast .btn,
body.kpru-notify-liquid .alert .btn{
  border-radius:999px!important;
}

/* =========================================================
   V1.4 — Clean Liquid Glass / No Alert Shadow
   ลบพื้นเงาเทาใต้กรอบแจ้งเตือนทั้งหมด
   ========================================================= */
body.kpru-notify-liquid .toast,
body.kpru-notify-liquid .toast.show,
body.kpru-notify-liquid .toast.showing,
body.kpru-notify-liquid .alert,
body.kpru-notify-liquid .swal2-popup,
body.kpru-notify-liquid .swal2-toast,
body.kpru-notify-liquid .iziToast,
body.kpru-notify-liquid .toastify,
body.kpru-notify-liquid .notyf__toast,
body.kpru-notify-liquid .jconfirm .jconfirm-box {
  box-shadow: none !important;
  filter: none !important;
}

/* กันเงาที่อาจมาจาก class ของ Bootstrap / library อื่น */
body.kpru-notify-liquid .toast.shadow,
body.kpru-notify-liquid .toast.shadow-sm,
body.kpru-notify-liquid .toast.shadow-lg,
body.kpru-notify-liquid .alert.shadow,
body.kpru-notify-liquid .alert.shadow-sm,
body.kpru-notify-liquid .alert.shadow-lg,
body.kpru-notify-liquid .swal2-popup.shadow,
body.kpru-notify-liquid .swal2-popup.shadow-sm,
body.kpru-notify-liquid .swal2-popup.shadow-lg {
  box-shadow: none !important;
}

/* คงเส้นขอบ Glass บาง ๆ เพื่อให้กล่องยังแยกจากพื้นหลังได้ */
body.kpru-notify-liquid .toast,
body.kpru-notify-liquid .alert,
body.kpru-notify-liquid .swal2-popup,
body.kpru-notify-liquid .swal2-toast {
  border-color: rgba(255,255,255,.30) !important;
}

[data-bs-theme="light"] body.kpru-notify-liquid .toast,
[data-bs-theme="light"] body.kpru-notify-liquid .alert,
[data-bs-theme="light"] body.kpru-notify-liquid .swal2-popup,
[data-bs-theme="light"] body.kpru-notify-liquid .swal2-toast {
  border-color: rgba(148,163,184,.30) !important;
}


/* =========================================================
   V1.5 — Adaptive Contrast Glass
   เป้าหมาย:
   - คง "ไม่มีเงาเทาด้านนอก"
   - เพิ่มขอบและ tint อ่อน ๆ ให้ยังมองเห็นบนพื้นขาว
   - ใช้ inner highlight แทน drop shadow
   ========================================================= */

body.kpru-notify-liquid .toast,
body.kpru-notify-liquid .alert,
body.kpru-notify-liquid .swal2-popup,
body.kpru-notify-liquid .swal2-toast,
body.kpru-notify-liquid .iziToast,
body.kpru-notify-liquid .toastify,
body.kpru-notify-liquid .notyf__toast,
body.kpru-notify-liquid .jconfirm .jconfirm-box {
  /* ไม่มีเงาด้านนอก */
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.44),
    inset 0 0 0 1px rgba(56,189,248,.10) !important;

  /* tint น้ำเงิน/ม่วงบางมาก ช่วยแยกจากพื้นขาวโดยยังดูเป็น glass */
  background:
    linear-gradient(135deg,
      rgba(56,189,248,.10),
      rgba(124,58,237,.055) 48%,
      rgba(255,255,255,.12)
    ),
    linear-gradient(135deg,var(--kpru-lg-bg1),var(--kpru-lg-bg2)) !important;

  border: 1px solid rgba(56,189,248,.34) !important;
}

/* Light mode / พื้นขาว: เพิ่ม edge contrast โดยไม่ทำเป็นเงา */
[data-bs-theme="light"] body.kpru-notify-liquid .toast,
[data-bs-theme="light"] body.kpru-notify-liquid .alert,
[data-bs-theme="light"] body.kpru-notify-liquid .swal2-popup,
[data-bs-theme="light"] body.kpru-notify-liquid .swal2-toast,
[data-bs-theme="light"] body.kpru-notify-liquid .iziToast,
[data-bs-theme="light"] body.kpru-notify-liquid .toastify,
[data-bs-theme="light"] body.kpru-notify-liquid .notyf__toast,
[data-bs-theme="light"] body.kpru-notify-liquid .jconfirm .jconfirm-box {
  background:
    linear-gradient(135deg,
      rgba(14,165,233,.095),
      rgba(124,58,237,.045) 46%,
      rgba(255,255,255,.76)
    ) !important;

  border-color: rgba(2,132,199,.34) !important;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.92),
    inset 0 0 0 1px rgba(2,132,199,.08) !important;
}

/* Dark mode: ขอบสว่างขึ้นนิดเดียว */
[data-bs-theme="dark"] body.kpru-notify-liquid .toast,
[data-bs-theme="dark"] body.kpru-notify-liquid .alert,
[data-bs-theme="dark"] body.kpru-notify-liquid .swal2-popup,
[data-bs-theme="dark"] body.kpru-notify-liquid .swal2-toast {
  border-color: rgba(125,211,252,.28) !important;
}

/* refraction line ด้านบน ช่วยอ่านขอบบนพื้นสว่างโดยไม่เป็น drop shadow */
body.kpru-notify-liquid .toast::after,
body.kpru-notify-liquid .alert::after,
body.kpru-notify-liquid .swal2-popup::after,
body.kpru-notify-liquid .swal2-toast::after {
  content:"";
  position:absolute;
  z-index:0;
  pointer-events:none;
  left:12%;
  right:12%;
  top:0;
  height:1px;
  background:linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,.88),
    rgba(125,211,252,.72),
    rgba(255,255,255,.88),
    transparent
  );
  opacity:.82;
}

/* เพิ่ม separation แบบเส้นบางด้านซ้ายตามชนิด alert */
body.kpru-notify-liquid .alert-success,
body.kpru-notify-liquid .toast.bg-success {
  border-left-color: rgba(34,197,94,.62) !important;
}

body.kpru-notify-liquid .alert-warning,
body.kpru-notify-liquid .toast.bg-warning {
  border-left-color: rgba(245,158,11,.66) !important;
}

body.kpru-notify-liquid .alert-danger,
body.kpru-notify-liquid .toast.bg-danger {
  border-left-color: rgba(239,68,68,.62) !important;
}

body.kpru-notify-liquid .alert-info,
body.kpru-notify-liquid .toast.bg-info {
  border-left-color: rgba(14,165,233,.66) !important;
}

/* SweetAlert icon สีเดิมยังชัดบนพื้นขาว */
[data-bs-theme="light"] body.kpru-notify-liquid .swal2-title,
[data-bs-theme="light"] body.kpru-notify-liquid .swal2-html-container,
[data-bs-theme="light"] body.kpru-notify-liquid .toast-body,
[data-bs-theme="light"] body.kpru-notify-liquid .alert {
  color:#1e293b !important;
}


/* =========================================================
   V1.6 — Adaptive Text Contrast
   JS จะติด class ตาม "พื้นหลังจริงใต้กล่อง" ขณะนั้น
   ========================================================= */

body.kpru-notify-liquid .kpru-glass-on-light,
body.kpru-notify-liquid .kpru-glass-on-light .toast-header,
body.kpru-notify-liquid .kpru-glass-on-light .toast-body,
body.kpru-notify-liquid .kpru-glass-on-light .swal2-title,
body.kpru-notify-liquid .kpru-glass-on-light .swal2-html-container,
body.kpru-notify-liquid .kpru-glass-on-light .alert-heading,
body.kpru-notify-liquid .kpru-glass-on-light .notyf__message,
body.kpru-notify-liquid .kpru-glass-on-light .iziToast-title,
body.kpru-notify-liquid .kpru-glass-on-light .iziToast-message {
  color:#172033 !important;
  text-shadow:none !important;
}

body.kpru-notify-liquid .kpru-glass-on-light small,
body.kpru-notify-liquid .kpru-glass-on-light .text-muted,
body.kpru-notify-liquid .kpru-glass-on-light .swal2-html-container small {
  color:rgba(23,32,51,.72) !important;
  text-shadow:none !important;
}

body.kpru-notify-liquid .kpru-glass-on-dark,
body.kpru-notify-liquid .kpru-glass-on-dark .toast-header,
body.kpru-notify-liquid .kpru-glass-on-dark .toast-body,
body.kpru-notify-liquid .kpru-glass-on-dark .swal2-title,
body.kpru-notify-liquid .kpru-glass-on-dark .swal2-html-container,
body.kpru-notify-liquid .kpru-glass-on-dark .alert-heading,
body.kpru-notify-liquid .kpru-glass-on-dark .notyf__message,
body.kpru-notify-liquid .kpru-glass-on-dark .iziToast-title,
body.kpru-notify-liquid .kpru-glass-on-dark .iziToast-message {
  color:#f8fbff !important;
  text-shadow:0 1px 1px rgba(0,0,0,.18) !important;
}

body.kpru-notify-liquid .kpru-glass-on-dark small,
body.kpru-notify-liquid .kpru-glass-on-dark .text-muted,
body.kpru-notify-liquid .kpru-glass-on-dark .swal2-html-container small {
  color:rgba(248,251,255,.76) !important;
}

/* ให้ input / code ภายใน alert อ่านได้ตาม surface */
body.kpru-notify-liquid .kpru-glass-on-light input,
body.kpru-notify-liquid .kpru-glass-on-light textarea,
body.kpru-notify-liquid .kpru-glass-on-light code {
  color:#172033 !important;
}

body.kpru-notify-liquid .kpru-glass-on-dark input,
body.kpru-notify-liquid .kpru-glass-on-dark textarea,
body.kpru-notify-liquid .kpru-glass-on-dark code {
  color:#f8fbff !important;
}


/* =========================================================
   V1.8 STABLE — Notification Only
   This stylesheet intentionally targets notification surfaces only.
   It does not style modal, navigation, card, dropdown, or layout surfaces.
   Notification timing is NOT controlled by this stylesheet.
   ========================================================= */


/* =========================================================
   V1.9 STABLE — Editor Settings Control
   No floating FX button/panel. Control lives in editorSettingsModal.
   Notification appearance only; normal notification timers are untouched.
   ========================================================= */


/* =========================================================
   V1.10 — Native Notification Lifecycle Compatibility
   สำคัญ:
   - ไม่กำหนด animation ให้ SweetAlert2 / Bootstrap Toast
   - ปล่อยให้ library เดิมควบคุม show/hide + timer + animationend
   - Liquid Glass เปลี่ยนเฉพาะ visual skin เท่านั้น
   ========================================================= */

/* Do NOT override native hide animations / transitions. */
body.kpru-notify-liquid .swal2-popup.swal2-hide,
body.kpru-notify-liquid .swal2-toast.swal2-hide {
  /* SweetAlert2 owns the hide animation. */
}

body.kpru-notify-liquid .toast.hide,
body.kpru-notify-liquid .toast:not(.show):not(.showing) {
  /* Bootstrap owns visibility/autohide lifecycle. */
}


/* =========================================================
   V1.11 — Browser Capture Toast Backdrop Guard
   แก้พื้น/แถบดำ-เทาที่เกิดด้านหลัง Toast ของ Browser Capture
   โดยจำกัดผลเฉพาะ Browser Capture notification เท่านั้น
   ========================================================= */
.kpru-browser-capture-toast-container {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  pointer-events: none !important;
}

.kpru-browser-capture-toast-container::before,
.kpru-browser-capture-toast-container::after {
  content: none !important;
  display: none !important;
}

.kpru-browser-capture-toast-container .swal2-popup,
.kpru-browser-capture-toast-container .kpru-browser-capture-toast {
  pointer-events: auto !important;
}

/* Defensive guard: top-end toast containers should remain transparent.
   Does not affect centered SweetAlert confirm/error dialogs. */
body.swal2-toast-shown .swal2-container.swal2-top-end {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
}
/* =========================================================
   V1.14 — User-adjustable Glass Transparency
   45% transparent is the new recommended default.
   These variables affect only the Glass surface, never text opacity.
   ========================================================= */
:root {
  --kpru-lg-light-alpha:.63;
  --kpru-lg-dark-alpha:.55;
  --kpru-lg-mixed-light-alpha:.73;
  --kpru-lg-mixed-dark-alpha:.65;
}

/* =========================================================
   V1.13 — Adaptive Liquid Contrast + Smooth Tone Transition
   ---------------------------------------------------------
   - Background tone follows the REAL surface detected below each notification.
   - Light surface -> brighter glass + dark text.
   - Dark surface  -> darker glass + white text.
   - Mixed surfaces increase glass opacity for stable legibility.
   - Text/background/border changes transition smoothly.
   - Notification lifecycle/entry/exit animation remains owned by its library.
   ========================================================= */

body.kpru-notify-liquid .toast,
body.kpru-notify-liquid .alert,
body.kpru-notify-liquid .swal2-popup,
body.kpru-notify-liquid .swal2-toast,
body.kpru-notify-liquid .iziToast,
body.kpru-notify-liquid .toastify,
body.kpru-notify-liquid .notyf__toast,
body.kpru-notify-liquid .jconfirm .jconfirm-box {
  --kpru-lg-adaptive-text:#172033;
  --kpru-lg-adaptive-muted:rgba(23,32,51,.72);
  --kpru-lg-adaptive-border:rgba(125,211,252,.40);
  --kpru-lg-adaptive-surface:rgba(248,252,255,var(--kpru-lg-light-alpha,.63));

  /*
   * Keep one common optical highlight layer and animate only background-color.
   * CSS gradients themselves do not interpolate reliably across browsers,
   * while rgba background-color does.
   */
  background-image:
    linear-gradient(135deg,
      rgba(255,255,255,.27) 0%,
      rgba(255,255,255,.08) 34%,
      rgba(56,189,248,.045) 63%,
      rgba(124,58,237,.028) 100%
    ) !important;
  background-color:var(--kpru-lg-adaptive-surface) !important;
  border-color:var(--kpru-lg-adaptive-border) !important;
}

/* Actual light surface under notification */
body.kpru-notify-liquid .kpru-glass-on-light {
  --kpru-lg-adaptive-text:#172033;
  --kpru-lg-adaptive-muted:rgba(23,32,51,.70);
  --kpru-lg-adaptive-border:rgba(2,132,199,.30);
  --kpru-lg-adaptive-surface:rgba(248,252,255,var(--kpru-lg-light-alpha,.63));
}

/* Actual dark surface under notification */
body.kpru-notify-liquid .kpru-glass-on-dark {
  --kpru-lg-adaptive-text:#f8fbff;
  --kpru-lg-adaptive-muted:rgba(248,251,255,.76);
  --kpru-lg-adaptive-border:rgba(186,230,253,.28);
  --kpru-lg-adaptive-surface:rgba(10,18,32,var(--kpru-lg-dark-alpha,.55));
}

/*
 * When a toast overlaps both dark and light regions, increase glass opacity.
 * This intentionally reduces "background fighting" while keeping blur/refraction.
 */
body.kpru-notify-liquid .kpru-glass-mixed.kpru-glass-on-light {
  --kpru-lg-adaptive-surface:rgba(248,252,255,var(--kpru-lg-mixed-light-alpha,.73));
  --kpru-lg-adaptive-border:rgba(2,132,199,.34);
}

body.kpru-notify-liquid .kpru-glass-mixed.kpru-glass-on-dark {
  --kpru-lg-adaptive-surface:rgba(10,18,32,var(--kpru-lg-mixed-dark-alpha,.65));
  --kpru-lg-adaptive-border:rgba(186,230,253,.32);
}

/*
 * Smooth only visual tone properties.
 * Do NOT animate opacity/transform here — SweetAlert/Bootstrap owns those.
 */
body.kpru-notify-liquid .kpru-glass-contrast-ready {
  transition:
    background-color 260ms cubic-bezier(.22,.80,.22,1),
    border-color 260ms cubic-bezier(.22,.80,.22,1),
    box-shadow 260ms cubic-bezier(.22,.80,.22,1) !important;
}

body.kpru-notify-liquid .kpru-glass-contrast-ready,
body.kpru-notify-liquid .kpru-glass-contrast-ready .toast-header,
body.kpru-notify-liquid .kpru-glass-contrast-ready .toast-body,
body.kpru-notify-liquid .kpru-glass-contrast-ready .swal2-title,
body.kpru-notify-liquid .kpru-glass-contrast-ready .swal2-html-container,
body.kpru-notify-liquid .kpru-glass-contrast-ready .alert-heading,
body.kpru-notify-liquid .kpru-glass-contrast-ready .notyf__message,
body.kpru-notify-liquid .kpru-glass-contrast-ready .iziToast-title,
body.kpru-notify-liquid .kpru-glass-contrast-ready .iziToast-message,
body.kpru-notify-liquid .kpru-glass-contrast-ready small,
body.kpru-notify-liquid .kpru-glass-contrast-ready .text-muted,
body.kpru-notify-liquid .kpru-glass-contrast-ready input,
body.kpru-notify-liquid .kpru-glass-contrast-ready textarea,
body.kpru-notify-liquid .kpru-glass-contrast-ready code {
  transition:
    color 240ms cubic-bezier(.22,.80,.22,1),
    text-shadow 240ms cubic-bezier(.22,.80,.22,1) !important;
}

/* One authoritative adaptive text source, overriding theme-only guesses. */
body.kpru-notify-liquid .kpru-glass-on-light,
body.kpru-notify-liquid .kpru-glass-on-light .toast-header,
body.kpru-notify-liquid .kpru-glass-on-light .toast-body,
body.kpru-notify-liquid .kpru-glass-on-light .swal2-title,
body.kpru-notify-liquid .kpru-glass-on-light .swal2-html-container,
body.kpru-notify-liquid .kpru-glass-on-light .alert-heading,
body.kpru-notify-liquid .kpru-glass-on-light .notyf__message,
body.kpru-notify-liquid .kpru-glass-on-light .iziToast-title,
body.kpru-notify-liquid .kpru-glass-on-light .iziToast-message,
body.kpru-notify-liquid .kpru-glass-on-light input,
body.kpru-notify-liquid .kpru-glass-on-light textarea,
body.kpru-notify-liquid .kpru-glass-on-light code {
  color:var(--kpru-lg-adaptive-text) !important;
  text-shadow:none !important;
}

body.kpru-notify-liquid .kpru-glass-on-dark,
body.kpru-notify-liquid .kpru-glass-on-dark .toast-header,
body.kpru-notify-liquid .kpru-glass-on-dark .toast-body,
body.kpru-notify-liquid .kpru-glass-on-dark .swal2-title,
body.kpru-notify-liquid .kpru-glass-on-dark .swal2-html-container,
body.kpru-notify-liquid .kpru-glass-on-dark .alert-heading,
body.kpru-notify-liquid .kpru-glass-on-dark .notyf__message,
body.kpru-notify-liquid .kpru-glass-on-dark .iziToast-title,
body.kpru-notify-liquid .kpru-glass-on-dark .iziToast-message,
body.kpru-notify-liquid .kpru-glass-on-dark input,
body.kpru-notify-liquid .kpru-glass-on-dark textarea,
body.kpru-notify-liquid .kpru-glass-on-dark code {
  color:var(--kpru-lg-adaptive-text) !important;
  text-shadow:0 1px 1px rgba(0,0,0,.16) !important;
}

body.kpru-notify-liquid .kpru-glass-on-light small,
body.kpru-notify-liquid .kpru-glass-on-light .text-muted,
body.kpru-notify-liquid .kpru-glass-on-light .swal2-html-container small,
body.kpru-notify-liquid .kpru-glass-on-dark small,
body.kpru-notify-liquid .kpru-glass-on-dark .text-muted,
body.kpru-notify-liquid .kpru-glass-on-dark .swal2-html-container small {
  color:var(--kpru-lg-adaptive-muted) !important;
}

/* Buttons should remain readable without inheriting the surrounding adaptive text. */
body.kpru-notify-liquid .kpru-glass-on-light .swal2-actions .btn,
body.kpru-notify-liquid .kpru-glass-on-dark .swal2-actions .btn,
body.kpru-notify-liquid .kpru-glass-on-light .swal2-actions button,
body.kpru-notify-liquid .kpru-glass-on-dark .swal2-actions button {
  text-shadow:none !important;
}

/* Respect reduced-motion accessibility. */
@media (prefers-reduced-motion: reduce) {
  body.kpru-notify-liquid .kpru-glass-contrast-ready,
  body.kpru-notify-liquid .kpru-glass-contrast-ready * {
    transition-duration:0.01ms !important;
  }
}
/* =========================================================
   V1.15 — SweetAlert2 Success Icon / Liquid Glass Compatibility
   ---------------------------------------------------------
   SweetAlert2 success icon contains 3 internal helper masks:
   - .swal2-success-circular-line-left
   - .swal2-success-circular-line-right
   - .swal2-success-fix

   On an opaque SweetAlert popup these masks blend into the popup background.
   On a transparent/backdrop-filter Liquid Glass popup, SweetAlert's inline
   white background on those helpers becomes visible as a second pale/white
   circular graphic behind the real green success ring/check.

   Liquid Glass does not need those opaque masks. Keep the real success ring
   and check animation, but make only the helper-mask surfaces invisible.
   ========================================================= */

body.kpru-notify-liquid
.swal2-icon.swal2-success
.swal2-success-circular-line-left,

body.kpru-notify-liquid
.swal2-icon.swal2-success
.swal2-success-circular-line-right,

body.kpru-notify-liquid
.swal2-icon.swal2-success
.swal2-success-fix {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  opacity: 0 !important;
}

/* Keep the actual success mark above any popup glass highlight layer. */
body.kpru-notify-liquid
.swal2-icon.swal2-success
.swal2-success-ring,

body.kpru-notify-liquid
.swal2-icon.swal2-success
.swal2-success-line-tip,

body.kpru-notify-liquid
.swal2-icon.swal2-success
.swal2-success-line-long {
  position: absolute;
  z-index: 2;
}

/*
 * Defensive cleanup for SweetAlert2's inline helper background when a popup
 * is recycled/re-opened. This remains scoped strictly to SUCCESS icons while
 * Liquid mode is active; warning/error/info/question icons are untouched.
 */
body.kpru-notify-liquid
.swal2-icon.swal2-success [class*="swal2-success-circular-line"] {
  background: transparent !important;
  background-color: transparent !important;
  opacity: 0 !important;
}
/* =========================================================
   V1.16 — Adaptive Success Accent
   Plan B: success color follows the real Liquid Glass surface.

   Light glass:
   - deeper Teal / Emerald for crisp contrast
   Dark glass:
   - brighter Mint / Cyan-Teal for luminous readability

   The parent .kpru-glass-on-light / .kpru-glass-on-dark classes are already
   driven by the V1.13 multi-point luminance engine, so the success mark now
   follows the same adaptive decision instead of using one fixed green.
   ========================================================= */

/* Fallback while adaptive tone is being resolved. */
body.kpru-notify-liquid .swal2-icon.swal2-success {
  --kpru-success-accent:#14b8a6;
  --kpru-success-ring:rgba(20,184,166,.28);
  --kpru-success-border:rgba(20,184,166,.52);
  --kpru-success-glow:rgba(20,184,166,.18);

  border-color:var(--kpru-success-border) !important;
  color:var(--kpru-success-accent) !important;

  transition:
    border-color 260ms cubic-bezier(.22,.80,.22,1),
    color 260ms cubic-bezier(.22,.80,.22,1),
    filter 260ms cubic-bezier(.22,.80,.22,1) !important;
}

/* Light surface -> stronger/darker teal to remain distinct on bright glass. */
body.kpru-notify-liquid
.kpru-glass-on-light
.swal2-icon.swal2-success {
  --kpru-success-accent:#0f8f83;
  --kpru-success-ring:rgba(15,143,131,.24);
  --kpru-success-border:rgba(15,143,131,.46);
  --kpru-success-glow:rgba(13,148,136,.14);
}

/* Dark surface -> luminous mint/cyan-teal, still restrained and professional. */
body.kpru-notify-liquid
.kpru-glass-on-dark
.swal2-icon.swal2-success {
  --kpru-success-accent:#67e8d1;
  --kpru-success-ring:rgba(103,232,209,.34);
  --kpru-success-border:rgba(103,232,209,.56);
  --kpru-success-glow:rgba(94,234,212,.24);
}

/* Keep the actual SweetAlert2 ring in the same adaptive accent family. */
body.kpru-notify-liquid
.swal2-icon.swal2-success
.swal2-success-ring {
  border-color:var(--kpru-success-ring) !important;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.04),
    0 0 18px var(--kpru-success-glow) !important;

  transition:
    border-color 260ms cubic-bezier(.22,.80,.22,1),
    box-shadow 260ms cubic-bezier(.22,.80,.22,1) !important;
}

/* Both strokes of the check mark follow the same adaptive color. */
body.kpru-notify-liquid
.swal2-icon.swal2-success
.swal2-success-line-tip,

body.kpru-notify-liquid
.swal2-icon.swal2-success
.swal2-success-line-long {
  background-color:var(--kpru-success-accent) !important;

  transition:
    background-color 260ms cubic-bezier(.22,.80,.22,1),
    box-shadow 260ms cubic-bezier(.22,.80,.22,1) !important;
}

/* Subtle optical polish without changing SweetAlert2's transform animation. */
body.kpru-notify-liquid
.kpru-glass-on-light
.swal2-icon.swal2-success
.swal2-success-line-tip,

body.kpru-notify-liquid
.kpru-glass-on-light
.swal2-icon.swal2-success
.swal2-success-line-long {
  box-shadow:0 0 5px rgba(15,143,131,.10);
}

body.kpru-notify-liquid
.kpru-glass-on-dark
.swal2-icon.swal2-success
.swal2-success-line-tip,

body.kpru-notify-liquid
.kpru-glass-on-dark
.swal2-icon.swal2-success
.swal2-success-line-long {
  box-shadow:0 0 8px rgba(103,232,209,.20);
}

/*
 * Mixed backgrounds already make the glass surface slightly more opaque.
 * Give the success accent a tiny ring boost there, without changing hue.
 */
body.kpru-notify-liquid
.kpru-glass-mixed
.swal2-icon.swal2-success
.swal2-success-ring {
  box-shadow:
    0 0 0 1px rgba(255,255,255,.06),
    0 0 20px var(--kpru-success-glow) !important;
}

/* Accessibility: keep adaptive color correctness but remove transition motion. */
@media (prefers-reduced-motion: reduce) {
  body.kpru-notify-liquid .swal2-icon.swal2-success,
  body.kpru-notify-liquid .swal2-icon.swal2-success .swal2-success-ring,
  body.kpru-notify-liquid .swal2-icon.swal2-success .swal2-success-line-tip,
  body.kpru-notify-liquid .swal2-icon.swal2-success .swal2-success-line-long {
    transition-duration:.01ms !important;
  }
}

/* =========================================================
   V1.17 — Layered Optical Glass / Adaptive Edge Contrast
   - Depth comes from stacked translucent specular surfaces, not a gray
     drop shadow. Notification entry/exit lifecycle stays native.
   - Applies only while a user has explicitly opted into Liquid Glass.
   - Tone classes are populated by kpru_liquid_glass.js, not the global theme.
   ========================================================= */
body.kpru-notify-liquid .toast,
body.kpru-notify-liquid .alert,
body.kpru-notify-liquid .swal2-popup,
body.kpru-notify-liquid .swal2-toast,
body.kpru-notify-liquid .iziToast,
body.kpru-notify-liquid .toastify,
body.kpru-notify-liquid .notyf__toast,
body.kpru-notify-liquid .jconfirm .jconfirm-box {
  --kpru-lg-rim:rgba(255,255,255,.74);
  --kpru-lg-rim-bottom:rgba(73,110,163,.19);
  --kpru-lg-glint:rgba(255,255,255,.30);
  --kpru-lg-prism:rgba(154,202,255,.14);
  --kpru-lg-inner-edge:rgba(255,255,255,.44);
  background-image:
    radial-gradient(ellipse 88% 56% at 16% -9%, var(--kpru-lg-glint) 0%, transparent 80%),
    linear-gradient(118deg, rgba(255,255,255,.115) 0%, transparent 34%, var(--kpru-lg-prism) 54%, transparent 69%),
    linear-gradient(164deg, rgba(255,255,255,.14) 0%, transparent 38%, rgba(111,66,193,.035) 100%) !important;
  border:1px solid var(--kpru-lg-adaptive-border) !important;
  border-radius:var(--kpru-lg-radius) !important;
  box-shadow:
    inset 0 1.5px 0 var(--kpru-lg-rim),
    inset 1px 0 0 var(--kpru-lg-inner-edge),
    inset -1px 0 0 rgba(255,255,255,.17),
    inset 0 -1.5px 0 var(--kpru-lg-rim-bottom),
    inset 0 0 0 1px rgba(255,255,255,.075) !important;
  -webkit-backdrop-filter:blur(24px) saturate(185%) contrast(1.07);
  backdrop-filter:blur(24px) saturate(185%) contrast(1.07);
  isolation:isolate;
}

/* Tone-specific reflection color must match the ACTUAL backdrop. */
body.kpru-notify-liquid .kpru-glass-on-dark {
  --kpru-lg-rim:rgba(255,255,255,.39);
  --kpru-lg-rim-bottom:rgba(4,11,27,.34);
  --kpru-lg-glint:rgba(196,224,255,.15);
  --kpru-lg-prism:rgba(129,169,255,.11);
  --kpru-lg-inner-edge:rgba(255,255,255,.23);
}
body.kpru-notify-liquid .kpru-glass-on-light {
  --kpru-lg-rim:rgba(255,255,255,.91);
  --kpru-lg-rim-bottom:rgba(67,111,162,.20);
  --kpru-lg-glint:rgba(255,255,255,.39);
  --kpru-lg-prism:rgba(56,189,248,.105);
  --kpru-lg-inner-edge:rgba(255,255,255,.65);
}

/* A first optically refracted inner pane, without intercepting clicks. */
body.kpru-notify-liquid .toast::before,
body.kpru-notify-liquid .alert::before,
body.kpru-notify-liquid .swal2-popup::before,
body.kpru-notify-liquid .swal2-toast::before,
body.kpru-notify-liquid .iziToast::before,
body.kpru-notify-liquid .toastify::before,
body.kpru-notify-liquid .notyf__toast::before,
body.kpru-notify-liquid .jconfirm .jconfirm-box::before {
  content:"";
  position:absolute;
  inset:2px;
  border-radius:calc(var(--kpru-lg-radius) - 3px);
  pointer-events:none;
  z-index:0;
  background:
    radial-gradient(ellipse 62% 40% at 15% 2%, var(--kpru-lg-glint), transparent 92%),
    linear-gradient(105deg, rgba(255,255,255,.105), transparent 43%, rgba(255,255,255,.06) 74%, transparent);
  border:1px solid rgba(255,255,255,.105);
}

/* The second, narrow spectral refraction just inside the upper pane. */
body.kpru-notify-liquid .toast::after,
body.kpru-notify-liquid .alert::after,
body.kpru-notify-liquid .swal2-popup::after,
body.kpru-notify-liquid .swal2-toast::after,
body.kpru-notify-liquid .iziToast::after,
body.kpru-notify-liquid .toastify::after,
body.kpru-notify-liquid .notyf__toast::after,
body.kpru-notify-liquid .jconfirm .jconfirm-box::after {
  content:"";
  position:absolute;
  z-index:0;
  pointer-events:none;
  inset:1px 10px auto;
  height:2px;
  opacity:.88;
  background:linear-gradient(90deg,transparent 0%,rgba(255,255,255,.82) 25%,rgba(125,211,252,.64) 58%,rgba(255,255,255,.70) 79%,transparent 100%);
  border-radius:999px;
}

/* Keep content above both panes. Protect SweetAlert and toast action buttons. */
body.kpru-notify-liquid .iziToast > *,
body.kpru-notify-liquid .toastify > *,
body.kpru-notify-liquid .notyf__toast > *,
body.kpru-notify-liquid .jconfirm .jconfirm-box > * {
  position:relative;
  z-index:1;
}

/* Full text coverage for third-party toast engines, with adaptive tone. */
body.kpru-notify-liquid .kpru-glass-on-light .notyf__message,
body.kpru-notify-liquid .kpru-glass-on-dark .notyf__message,
body.kpru-notify-liquid .kpru-glass-on-light .iziToast-title,
body.kpru-notify-liquid .kpru-glass-on-dark .iziToast-title,
body.kpru-notify-liquid .kpru-glass-on-light .iziToast-message,
body.kpru-notify-liquid .kpru-glass-on-dark .iziToast-message,
body.kpru-notify-liquid .kpru-glass-on-light.toastify,
body.kpru-notify-liquid .kpru-glass-on-dark.toastify {
  color:var(--kpru-lg-adaptive-text) !important;
}
body.kpru-notify-liquid .kpru-glass-on-dark .swal2-close,
body.kpru-notify-liquid .kpru-glass-on-light .swal2-close {
  color:var(--kpru-lg-adaptive-text) !important;
}
body.kpru-notify-liquid .kpru-glass-on-dark .toast-header .btn-close {
  filter:invert(1) grayscale(1) brightness(1.7);
}
body.kpru-notify-liquid .kpru-glass-on-light .toast-header .btn-close {
  filter:none;
}

/* Override the old light-theme shorthand background rule (higher CSS
   specificity), otherwise it can keep a milky WHITE surface while the adaptive
   text has switched to WHITE on a dark underlying page. */
body.kpru-notify-liquid :is(.toast,.alert,.swal2-popup,.swal2-toast,.iziToast,.toastify,.notyf__toast,.jconfirm .jconfirm-box):is(.kpru-glass-on-light,.kpru-glass-on-dark) {
  background-color:var(--kpru-lg-adaptive-surface) !important;
  background-image:
    radial-gradient(ellipse 88% 56% at 16% -9%, var(--kpru-lg-glint) 0%, transparent 80%),
    linear-gradient(118deg, rgba(255,255,255,.115) 0%, transparent 34%, var(--kpru-lg-prism) 54%, transparent 69%),
    linear-gradient(164deg, rgba(255,255,255,.14) 0%, transparent 38%, rgba(111,66,193,.035) 100%) !important;
}

@media (prefers-reduced-transparency: reduce) {
  /* Follow the user accessibility preference without disabling notifications. */
  body.kpru-notify-liquid .toast,
  body.kpru-notify-liquid .alert,
  body.kpru-notify-liquid .swal2-popup,
  body.kpru-notify-liquid .swal2-toast {
    -webkit-backdrop-filter:none;
    backdrop-filter:none;
    background-color:rgba(248,252,255,.96) !important;
  }
  body.kpru-notify-liquid :is(.toast,.alert,.swal2-popup,.swal2-toast):is(.kpru-glass-on-light,.kpru-glass-on-dark) {
    background-color:rgba(248,252,255,.96) !important;
  }
  body.kpru-notify-liquid :is(.toast,.alert,.swal2-popup,.swal2-toast).kpru-glass-on-dark {
    background-color:rgba(10,18,32,.96) !important;
  }
}
