/* Front-end popup actions share the website green and readable white text.
 * Close icons, ordinary text links and status messages stay native. */
body.zykt-unified-style :is(
  .zykt-account-bind-primary,
  .zykt-email-login-panel [data-email-submit],
  .sign .sign-submit .btn,
  .sign .captcha-clk,
  .sign .captcha-clk2,
  .sign .sign-social a,
  .sign .zykt-social-login a,
  .sitetips-pop .btn,
  .sitetips-pop button:not(.close),
  .layui-layer .layui-layer-btn a,
  .layui-layer .erphpdown-type-link,
  .layui-layer .erphpdown-btn,
  .layui-layer .ss-button,
  .wppay-modal .erphpdown-btn,
  .wppay-modal .ss-button,
  .wppay-modal .wap a,
  .wppay-modal [data-custom-submit]
),
body.zykt-popup-frame :is(
  #erphpdown-download .link,
  .erphpdown-btn,
  .ss-button,
  .erphpdown-type-link,
  .layui-layer .layui-layer-btn a,
  .wppay-modal .wap a,
  [data-custom-submit]
){
  background:var(--theme-color,#277456)!important;
  border-color:var(--theme-color,#277456)!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}
/* Some payment labels are nested spans with their own text color. */
body.zykt-unified-style :is(.zykt-account-bind-primary,.zykt-email-login-panel [data-email-submit],.layui-layer .layui-layer-btn a,.layui-layer .erphpdown-type-link,.wppay-modal .wap a) *,
body.zykt-popup-frame :is(.erphpdown-btn,.ss-button,.erphpdown-type-link,.layui-layer .layui-layer-btn a,.wppay-modal .wap a) *{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}

/* Payment channels form a centred row, with full-row balance/card actions kept. */
body.zykt-unified-style .layui-layer .erphpdown-type-payment:not([hidden]),
body.zykt-popup-frame .erphpdown-type-payment:not([hidden]){
  display:flex;flex-wrap:wrap;justify-content:center;align-items:stretch;gap:12px;
}
body.zykt-unified-style .layui-layer .erphpdown-type-payment>.erphpdown-type-link:not([hidden]),
body.zykt-popup-frame .erphpdown-type-payment>.erphpdown-type-link:not([hidden]){
  display:flex;align-items:center;justify-content:center;gap:6px;flex:0 0 150px;
  min-width:150px;max-width:100%;min-height:44px;margin:0;padding:13px 12px;
  box-sizing:border-box;line-height:18px;
}
body.zykt-unified-style .layui-layer .erphpdown-type-payment>:is(.erphpdown-type-credit,.erphpdown-type-card),
body.zykt-popup-frame .erphpdown-type-payment>:is(.erphpdown-type-credit,.erphpdown-type-card){flex-basis:100%}

/* Standard Layer alerts/confirmations share one layout. Type-1 payment panels,
 * brief messages and media viewers retain their own geometry. */
:is(body.zykt-unified-style,body.zykt-popup-frame) .layui-layer-dialog:not(.layui-layer-msg):not(.layui-layer-page){
  width:370px!important;
  min-width:0!important;
  max-width:calc(100vw - 32px)!important;
  height:auto!important;
  min-height:0!important;
  max-height:calc(100vh - 32px);
  max-height:calc(100dvh - 32px);
  box-sizing:border-box;
  overflow:auto;
  overscroll-behavior:contain;
}
:is(body.zykt-unified-style,body.zykt-popup-frame) .layui-layer-dialog:not(.layui-layer-msg):not(.layui-layer-page) .layui-layer-title{
  height:44px!important;
  line-height:44px!important;
  padding:0 48px 0 20px!important;
  margin:0!important;
  font-size:16px!important;
  box-sizing:border-box;
}
:is(body.zykt-unified-style,body.zykt-popup-frame) .layui-layer-dialog:not(.layui-layer-msg):not(.layui-layer-page) .layui-layer-content{
  height:auto!important;
  min-height:0!important;
  max-height:max(64px,calc(100vh - 144px));
  max-height:max(64px,calc(100dvh - 144px));
  padding:20px!important;
  font-size:14px!important;
  line-height:24px!important;
  box-sizing:border-box;
  overflow:auto;
  overflow-wrap:anywhere;
}
:is(body.zykt-unified-style,body.zykt-popup-frame) .layui-layer-dialog:not(.layui-layer-msg):not(.layui-layer-page) .layui-layer-content.layui-layer-padding{padding-left:56px!important}
:is(body.zykt-unified-style,body.zykt-popup-frame) .layui-layer-dialog:not(.layui-layer-msg):not(.layui-layer-page) .layui-layer-btn{
  display:flex!important;
  justify-content:center!important;
  align-items:center;
  gap:10px!important;
  padding:0 20px 20px!important;
  box-sizing:border-box;
}
:is(body.zykt-unified-style,body.zykt-popup-frame) .layui-layer-dialog:not(.layui-layer-msg):not(.layui-layer-page) .layui-layer-btn a{
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  min-width:76px!important;
  height:36px!important;
  margin:0!important;
  padding:7px 14px!important;
  font-size:14px!important;
  line-height:20px!important;
  white-space:nowrap;
  box-sizing:border-box;
}

/* Phone dialogs share a compact card, rather than scaling down their contents. */
@media(max-width:600px){
 body.zykt-unified-style{--zykt-phone-dialog-width:304px;--zykt-phone-dialog-limit:72dvh}
 body.zykt-unified-style :is(.sitetips-pop,.zykt-email-login-dialog,.zykt-account-bind-dialog){
  width:min(304px,calc(100vw - 56px));max-width:calc(100vw - 56px);height:auto;min-height:0;
  max-height:72vh;max-height:72dvh;box-sizing:border-box;overflow:auto;overscroll-behavior:contain;border-radius:14px
 }
 body.zykt-unified-style .sitetips-pop .sitetips-header{padding:24px 40px 0;margin:0 0 14px}
 body.zykt-unified-style .sitetips-pop .sitetips-header h3{font-size:18px}
 body.zykt-unified-style .sitetips-pop .sitetips-main{padding:0 20px 22px;font-size:14px;line-height:1.65}
 body.zykt-unified-style .sitetips-pop .sitetips-main p:last-child{margin-bottom:0}
 body.zykt-unified-style .xl-contact-dialog{
  width:min(280px,calc(100vw - 56px));max-width:calc(100vw - 56px);max-height:72vh;max-height:72dvh;
  padding:24px 20px 20px;box-sizing:border-box;outline:none
 }
 body.zykt-unified-style .xl-contact-dialog h2{font-size:18px;margin:0 0 16px;padding:0 20px}
 body.zykt-unified-style .xl-contact-dialog img{width:168px;max-width:100%;height:auto}
 body.zykt-unified-style .xl-contact-dialog p{font-size:13px;line-height:1.65;margin:14px 0 0}
 body.zykt-unified-style .zykt-email-login-panel{padding:24px 20px 20px}
 body.zykt-unified-style .zykt-email-login-panel h3{font-size:18px;margin-bottom:14px}
 body.zykt-unified-style .zykt-email-login-panel input{font-size:16px;min-height:44px}
 body.zykt-unified-style .zykt-email-login-panel [data-email-submit]{min-height:44px;font-size:14px}
 body.zykt-unified-style .zykt-account-bind-dialog{padding:24px 20px 20px}
 body.zykt-unified-style .zykt-account-bind-dialog h3{font-size:18px;margin:0 24px 14px}
 body.zykt-unified-style .zykt-account-bind-dialog p{font-size:14px;line-height:1.65;margin-bottom:16px}
 body.zykt-unified-style .zykt-account-bind-primary{min-height:44px}
 body.zykt-unified-style .sign .sign-box{
  width:min(304px,calc(100vw - 56px))!important;min-width:0!important;max-width:calc(100vw - 56px)!important;
  max-height:72vh;max-height:72dvh;left:50%!important;top:50%!important;bottom:auto!important;
  transform:translate(-50%,-50%)!important;overflow:auto;overscroll-behavior:contain;border-radius:14px!important
 }
 body.zykt-unified-style .sign .sign-box.has-left{padding-left:0}
 body.zykt-unified-style .sign form{padding:22px 20px 20px}
 body.zykt-unified-style .sign .logo-login{height:52px;max-width:100%}
 body.zykt-unified-style .sign .form-item{margin-bottom:12px}
 body.zykt-unified-style .sign .form-control{min-height:44px;font-size:16px}
 body.zykt-unified-style .sign .sign-submit{padding-bottom:14px}
 body.zykt-unified-style .sign .sign-submit .btn{min-height:44px;font-size:14px}
 body.zykt-unified-style .sign .sign-social{margin-top:14px}
 body.zykt-unified-style :is(.xl-contact-close,.zykt-email-login-close,.zykt-account-bind-close,.sitetips-pop .close,.sign .close-link){
  position:absolute;left:auto;right:4px;top:4px;width:44px;height:44px;margin:0;padding:0;border:0;
  display:flex;align-items:center;justify-content:center;background:transparent;color:#728079;line-height:1;font-size:24px;box-sizing:border-box
 }
 body.zykt-unified-style :is(.xl-contact-close,.zykt-email-login-close,.zykt-account-bind-close,.sitetips-pop .close,.sign .close-link):focus-visible{outline:2px solid #277456;outline-offset:-5px}
 body.zykt-unified-style .sitetips-pop .close .icon{font-size:20px;top:0}
 body.zykt-unified-style .sitetips-pop .close .icon{display:none}
 body.zykt-unified-style .sitetips-pop .close:before{content:'×';font:24px/1 Arial,sans-serif}
 body.zykt-unified-style .layui-layer-dialog:not(.layui-layer-msg):not(.layui-layer-page){
  width:min(304px,calc(100vw - 56px))!important;min-width:0!important;max-width:calc(100vw - 56px)!important;
  max-height:72vh;max-height:72dvh;box-sizing:border-box;border-radius:14px;overflow:auto;overscroll-behavior:contain
 }
 /* Payment panels retain native width and minimum width. */
 body.zykt-unified-style .layui-layer-page.layui-layer-dialog,
 body.zykt-unified-style .zykt-mobile-payment-frame{
  max-width:calc(100vw - 24px);
  max-height:72vh;max-height:72dvh;box-sizing:border-box;border-radius:14px;overflow:auto;overscroll-behavior:contain
 }
 body.zykt-unified-style .layui-layer-dialog:not(.layui-layer-msg):not(.layui-layer-page){width:min(304px,calc(100vw - 56px))!important;max-width:calc(100vw - 56px)!important;max-height:72vh;max-height:72dvh}
 body.zykt-unified-style .layui-layer-page.layui-layer-dialog{left:50%!important;transform:translateX(-50%)!important}
 body.zykt-unified-style .layui-layer-dialog:not(.layui-layer-msg) .layui-layer-title,
 body.zykt-unified-style .zykt-mobile-payment-frame .layui-layer-title{height:44px;line-height:44px;padding:0 52px 0 18px;font-size:16px}
 body.zykt-unified-style .layui-layer-dialog:not(.layui-layer-msg) .layui-layer-content{max-height:calc(72vh - 44px);max-height:calc(72dvh - 44px);overflow:auto}
 body.zykt-unified-style .layui-layer-dialog:not(.layui-layer-page):not(.layui-layer-msg) .layui-layer-content{padding:18px!important;font-size:14px!important;line-height:23px!important;max-height:calc(72dvh - 116px)}
 body.zykt-unified-style .layui-layer-dialog:not(.layui-layer-page):not(.layui-layer-msg) .layui-layer-content.layui-layer-padding{padding-left:52px!important}
 body.zykt-unified-style .layui-layer-dialog:not(.layui-layer-page):not(.layui-layer-msg) .layui-layer-btn{padding:0 18px 18px!important;gap:12px!important}
 body.zykt-unified-style .layui-layer-dialog:not(.layui-layer-page):not(.layui-layer-msg) .layui-layer-btn a{height:44px!important;padding:10px 12px!important}
 body.zykt-unified-style .layui-layer:not(.layui-layer-msg) .layui-layer-setwin{top:0;right:4px;height:44px}
 body.zykt-unified-style .layui-layer:not(.layui-layer-msg) .layui-layer-setwin .layui-layer-close1{display:flex;align-items:center;justify-content:center;width:44px;height:44px;margin:0;background:none;font-size:0}
 body.zykt-unified-style .layui-layer:not(.layui-layer-msg) .layui-layer-setwin .layui-layer-close1:before{content:'×';font:24px/1 Arial,sans-serif;color:#728079}
 body.zykt-unified-style .zykt-mobile-payment-frame{height:auto!important;left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important}
 body.zykt-unified-style .zykt-mobile-payment-frame :is(.layui-layer-content,iframe){width:100%!important;height:var(--zykt-mobile-frame-height,320px)!important;max-height:calc(72vh - 44px);max-height:calc(72dvh - 44px)}
 body.zykt-unified-style .wppay-custom-modal-box>.wppay-modal:not(.zykt-mobile-payment-frame){max-height:72vh;max-height:72dvh;overflow:auto;border-radius:14px}
 body.zykt-unified-style .wppay-modal .erphp-wppay-qrcode{padding:8px 16px 18px}
 body.zykt-unified-style .wppay-modal .erphp-wppay-qrcode .tab{padding:0;margin:0}
 body.zykt-unified-style .wppay-modal .erphp-wppay-qrcode .tab-list{height:auto;margin-top:12px}
 body.zykt-unified-style .wppay-modal .erphp-wppay-qrcode .tab-list .item{top:0;position:relative}
 body.zykt-unified-style .wppay-custom-modal-box>.wppay-modal .layui-layer-title{height:44px;line-height:44px;padding:0 52px 0 18px;font-size:16px}
 body.zykt-unified-style .wppay-custom-modal-box>.wppay-modal .layui-layer-setwin{top:0;right:4px}
 body.zykt-unified-style .wppay-custom-modal-box>.wppay-modal .layui-layer-close1{display:flex;align-items:center;justify-content:center;width:44px;height:44px;margin:0;background:none;font-size:0}
 body.zykt-unified-style .wppay-custom-modal-box>.wppay-modal .layui-layer-close1:before{content:'×';font:24px/1 Arial,sans-serif;color:#728079}
 body.zykt-unified-style .wppay-custom-modal-box>.wppay-modal .erphp-wppay-qrcode .tab-list .item .account{color:#526b5b;font-size:13px;line-height:1.6;margin-top:14px!important}
 body.zykt-unified-style .wppay-custom-modal-box>.wppay-modal .erphp-wppay-qrcode .tab-list .item .desc{color:#738177;font-size:12px;line-height:1.6}
 body.zykt-unified-style .wppay-custom-modal-box>.wppay-modal .erphp-wppay-qrcode .price{color:var(--theme-color,#277456)}
 body.zykt-unified-style .zykt-payment-perimeter{position:fixed;inset:12px;display:flex;overflow:auto;overscroll-behavior:contain;pointer-events:none}
 body.zykt-unified-style .zykt-payment-perimeter>.layui-layer{position:relative!important;left:auto!important;top:auto!important;transform:none!important;margin:auto!important;flex:0 0 auto;pointer-events:auto}
}
/* Download details follow their contents, rather than the native fixed iframe
 * height. Width remains under the original component's control. */
body.zykt-unified-style .zykt-content-fit-frame{height:auto!important;max-height:calc(100vh - 40px);max-height:calc(100dvh - 40px);left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important;overflow:hidden}
body.zykt-unified-style .zykt-content-fit-frame :is(.layui-layer-content,iframe){height:var(--zykt-mobile-frame-height,240px)!important;max-height:calc(100vh - 84px);max-height:calc(100dvh - 84px)}
body.zykt-download-frame #erphpdown-download{min-height:0;padding:20px 18px 24px;box-sizing:border-box}
@media(max-width:600px){
 body.zykt-unified-style .zykt-content-fit-frame{max-height:72vh;max-height:72dvh}
 body.zykt-unified-style .zykt-content-fit-frame :is(.layui-layer-content,iframe){max-height:calc(72vh - 44px);max-height:calc(72dvh - 44px)}
}
/* Parent viewport, rather than an iframe's narrow desktop width, selects this mode. */
body.zykt-popup-mobile{margin:0}
body.zykt-popup-mobile .erphpdown-custom-modal-box{position:relative;inset:auto;background:transparent}
body.zykt-popup-mobile .erphpdown-custom-modal-box .wppay-modal{padding:8px 16px 18px}
body.zykt-popup-mobile .erphpdown-custom-modal-box .erphp-wppay-qrcode .tab{margin:0;padding:0}
body.zykt-popup-mobile .erphpdown-custom-modal-box .erphp-wppay-qrcode .tab a.active{display:block;margin:0}
body.zykt-popup-mobile .erphpdown-custom-modal-box .erphp-wppay-qrcode .payment{margin-bottom:8px}
body.zykt-popup-mobile .erphpdown-custom-modal-box .wppay-modal .erphp-wppay-qrcode .tab .payment{margin:0 0 8px;line-height:1}
body.zykt-popup-mobile .erphpdown-custom-modal-box .wppay-modal .erphp-wppay-qrcode .payment img{display:block;margin:0 auto}
body.zykt-popup-mobile .erphpdown-custom-modal-box .erphp-wppay-qrcode .tab-list{margin-top:12px;height:auto}
body.zykt-popup-mobile .erphpdown-custom-modal-box .erphp-wppay-qrcode .account{margin-top:14px!important;font-size:13px;line-height:1.6}
body.zykt-popup-mobile .erphpdown-custom-modal-box .erphp-wppay-qrcode .desc{margin-top:8px;font-size:12px;line-height:1.6;color:#738177}

/* QR viewers have no native minimum width. Narrow their phone perimeter while
 * preserving QR dimensions and the minimum width of payment-choice panels. */
@media(max-width:600px){
 body.zykt-unified-style :is(.zykt-mobile-qr-frame,.zykt-mobile-qr-card){width:280px!important;max-width:calc(100vw - 40px)!important}
 body.zykt-unified-style .zykt-mobile-qr-card .erphp-wppay-qrcode{padding:6px 16px 14px}
 body.zykt-unified-style .zykt-mobile-qr-card .erphp-wppay-qrcode .payment{margin:0 0 8px;line-height:1}
 body.zykt-unified-style .zykt-mobile-qr-card .erphp-wppay-qrcode .payment img{display:block;margin:0 auto}
 body.zykt-unified-style .zykt-mobile-qr-card .erphp-wppay-qrcode .tab-list{margin-top:8px}
 body.zykt-unified-style .zykt-mobile-qr-card .erphp-wppay-qrcode .wppay-title{margin-bottom:8px;line-height:1.4}
 body.zykt-unified-style .zykt-mobile-qr-card .erphp-wppay-qrcode .tab-list .item .account{margin-top:10px!important;line-height:1.5}
 body.zykt-unified-style .zykt-mobile-qr-card .erphp-wppay-qrcode .tab-list .item .desc{margin-top:6px;line-height:1.5}
}
body.zykt-popup-mobile .erphpdown-custom-modal-box .wppay-modal{padding:6px 16px 14px}
body.zykt-popup-mobile .erphpdown-custom-modal-box .erphp-wppay-qrcode .tab a.active{line-height:1.2}
body.zykt-popup-mobile .erphpdown-custom-modal-box .erphp-wppay-qrcode .tab-list{margin-top:8px}
body.zykt-popup-mobile .erphpdown-custom-modal-box .erphp-wppay-qrcode .account{margin-top:10px!important;line-height:1.5}
body.zykt-popup-mobile .erphpdown-custom-modal-box .erphp-wppay-qrcode .desc{margin-top:6px;line-height:1.5}
