body .woocommerce-checkout #payment .wc_payment_methods .payment_method_xr_stripe_gateway label {
    display: block;
}

.woocommerce-checkout-payment label[for='payment_method_xr_stripe_gateway'] {
    display: block;
}

.payment_method_xr_stripe_gateway .payment-title-icon>img {
    max-height: 25px;
}

.payment_method_xr_stripe_gateway .wc-xr-stripe-payment-method__container {
    width: 100%;
    text-align: center;
}

.xr-stripe-cc-form-wrap {
    margin: 0;
    padding: 0;
    border: 0;
}

.xr-stripe-cc-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 4px;
}

.xr-stripe-cc-row {
    display: flex;
    gap: 12px;
}

.xr-stripe-cc-field {
    position: relative;
    width: 100%;
}

.xr-stripe-cc-field--half {
    flex: 1 1 0;
    min-width: 0;
}

.xr-stripe-cc-input {
    box-sizing: border-box;
    width: 100%;
    height: 44px;
    padding: 10px 40px 10px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    background: #fff;
    color: #30313d;
    font-size: 16px;
    line-height: 1.4;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.xr-stripe-cc-input::placeholder {
    color: #8898aa;
}

.xr-stripe-cc-input:focus {
    border-color: #635bff;
    box-shadow: 0 0 0 1px #635bff;
}

.xr-stripe-cc-input.xr-stripe-cc-input--error {
    border-color: #df1b41;
    box-shadow: 0 0 0 1px #df1b41;
}

.xr-stripe-cc-field__icon {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    pointer-events: none;
    color: #8898aa;
}

.xr-stripe-cc-field__icon--lock {
    width: 14px;
    height: 16px;
    background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 1 1 8 0v3'/%3E%3C/svg%3E") center / contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 1 1 8 0v3'/%3E%3C/svg%3E") center / contain no-repeat;
}

.xr-stripe-cc-field__icon--help {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: 1px solid #c4c4c4;
    border-radius: 50%;
    font-size: 12px;
    line-height: 1;
    font-weight: 600;
}

@media (max-width: 480px) {
    .xr-stripe-cc-row {
        flex-direction: column;
        gap: 12px;
    }
}

.payment_method_xr_stripe_gateway .wc-xr-stripe-payment-method__container .wc-xr-stripe-popup__container p {
    padding-top: 10px;
    padding-bottom: 3px;
    font-size: 14px;
}

.payment_method_xr_stripe_gateway .wc-xr-stripe-payment-method__container .wc-xr-stripe-popup__container img {
    max-height: 25px;
    max-width: 150px;
    width: 110px;
}

.woocommerce-checkout-payment label[for='payment_method_xr_stripe_gateway'] {
    font-size: 15px !important;
    font-size: medium;
    font-weight: 600 !important;
    color: var(--wd-title-color);
    text-transform: var(--wd-title-transform);
    font-style: var(--wd-title-font-style);
    font-family: var(--wd-title-font);
}

.woocommerce-checkout-payment label[for='payment_method_xr_stripe_gateway'] img {
    float: right;
    height: 23px;
    width: 85px;
}

@media only screen and (min-width: 769px) {
    .woocommerce-checkout-payment label[for='payment_method_xr_stripe_gateway'] img {
        height: 40px;
        width: 91px;
    }
}

.wc-xr-stripe-popup__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
}

.payment_method_xr_stripe_gateway {
    padding-top: 20px !important;
}

.payment_method_xr_stripe_gateway img {
    float: right !important;
    padding: 0;
    border: 0;
}

.woocommerce-checkout-payment .place-order .xr_stripe_bg {
    background-color: #635bff !important;
    color: #fff !important;
    border-color: #635bff !important;
    min-height: 52px;
}

.woocommerce-checkout-payment .place-order .xr_stripe_bg::before {
    content: '' !important;
    display: none !important;
}

.woocommerce-checkout-payment .place-order #place_order.xr_stripe_bg.xr_stripe_loading {
    cursor: wait !important;
    pointer-events: none;
    opacity: 0.85;
}

.woocommerce-checkout-payment .place-order .button {
    width: 100% !important;
}

#xr-stripe-payment-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
}

#xr-stripe-payment-modal .xr-stripe-payment-modal__frame {
    position: relative;
    display: block;
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

#xr-stripe-payment-modal iframe {
    display: block;
    width: 450px !important;
    height: 680px !important;
    max-width: 100%;
    max-height: calc(100vh - 32px);
    border: none !important;
    border-radius: 8px;
    background: #fff !important;
}

#xr-stripe-payment-modal .xr-stripe-payment-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}

#xr-stripe-payment-modal .xr-stripe-payment-modal__close:hover {
    background: rgba(0, 0, 0, 0.75);
    transform: scale(1.05);
}

#xr-stripe-payment-modal .xr-stripe-payment-modal__close::before,
#xr-stripe-payment-modal .xr-stripe-payment-modal__close::after {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 2px;
    height: 14px;
    margin: -7px 0 0 -1px;
    content: '';
    background-color: #fff;
}

#xr-stripe-payment-modal .xr-stripe-payment-modal__close::before {
    transform: rotate(45deg);
}

#xr-stripe-payment-modal .xr-stripe-payment-modal__close::after {
    transform: rotate(-45deg);
}

@media (max-width: 768px) {
    #xr-stripe-payment-modal {
        padding: 8px;
    }

    #xr-stripe-payment-modal iframe {
        /* width: 100% !important; */
        max-height: none;
    }

    #xr-stripe-payment-modal .xr-stripe-payment-modal__close {
        top: 8px;
        right: 8px;
    }
}
