/* Only the native order-password modal receives this layout. */
body.pages-order-order .modal1 .u-mode-center-box:has(.sgc-payment-model-v3) {
    max-height: calc(100vh - 32px) !important;
    max-height: calc(100dvh - 32px) !important;
}

body.pages-order-order .modal1 .u-drawer__scroll-view:has(.sgc-payment-model-v3) {
    max-height: calc(100vh - 32px) !important;
    max-height: calc(100dvh - 32px) !important;
}

body.pages-order-order .modal1 .u-model.sgc-payment-model-v3 {
    background: #fff !important;
    border-radius: 18px !important;
}

body.pages-order-order .order_container .modal1 .sgc-payment-model-v3 .u-model__title {
    height: auto !important;
    min-height: 0 !important;
    padding: 22px 16px 0 !important;
    font-size: 20px !important;
    line-height: 28px !important;
    font-weight: 600 !important;
    color: #203247 !important;
    box-sizing: border-box !important;
}

body.pages-order-order .order_container .modal1 .sgc-payment-model-v3 .slot-content {
    margin: 18px 0 16px !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
}

body.pages-order-order .order_container .modal1 .sgc-payment-model-v3 .jp-coded {
    margin: 0 auto !important;
}

body.pages-order-order .order_container .modal1 .sgc-payment-model-v3 .u-model__footer {
    height: 56px !important;
    background: #fff !important;
}

body.pages-order-order .order_container .modal1 .sgc-payment-model-v3 .u-model__footer__button {
    height: 56px !important;
    line-height: 56px !important;
    font-size: 17px !important;
}

body.pages-order-order .sgc-payment-keypad-v3 {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 16px 20px 20px !important;
    box-sizing: border-box !important;
    border-top: 1px solid #edf1f6 !important;
    background: #f6f8fc !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}

body.pages-order-order .sgc-payment-key-v3 {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 0 !important;
    height: 50px !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    border: 1px solid #e1e7f0 !important;
    border-radius: 9px !important;
    background: #fff !important;
    color: #203247 !important;
    font-family: inherit !important;
    font-size: 23px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    box-shadow: 0 2px 3px rgba(34, 52, 76, 0.04) !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
}

body.pages-order-order .sgc-payment-key-v3.is-action {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #60718a !important;
    background: #edf1f7 !important;
    border-color: #edf1f7 !important;
    box-shadow: none !important;
}

body.pages-order-order .sgc-payment-key-v3:hover {
    border-color: #a8c8f5 !important;
    background: #f0f6ff !important;
}

body.pages-order-order .sgc-payment-key-v3:active {
    background: #e4efff !important;
    transform: translateY(1px) !important;
}

body.pages-order-order .sgc-payment-key-v3:focus-visible {
    outline: 2px solid #438bf1 !important;
    outline-offset: 2px !important;
}

body.pages-order-order .sgc-payment-key-v3:disabled {
    opacity: .45 !important;
    cursor: default !important;
}

@media (max-height: 600px) {
    body.pages-order-order .sgc-payment-key-v3 {
        height: 42px !important;
    }

    body.pages-order-order .sgc-payment-keypad-v3 {
        padding-top: 12px !important;
        padding-bottom: 12px !important;
        gap: 6px !important;
    }
}
