.suapp-payment-turnstile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 16px 0;
    width: 100%;
    max-width: 100%;
    color-scheme: light;
    box-sizing: border-box;
    scroll-margin-block: 90px;
    outline: none;
}
.suapp-payment-turnstile[hidden] { display: none !important; }

.suapp-payment-turnstile-widget {
    width: 100%;
    max-width: 100%;
    min-height: 65px;
    display: flex;
    justify-content: center;
}

.suapp-payment-turnstile-feedback {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px 12px;
    width: 100%;
    min-width: 0;
}

.suapp-payment-turnstile-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    color: #596579;
    font-size: 13px;
    line-height: 20px;
    text-align: center;
    overflow-wrap: anywhere;
}

.suapp-payment-turnstile-status::before {
    content: '';
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
    background: currentColor;
    -webkit-mask: var(--security-icon) center / contain no-repeat;
    mask: var(--security-icon) center / contain no-repeat;
    --security-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 4 6v6c0 5 8 9 8 9s8-4 8-9V6z'/%3E%3C/svg%3E");
}

.suapp-payment-turnstile-status[data-state="interactive"]::before {
    --security-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='16' height='16' rx='3'/%3E%3C/svg%3E");
}

.suapp-payment-turnstile-status[data-state="error"] {
    color: #c62828;
}
.suapp-payment-turnstile-status[data-state="error"]::before {
    --security-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v6m0 4h.01'/%3E%3C/svg%3E");
}

.suapp-payment-turnstile-status[data-state="success"] {
    color: #187144;
}
.suapp-payment-turnstile-status[data-state="success"]::before {
    --security-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m8 12 3 3 5-6'/%3E%3C/svg%3E");
}

.suapp-payment-turnstile-status[data-state="expired"],
.suapp-payment-turnstile-status[data-state="timeout"] {
    color: #946200;
}

.suapp-payment-turnstile-status[data-state="expired"]::before,
.suapp-payment-turnstile-status[data-state="timeout"]::before {
    --security-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
}

.suapp-payment-turnstile-status[data-state="loading"]::before,
.suapp-payment-turnstile-status[data-state="submitting"]::before {
    box-sizing: border-box;
    border: 2px solid #d7dce4;
    border-top-color: #596579;
    border-radius: 50%;
    background: none;
    -webkit-mask: none;
    mask: none;
    animation: suapp-payment-spin 0.8s linear infinite;
}

#Submit.suapp-payment-locked {
    cursor: not-allowed !important;
    background: #eef0f3 !important;
    color: #596579 !important;
    opacity: 1 !important;
}
#Submit.suapp-payment-locked::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 6px;
    vertical-align: -2px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='10' width='16' height='11' rx='2'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='10' width='16' height='11' rx='2'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center / contain no-repeat;
}

.suapp-payment-turnstile .suapp-payment-turnstile-retry {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-shrink: 0;
    border: 1px solid #d7dce4;
    border-radius: 8px;
    padding: 8px 12px;
    min-height: 44px;
    font-size: 13px;
    font-weight: 500;
    line-height: 20px;
    color: #253247;
    background: #fff;
    cursor: pointer;
    touch-action: manipulation;
}
.suapp-payment-turnstile .suapp-payment-turnstile-retry::before {
    content: '';
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 7v5h-5m5-1a8 8 0 1 0-1 6'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 7v5h-5m5-1a8 8 0 1 0-1 6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.suapp-payment-turnstile .suapp-payment-turnstile-retry:hover {
    border-color: #8893a5;
    background: #f1f4f8;
}
.suapp-payment-turnstile-retry:focus-visible,
#Submit:focus-visible {
    outline: 2px solid #596579;
    outline-offset: 3px;
}
.suapp-payment-turnstile-retry[hidden] { display: none !important; }

.suapp-payment-security-sheet {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgb(17 24 39 / 35%);
    overscroll-behavior: contain;
}
.suapp-payment-security-sheet[hidden] { display: none !important; }

.suapp-payment-security-panel {
    width: 100%;
    max-width: 440px;
    max-height: 100vh;
    max-height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    box-sizing: border-box;
    border-radius: 18px 18px 0 0;
    padding: 12px 16px calc(20px + env(safe-area-inset-bottom));
    color: #253247;
    background: #fff;
    box-shadow: 0 -8px 32px rgb(17 24 39 / 12%);
    text-align: start;
}
.suapp-payment-security-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 16px;
    line-height: 24px;
}
.suapp-payment-security-close {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    margin-inline-end: -8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #596579;
    font: 28px/1 Arial, sans-serif;
    cursor: pointer;
    touch-action: manipulation;
}
.suapp-payment-security-close:focus-visible {
    outline: 2px solid #596579;
    outline-offset: -4px;
}
.suapp-payment-security-panel .suapp-payment-turnstile {
    margin: 0;
    gap: 12px;
}
.suapp-payment-security-actions {
    margin-top: 16px;
}
.suapp-payment-security-actions #Submit {
    position: static;
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    min-height: 48px;
    margin: 0;
    padding: 12px 16px;
    box-sizing: border-box;
    border: 0;
    border-radius: 999px;
    background: #ef4238;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    text-align: center;
    text-decoration: none;
    white-space: normal;
    overflow-wrap: anywhere;
    touch-action: manipulation;
}

body .cover-dialog.suapp-payment-security-dialog {
    position: fixed;
    inset: 0;
    overflow-y: auto;
    box-sizing: border-box;
}

body .cover-dialog.suapp-payment-security-dialog .priceDialog,
body.suapp-topup-touch .cover-dialog.suapp-payment-security-dialog .priceDialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    width: min(420px, calc(100vw - 32px));
    height: auto;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    box-sizing: border-box;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

body .cover-dialog.suapp-payment-security-dialog .priceDialog-item {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 12px;
    margin-top: 20px;
    min-width: 0;
    line-height: 1.5;
}

body .cover-dialog.suapp-payment-security-dialog .priceDialog-item-title {
    width: 100%;
    margin-bottom: 0;
    font-size: 16px;
}

body .cover-dialog.suapp-payment-security-dialog .priceDialog-item-left {
    flex: 1 1 170px;
    overflow-wrap: anywhere;
}

body .cover-dialog.suapp-payment-security-dialog .priceDialog-item-right {
    margin-left: auto;
}

body .cover-dialog.suapp-payment-security-dialog .pay-now {
    margin-top: 16px;
}

body[data-topup-page] .cover-dialog.suapp-payment-security-dialog .pay-now {
    height: auto;
    background: transparent;
    line-height: normal;
}

body .cover-dialog.suapp-payment-security-dialog .bug_footer {
    flex-wrap: wrap;
    gap: 8px 16px;
}

body .cover-dialog.suapp-payment-security-dialog .chaneg-paytype-box {
    z-index: 2;
}

@keyframes suapp-payment-spin { to { transform: rotate(360deg); } }

@media (max-width: 480px) {
    body .cover-dialog.suapp-payment-security-dialog .priceDialog,
    body.suapp-topup-touch .cover-dialog.suapp-payment-security-dialog .priceDialog {
        width: calc(100vw - 24px);
        padding: 20px 16px;
        border-radius: 14px;
    }
    .suapp-payment-turnstile {
        margin: 16px 0;
    }
    .suapp-payment-turnstile-feedback { gap: 4px 8px; }
    .suapp-payment-turnstile-status { font-size: 12px; }
    .suapp-payment-turnstile .suapp-payment-turnstile-retry { padding: 8px 10px; }
}

@media (prefers-reduced-motion: reduce) {
    .suapp-payment-turnstile-status::before { animation: none !important; }
}
