[id^="gr-"][id$="-modal-overlay"] {
    position: fixed;
    z-index: 2147483647 !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.55);
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

html.gr-checkout-modal-open,
body.gr-checkout-modal-open {
    overflow: hidden !important;
    overscroll-behavior: contain;
}

body.gr-checkout-modal-open #main-footer,
body.gr-checkout-modal-open .et-l--footer,
body.gr-checkout-modal-open footer {
    visibility: hidden !important;
    pointer-events: none !important;
}

[id^="gr-"][id$="-modal-box"] {
    background: white;
    padding: 28px 30px 26px;
    border-radius: 12px;
    max-width: 560px;
    width: 100%;
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    animation: grfade .2s ease-out;
    text-align: center;
    box-sizing: border-box;
    overflow-y: auto;
    overscroll-behavior: contain;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
}

.gr-promo-wrapper {
    margin-bottom: 15px;
}

.gr-checkout-columns {
    display: block;
}

.gr-checkout-column {
    min-width: 0;
}

.gr-checkout-actions {
    width: 100%;
    max-width: 560px;
    margin: 14px auto 0;
    text-align: center;
}

.gr-checkout-actions [id^="gr-"][id$="-modal-confirm"] {
    margin-top: 0;
}

.gr-checkout-legal {
    margin: 0px 0 6px;
    text-align: left;
}

.gr-checkout-summary {
    display: grid;
    gap: 9px;
    margin: 0 0 22px;
    padding: 14px;
    background: #f7f7f7;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-sizing: border-box;
}

.gr-checkout-payment-summary {
    gap: 0;
    margin: 14px 0 0;
    padding: 0;
    background: #fbfbfc;
    border-color: #dedfe3;
    overflow: hidden;
    text-align: left;
}

.gr-checkout-required-title {
    padding: 11px 13px;
    background: #f1f2f4;
    border-bottom: 1px solid #dedfe3;
    color: #111;
    font-size: 14px;
    font-weight: 700;
}

.gr-checkout-payment-summary .gr-checkout-summary-row {
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 14px;
    padding: 9px 13px;
    border-bottom: 1px solid #e8e8eb;
    font-size: 13px;
    line-height: 1.38;
}

.gr-checkout-payment-summary .gr-checkout-summary-row:last-child {
    border-bottom: 0;
}

.gr-checkout-payment-summary .gr-checkout-summary-row span {
    color: #555;
    font-weight: 600;
}

.gr-checkout-payment-summary .gr-checkout-summary-row strong {
    color: #222;
    font-weight: 400;
}

.gr-checkout-summary-row {
    display: grid;
    grid-template-columns: 155px minmax(0, 1fr);
    gap: 18px;
    color: #555;
    font-size: 14px;
    line-height: 1.4;
}

.gr-checkout-summary-row strong {
    color: #111;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.gr-checkout-customer-type {
    margin: 0 0 18px;
}

.gr-checkout-legal-label {
    margin-bottom: 8px;
    color: #222;
    font-size: 14px;
    font-weight: 600;
}

.gr-checkout-customer-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
}

.gr-checkout-customer-option {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    min-width: 0;
    min-height: 46px;
    margin: 0 !important;
    padding: 10px 14px;
    border: 1px solid #d8d8d8;
    border-radius: 8px;
    background: #fff;
    box-sizing: border-box;
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.2;
    text-align: left;
    white-space: nowrap;
}

.gr-checkout-customer-option input[type="radio"] {
    flex: 0 0 16px;
    width: 16px !important;
    height: 16px;
    margin: 0 !important;
}

.gr-checkout-customer-option span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gr-checkout-customer-option.is-selected {
    border-color: #111;
    background: #f1f1f1;
}

.gr-checkout-business-hint {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-left: 3px solid #111;
    background: #f7f7f7;
    color: #444;
    font-size: 14px;
    line-height: 1.35;
}

#gr-promo-code,
[id^="gr-"][id$="-promo-code"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    margin: 4px auto 0;
    display: block;
    box-sizing: border-box;
}

@keyframes grfade {
    from {
        opacity: 0;
        transform: scale(.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

[id^="gr-"][id$="-modal-box"] h3 {
    margin: 0 0 22px;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.3;
}

.gr-upgrade-check,
.gr-checkout-check {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
    margin: 12px 22px;
    font-size: 15px;
    text-align: left;
}

.gr-checkout-legal-check {
    justify-content: flex-start;
    gap: 10px;
    margin: 10px 0;
    color: #222;
    font-size: 14px;
    line-height: 1.42;
}

.gr-checkout-legal-check a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.gr-upgrade-check input[type="checkbox"],
.gr-checkout-check input[type="checkbox"] {
    margin-top: 10px;
    width: 15px;
}

.gr-checkout-legal-check input[type="checkbox"] {
    flex: 0 0 auto;
    width: 15px !important;
    height: 15px;
    margin: 2px 0 0 !important;
}

.gr-checkout-legal-check span {
    min-width: 0;
}

[id^="gr-"][id$="-modal-confirm"] {
    margin: 10px auto 0;
    width: 100%;
    padding: 12px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    cursor: pointer;
    display: block;
}

[id^="gr-"][id$="-modal-confirm"]:hover {
    color: #000;
    background: #eee;
}

[id^="gr-"][id$="-modal-cancel"] {
    margin: 10px auto 0;
    width: 100%;
    padding: 10px;
    background: #eee;
    border: none;
    border-radius: 30px;
    font-size: 15px;
    cursor: pointer;
    display: block;
}

[id^="gr-"][id$="-modal-cancel"]:hover {
    color: #666;

}

[id^="gr-"][id$="-modal-error"] {
    color: #c00;
    font-size: 15px;
    margin: 30px 20px;
    text-align: left;
    line-height: 1.4;
}

#gr-upgrade-trial-hint,
[id^="gr-"][id$="-trial-hint"] {
    display: none;
    color: #666;
    font-size: 0.9em;
    margin-bottom: 15px;
    padding: 10px;
    background: #f9f9f9;
    border-left: 3px solid #0073aa;
}

@media (max-width: 520px) {
    [id^="gr-"][id$="-modal-overlay"] {
        align-items: flex-start;
        padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom));
    }

    [id^="gr-"][id$="-modal-box"] {
        max-height: calc(100vh - 20px);
        max-height: calc(100dvh - 20px);
        margin: auto 0;
        padding: 18px 15px;
    }

    .gr-checkout-summary-row {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .gr-checkout-payment-summary .gr-checkout-summary-row {
        grid-template-columns: 1fr;
        gap: 3px;
        padding: 9px 12px;
    }

    [id^="gr-"][id$="-modal-box"] h3 {
        margin-bottom: 15px;
    }

    .gr-checkout-legal {
        margin-top: 14px;
    }

    .gr-checkout-summary {
        margin-bottom: 16px;
    }

    .gr-checkout-legal-check {
        margin: 8px 0;
        font-size: 13px;
        line-height: 1.35;
    }
}

@media (max-width: 420px) {
    .gr-checkout-customer-options {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 900px) {
    [id^="gr-"][id$="-modal-box"] {
        max-width: 1040px;
        padding: 28px 32px 30px;
    }

    .gr-checkout-columns {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 30px;
        align-items: start;
        text-align: left;
    }

    .gr-checkout-column-right {
        position: sticky;
        top: 0;
    }

    .gr-checkout-column-right .gr-checkout-payment-summary {
        margin-top: 0;
    }

    .gr-checkout-columns.is-result-mode {
        display: none;
    }
}