/* ================================================================
   SYSTEM POPUP THEME — ใช้เฉพาะ SweetAlert ที่ไม่มีงานออกแบบเฉพาะ
   ================================================================ */
.tnh-system-swal-container{
  z-index:40000!important;
  padding:16px!important;
  background:rgba(1,7,13,.70)!important;
  backdrop-filter:blur(9px);
  -webkit-backdrop-filter:blur(9px);
}
.tnh-system-swal{
  --tnh-alert:56,189,248;
  width:min(88vw,360px)!important;
  padding:0!important;
  overflow:hidden!important;
  border-radius:24px!important;
  border:1px solid rgba(var(--tnh-alert),.18)!important;
  background:
    linear-gradient(180deg,rgba(3,12,18,.84),rgba(2,10,15,.96)),
    url('https://images.unsplash.com/photo-1448375240586-882707db888b?auto=format&fit=crop&w=900&q=72') center/cover no-repeat!important;
  color:#f1f5f9!important;
  box-shadow:0 24px 70px rgba(0,0,0,.50),inset 0 1px 0 rgba(255,255,255,.035)!important;
  font-family:inherit!important;
}
.tnh-system-swal-success{--tnh-alert:52,211,153}
.tnh-system-swal-error{--tnh-alert:251,113,133}
.tnh-system-swal-warning{--tnh-alert:251,146,60}
.tnh-system-swal-info{--tnh-alert:56,189,248}
.tnh-system-swal-question{--tnh-alert:167,139,250}

.tnh-system-swal-icon{
  width:76px!important;
  height:76px!important;
  margin:28px auto 14px!important;
  border-width:2px!important;
  border-color:rgba(var(--tnh-alert),.52)!important;
  color:rgb(var(--tnh-alert))!important;
  filter:drop-shadow(0 0 15px rgba(var(--tnh-alert),.13));
}
.tnh-system-swal-icon .swal2-icon-content{font-size:48px!important;color:rgb(var(--tnh-alert))!important}
.tnh-system-swal-icon.swal2-success .swal2-success-ring,
.tnh-system-swal-icon.swal2-success .swal2-success-fix,
.tnh-system-swal-icon.swal2-success [class^=swal2-success-line]{display:none!important}
.tnh-system-swal-icon.swal2-success{
  width:48px!important;
  height:48px!important;
  border:0!important;
  background:#10b981!important;
  box-shadow:0 0 20px rgba(16,185,129,.38)!important;
}
.tnh-system-swal-icon.swal2-success::after{
  content:'✓';
  display:grid;
  place-items:center;
  width:100%;
  height:100%;
  color:#fff;
  font-family:Arial,sans-serif;
  font-size:24px;
  font-weight:700;
  line-height:1;
}
.tnh-system-swal-icon.swal2-error [class^=swal2-x-mark-line]{background-color:rgb(var(--tnh-alert))!important}

.tnh-system-swal-title{
  margin:0!important;
  padding:0 24px!important;
  color:#f7fbff!important;
  font-size:20px!important;
  line-height:1.35!important;
  font-weight:850!important;
}
.tnh-system-swal-neutral .tnh-system-swal-title{padding-top:27px!important}
.tnh-system-swal-content{
  margin:8px 0 0!important;
  padding:0 24px!important;
  color:#91a6b5!important;
  font-size:11px!important;
  line-height:1.65!important;
}
.tnh-system-swal-content:empty{display:none!important}
.tnh-system-swal-actions{
  width:100%!important;
  margin:20px 0 0!important;
  padding:0 22px 24px!important;
  gap:9px!important;
  display:flex!important;
}
.tnh-system-swal-actions:empty{display:none!important}
.tnh-system-swal-actions .swal2-styled{
  flex:1 1 0!important;
  min-height:44px!important;
  margin:0!important;
  padding:10px 14px!important;
  border:1px solid rgba(255,255,255,.10)!important;
  border-radius:13px!important;
  font-family:inherit!important;
  font-size:11px!important;
  font-weight:850!important;
  box-shadow:0 9px 22px rgba(0,0,0,.20)!important;
}
.tnh-system-swal-confirm:focus,.tnh-system-swal-deny:focus,.tnh-system-swal-cancel:focus{
  box-shadow:0 0 0 3px rgba(var(--tnh-alert),.20)!important;
}
.tnh-system-swal-input{
  width:calc(100% - 44px)!important;
  min-height:46px!important;
  margin:17px 22px 0!important;
  padding:10px 13px!important;
  border:1px solid rgba(148,163,184,.18)!important;
  border-radius:13px!important;
  background:rgba(3,12,20,.72)!important;
  color:#f1f5f9!important;
  font-family:inherit!important;
  font-size:13px!important;
  font-weight:600!important;
  line-height:1.4!important;
  box-shadow:none!important;
}
.tnh-system-swal-input:focus{border-color:rgba(var(--tnh-alert),.55)!important;box-shadow:0 0 0 3px rgba(var(--tnh-alert),.10)!important}
.tnh-system-swal-loader{border-color:rgb(var(--tnh-alert)) transparent rgb(var(--tnh-alert)) transparent!important}
.tnh-system-swal-close{color:#8fa5b6!important;font-size:26px!important}
.tnh-system-swal .swal2-validation-message{
  margin:12px 22px 0!important;
  border-radius:11px!important;
  background:rgba(127,29,29,.26)!important;
  color:#fecdd3!important;
  font-size:10px!important;
}
.tnh-system-swal .swal2-timer-progress-bar{background:rgba(var(--tnh-alert),.70)!important}

/* หน้าแบบฟอร์มราชการใช้ธีมกระดาษ/สีเขียว แทนธีมมืดของเว็บหลัก */
body.tnh-popup-paper-page .tnh-system-swal-container{
  background:rgba(20,36,27,.40)!important;
}
body.tnh-popup-paper-page .tnh-system-swal{
  --tnh-alert:47,111,79;
  border-color:rgba(47,111,79,.22)!important;
  background:linear-gradient(180deg,#fff,#fbf9f3)!important;
  color:#1f2b23!important;
  box-shadow:0 24px 65px rgba(31,77,54,.22)!important;
}
body.tnh-popup-paper-page .tnh-system-swal-title{color:#1f2b23!important}
body.tnh-popup-paper-page .tnh-system-swal-content{color:#5b6b60!important}
body.tnh-popup-paper-page .tnh-system-swal-input{background:#fff!important;color:#1f2b23!important}

@media(max-width:380px){
  .tnh-system-swal{width:min(91vw,348px)!important}
  .tnh-system-swal-title{font-size:18px!important}
  .tnh-system-swal-actions{padding-left:18px!important;padding-right:18px!important}
}
@media(prefers-reduced-motion:reduce){
  .tnh-system-swal,.tnh-system-swal-icon{animation:none!important}
}
