/**
 * White-row treatment for the PayPal method in WooCommerce checkout.
 * Supports both Checkout Blocks and classic/FunnelKit checkout markup.
 * Loaded only when the merchant selects the white-row design.
 */

.wc-block-components-radio-control-accordion-option:has(.paypala-white-row-label) {
    position: relative;
    overflow: hidden;
    background: #ffffff !important;
    border: 1px solid #e2e5ea !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    color: #0f1521 !important;
}

.wc-block-components-radio-control-accordion-option:has(.paypala-white-row-label)::before {
    content: "";
    position: absolute;
    z-index: 2;
    inset: 0 auto 0 0;
    width: 3px;
    background: transparent;
    opacity: 0;
    pointer-events: none;
}

.wc-block-components-radio-control-accordion-option--checked-option-highlighted:has(.paypala-white-row-label)::before {
    background: #009cde;
    opacity: 1;
}

.wc-block-components-radio-control-accordion-option:has(.paypala-white-row-label)::after {
    display: none !important;
}

.wc-block-components-radio-control-accordion-option:has(.paypala-white-row-label)
    .wc-block-components-radio-control__option {
    background: #ffffff !important;
    border: 0 !important;
    color: #0f1521 !important;
}

.wc-block-components-radio-control-accordion-option:has(.paypala-white-row-label)
    .wc-block-components-radio-control__option::after {
    display: none !important;
}

.wc-block-components-radio-control-accordion-option:has(.paypala-white-row-label)
    .wc-block-components-radio-control__input {
    background: #ffffff !important;
    border-color: #8892a0 !important;
}

.wc-block-components-radio-control-accordion-option:has(.paypala-white-row-label)
    .wc-block-components-radio-control__input:checked {
    border-color: #003087 !important;
}

.wc-block-components-radio-control-accordion-option:has(.paypala-white-row-label)
    .wc-block-components-radio-control__input:checked::before {
    background: #003087 !important;
}

.paypala-white-row-label {
    display: flex !important;
    width: 100%;
    min-width: 0;
    align-items: center !important;
    gap: 10px !important;
    color: #0f1521 !important;
}

.paypala-white-row-logo {
    display: block !important;
    width: auto !important;
    height: 24px !important;
    max-width: 124px !important;
    margin: 0 !important;
}

.paypala-white-row-name {
    color: #003087;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
}

.paypala-white-row-meta {
    margin-left: auto;
    color: #8892a0;
    font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
}

.wc-block-components-radio-control-accordion-content:has(.paypala-white-row-content) {
    margin: 0 !important;
    padding: 0 16px 15px 52px !important;
    background: #ffffff !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #5a6473 !important;
}

.paypala-white-row-content {
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    color: #5a6473 !important;
    font-size: 12.5px;
    line-height: 1.5;
}

/*
 * Classic WooCommerce and FunnelKit checkout.
 * FunnelKit places the gateway label and supporting copy on separate dark
 * surfaces, so every layer is explicitly kept on the same white card.
 */
.woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method.payment_method_paypala {
    overflow: hidden !important;
    background: #ffffff !important;
    border: 1px solid #e2e5ea !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    color: #0f1521 !important;
}

.woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method.payment_method_paypala > label {
    display: flex !important;
    width: 100% !important;
    box-sizing: border-box !important;
    align-items: center !important;
    background: #ffffff !important;
    background-image: none !important;
    color: #0f1521 !important;
}

.woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method.payment_method_paypala > .payment_box.payment_method_paypala,
.woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method.payment_method_paypala > .payment_box.payment_method_paypala > p {
    background: #ffffff !important;
    background-image: none !important;
    box-shadow: none !important;
    color: #5a6473 !important;
}

.woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method.payment_method_paypala > .payment_box.payment_method_paypala::before {
    display: none !important;
}

/*
 * FunnelKit adds two ID-scoped transparent-background rules after gateway
 * styles. Match that checkout shell explicitly so the complete gateway—not
 * only its description—uses the selected white treatment.
 */
body.woocommerce-checkout #wfacp-e-form .wfacp_main_form.woocommerce .woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method.payment_method_paypala {
    padding: 0 !important;
    background: #ffffff !important;
    border: 0 !important;
    color: #0f1521 !important;
}

body.woocommerce-checkout #wfacp-e-form .wfacp_main_form.woocommerce .woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method.payment_method_paypala > label {
    display: flex !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 16px 20px !important;
    box-sizing: border-box !important;
    align-items: center !important;
    background: #ffffff !important;
    background-image: none !important;
    color: #0f1521 !important;
}

body.woocommerce-checkout #wfacp-e-form .wfacp_main_form.woocommerce .woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method.payment_method_paypala > .payment_box.payment_method_paypala {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 20px 16px !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: #5a6473 !important;
}

body.woocommerce-checkout #wfacp-e-form .wfacp_main_form.woocommerce .woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method.payment_method_paypala > .payment_box.payment_method_paypala > p {
    margin: 0 !important;
    background: #ffffff !important;
    color: #5a6473 !important;
}

.wc-block-components-radio-control-accordion-option:has(.paypala-white-row-label):focus-within {
    outline: 2px solid #66c7ed;
    outline-offset: 2px;
}

@media (max-width: 480px) {
    .paypala-white-row-logo {
        height: 22px !important;
        max-width: 112px !important;
    }

    .wc-block-components-radio-control-accordion-content:has(.paypala-white-row-content) {
        padding-right: 14px !important;
        padding-left: 48px !important;
    }
}
