.wc-proceed-to-checkout{
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-end;
    justify-content: start;
    gap: 40px;
}
body.page-id-109 .woocommerce div.cart_totals_custom .wc-proceed-to-checkout a.checkout-button {
    margin: 0 !important;
    height: 50px;
}
.wrapper .woocommerce .cart-collaterals::before,
.wrapper .woocommerce .cart-collaterals::after,
.woocommerce-cart .cart-collaterals .wc-proceed-to-checkout::before,
.woocommerce-cart .cart-collaterals .wc-proceed-to-checkout::after {
    content: none;
}
.fh-wallet-buttons-container {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    line-height: 0;
    gap: 20px;
}

.block.text.text-center.hit .woocommerce p.fh-wallet-note:first-child {
    font-size: 14px;
    margin: 0;
}

.fh-google-pay-button {
    height: 50px;
    width: 240px;
}
.fh-google-pay-button button {
    transition: all 0.3s ease;
}

.fh-apple-pay-native-button {
    --apple-pay-button-width: 240px;
    --apple-pay-button-height: 50px;
    --apple-pay-button-border-radius: 0px;
    --apple-pay-button-padding: 0;
    --apple-pay-button-box-sizing: border-box;
    transition: opacity 0.3s ease;
}

.fh-apple-pay-native-button:hover {
    opacity: 0.78;
}

/* Spinner while Google Pay / Apple Pay buttons are still loading */
.fh-wallet-buttons-container:not(:has(button, apple-pay-button)) {
    min-width: 240px;
    height: 50px;
    justify-content: center;
    align-items: center;
}

.fh-wallet-buttons-container:not(:has(button, apple-pay-button))::before {
    content: "";
    width: 18px;
    height: 18px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-top-color: #000;
    border-radius: 50%;
    animation: fh-wallet-spin 0.8s linear infinite;
}

.cart_totals_custom, .woocommerce-cart-form {
    position: relative;
}

.cart_totals_custom .fh-wallet-totals-spinner,
.woocommerce-cart-form .fh-wallet-cart-spinner {
    display: none;
}

.cart_totals_custom.fh-wallet-totals-loading,
.woocommerce-cart-form.fh-wallet-cart-loading {
    pointer-events: none;
}

.cart_totals_custom.fh-wallet-totals-loading table,
.woocommerce-cart-form.fh-wallet-cart-loading table.shop_table {
    opacity: 0.45;
}

.cart_totals_custom.fh-wallet-totals-loading .fh-wallet-totals-spinner,
.woocommerce-cart-form.fh-wallet-cart-loading .fh-wallet-cart-spinner {
    display: flex;
    position: absolute;
    inset: 0;
    z-index: 999;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.55);
}

.fh-wallet-totals-spinner-circle {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(0, 0, 0, 0.2);
    border-top-color: #000;
    border-radius: 50%;
    animation: fh-wallet-spin 0.8s linear infinite;
}

@keyframes fh-wallet-spin {
    to {
        transform: rotate(360deg);
    }
}
@media (max-width: 768px){
    .wc-proceed-to-checkout{
        flex-direction: column-reverse;
        align-items: start;
        gap: 20px;
    }

    body.page-id-109 .woocommerce div.cart_totals_custom .wc-proceed-to-checkout a.checkout-button {
        width: 100% !important;
    }
    .fh-worldline-express-wallets{
        width: 100%;
    }
    .fh-apple-pay-native-button {
        --apple-pay-button-width: 100%;
    }
    .fh-wallet-buttons-container {
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 10px;
        width: 100%;
        max-width: 100%;
    }

    .fh-wallet-button {
        flex: 1 1 0;
        min-width: 0;
        max-width: none;
        width: auto;
    }
}

/*TEMP, needs to be moved to other css files*/
#fh-wallet-country-selector {
    border: 0;
    border-bottom: 1px solid #111;
    border-radius: 0;
    background: transparent;
    font-size: 20px;
    box-shadow: none;
    outline: none;
    cursor: pointer;
    padding: 8px 0;
    height: 50px;
}

#fh-wallet-country-selector:focus {
    border-bottom-color: #000;
    box-shadow: none;
    outline: none;
}

.cart_totals_custom tr.fh-wallet-country-row label {
    font-size: 22px;
    font-weight: inherit;
}

body.page-id-109 .woocommerce div.cart_totals_custom .wc-proceed-to-checkout a.checkout-button:hover{
    opacity: 0.78;
}

@media (max-width: 600px) {
    .cart_totals_custom table,
    .cart_totals_custom table tbody {
        display: block;
        width: 100%;
    }

    .cart_totals_custom table tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        column-gap: 16px;
        width: 100%;
        align-items: start;
    }

    .cart_totals_custom table th,
    .cart_totals_custom table td {
        display: block;
        width: auto !important;
        min-width: 0;
        box-sizing: border-box;
    }

    .cart_totals_custom .fh-wallet-country-row {
        margin-bottom: 20px;
    }

    .woocommerce div.cart_totals_custom > table .fh-wallet-country-row th {
        padding: 0 !important;
    }
    .cart_totals_custom .fh-wallet-country-row th,
    .cart_totals_custom .fh-wallet-country-row td {
        grid-column: 1 / -1;
        width: 100% !important;
    }

    .cart_totals_custom .fh-wallet-country-row label {
        display: block;
        margin-bottom: 0px;
    }

    #fh-wallet-country-selector {
        display: block;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
    }
}
/* END TEMP */