/**
 * Google Pay Button Styles
 */

#funnelkit-square-google-pay-button-container {
    text-align: center;
    clear: both;
}

.cart-collaterals #funnelkit-square-google-pay-button-container {
    margin-bottom: 8px;
}

#funnelkit-square-google-pay-button-container button {
    min-width: auto;
    min-height: 42px;
    border-radius: 4px;
    cursor: pointer;
    transition: box-shadow 0.3s ease;
}

/* iframe-based buttons have no visual padding needed; CSS-based .gpay-button uses Google Pay's padding */
#funnelkit-square-google-pay-button-container button:not(.gpay-button) {
    padding: 0;
}

/* Express section has a fixed height: 42px container — Google Pay's padding would shrink the content box
   and make the background-image logo tiny. Force padding: 0 so the logo fills the full height. */
#funnelkit-square-google-pay-button-container.fkwcsq_express_btn button.gpay-button {
    padding: 0;
}

div#funnelkit-square-google-pay-button-container {
    position: relative;
}


div#funnelkit-square-google-pay-button-container .fkwcsq_hidden_wrap {
    position: absolute;
    background: #69363600;
    margin: 0;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    z-index: 100000000;
    cursor: pointer;
}

#funnelkit-square-google-pay-button-container button:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.funnelkit-smart-button-pay-separator {
    text-align: center;
    margin: 20px 0;
    font-size: 13px;
    color: #888;
}


#funnelkit-square-google-pay-button-container button:focus {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12), 0 0 0 2px #1a73e8;
}

#funnelkit-square-google-pay-button-container button:active {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Google Pay Button Theme Overrides */
/* Black Theme - Default */
.fkwcs_google_button_theme_black .gpay-card-info-container-fill button {
    background-color: #000 !important;
}

/* White Theme */
.fkwcs_google_button_theme_white .gpay-card-info-container-fill button {
    background-color: #fff !important;
}

/* Regular Gateway Google Pay Button Theme Overrides */
.funnelkit-regular-gateway-gpay-square-wrapper.fkwcs_google_button_theme_black .gpay-card-info-container-fill button {
    background-color: #000 !important;
}

.funnelkit-regular-gateway-gpay-square-wrapper.fkwcs_google_button_theme_white .gpay-card-info-container-fill button {
    background-color: #fff !important;
}

/* Button color variations - Legacy support */
#funnelkit-square-google-pay-button-container button[data-color="white"] {
    background-color: #fff;
    border: 1px solid #000;
}

#funnelkit-square-google-pay-button-container button[data-color="white"]:hover {
    background-color: #f5f5f5;
}

/* Error message styles */
.woocommerce-error {
    margin: 1em 0;
    padding: 1em;
    border-left: 4px solid #dc3232;
    background-color: #f8d7da;
    color: #721c24;
    border-radius: 4px;
}

form.variations_form.cart .fkwcsq_gpay_product {
    display: none;
}


.fkwcsq_apply_pay_parent {
    position: relative;
    clear: both;
    margin-bottom: 3px;
}

.fkwcsq_apple_pay_error .fkwcsq_apple_pay_separator {
    display: none;
}

.fkwcsq_apply_pay_parent .fkwcsq_hidden_wrap {
    width: 100%;
    height: 100%;
    cursor: pointer;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1000000;
    right: 0;
    bottom: 0;

}


.fkwcsq_express_container fieldset {
    border: 1px solid #e6e6e6;
    margin: 0;
    border-radius: 5px;
    padding: 15px 25px;
    font-size: 14px;
    color: #333;
    position: relative;
    min-height: 99px;
    width: 100%;
    text-align: center
}

.fkwcsq_express_container fieldset legend {
    padding: 0 1em;
    margin: 0 auto;
    display: block;
    background: 0 0;
    font-weight: 400;
    text-transform: inherit;
    width: auto;
    border: none;
}

.fkwcsq-smart-button-separator {
    color: #737373;
    line-height: 16px;
    background: 0 0;
    position: relative;
    z-index: 9;
    margin: 25px 0;
    display: inline-block;
    width: 100%;
    text-align: center;
    font-size: 14px;
}

.fkwcsq-smart-button-separator:before {
    height: 1px;
    background: #e6e6e6;
    top: 8px;
    z-index: -99;
    max-width: 45%;
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
}

div.fkwcsq-smart-button-separator:after {
    content: '';
    position: absolute;
    right: 0;
    width: 100%;
    height: 1px;
    background: #e6e6e6;
    top: 8px;
    z-index: -99;
    max-width: 45%;
}

#fkwcsq-smart-button-wrapper {
    display: flex;
    gap: 16px;
}

.fkwcsq_express_btn {
    width: 100%; /* or max-width: 400px */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px; /* keep buttons consistent */
    margin-bottom: 12px;
    flex: 1;
    height: 42px;
}

body .fkwcsq_express_container {
    display: none;
}

body.fkwcsq_express_container_show .fkwcsq_express_container {
    display: block;
}

.fkwcsq_express_btn .gpay-button {
    background-size: auto 60%;
}

/* AeroCheckout smart button alignment */
.wfacp_button_container #funnelkit-square-google-pay-button-container {
    margin-bottom: 0;
    margin-top: 4px;
}

/* Match Google Pay button height and font size with other express buttons */
#funnelkit-square-google-pay-button-container .gpay-button,
#funnelkit-square-google-pay-button-container button {
    min-height: 42px;
    font-size: 14px;
}

.fkwcsq_express_container .fkwcsq_express_btn {
    display: none;
}

.fkwcsq_apple_pay_visible .fkwcsq_apply_pay_parent, .fkwcsq_gpay_pay_visible .fkwcsq_gpay_checkout, .fkwcsq_gpay_pay_visible .fkwcsq_gpay_cart {
    display: flex !important;
}
.funnelkit-apple-pay-wrapper , .fkwcsq_apple_button{
    cursor: pointer;
}

body.fkwcsq_apple_pay_error .funnelkit-apple-pay-wrapper, body.fkwcsq_apple_pay_error .payment_method_fkwcsq_apple_pay {
    display: none;
}

/* Responsive styles */
@media screen and (max-width: 768px) {
    #funnelkit-square-google-pay-button-container button {
        width: 100%;
        max-width: 300px;
    }
}

@media screen and (max-width: 480px) {
    #funnelkit-square-google-pay-button-container button {
        max-width: 100%;
    }
}

/* Hide payment methods by default */
.wc_payment_method.payment_method_fkwcsq_apple_pay,
.wc_payment_method.payment_method_fkwcsq_google_pay {
    display: none !important;
}

/* Show Apple Pay in payment list when visible, unless hidden via setting */
body.fkwcsq_apple_pay_visible:not(.fkwcsq_apple_pay_hide_in_list) .wc_payment_method.payment_method_fkwcsq_apple_pay {
    display: list-item !important;
}

/* Show Google Pay when visible class is added */
body.fkwcsq_gpay_pay_visible .wc_payment_method.payment_method_fkwcsq_google_pay {
    display: list-item !important;
}

/* Keep existing error state hiding */
body.fkwcsq_apple_pay_error .wc_payment_method.payment_method_fkwcsq_apple_pay {
    display: none !important;
}

body.fkwcsq_gpay_pay_error .wc_payment_method.payment_method_fkwcsq_google_pay {
    display: none !important;
}
.funnelkit-regular-gateway-gpay-square-wrapper {
    display: none ;
}

.funnelkit-regular-gateway-gpay-square-wrapper button,
.funnelkit-regular-gateway-gpay-square-wrapper .gpay-button {
    min-height: 42px;
    width: 100%;
    border-radius: 4px;
    cursor: pointer;
    transition: box-shadow 0.3s ease;
}

/* iframe-based buttons need padding: 0; CSS-based .gpay-button uses Google Pay's own padding */
.funnelkit-regular-gateway-gpay-square-wrapper button:not(.gpay-button) {
    padding: 0;
}

.funnelkit-regular-gateway-gpay-square-wrapper button:hover,
.funnelkit-regular-gateway-gpay-square-wrapper .gpay-button:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.funnelkit-regular-gateway-gpay-square-wrapper button:focus,
.funnelkit-regular-gateway-gpay-square-wrapper .gpay-button:focus {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12), 0 0 0 2px #1a73e8;
}

.funnelkit-regular-gateway-gpay-square-wrapper button:active,
.funnelkit-regular-gateway-gpay-square-wrapper .gpay-button:active {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
