.wp-block-woocommerce-checkout {
    color: var(--wp--preset--color--contrast);
    padding: 0;
    
    .checkout-order-summary-block-fill {
        border: 0;
    }

    .wc-block-components-address-form,
    .wc-block-checkout__shipping-fields {
        .wc-block-components-text-input:first-child,
        .wc-block-components-address-form__country .wc-blocks-components-select {
            margin-top: 0;
        }
    }

    .wc-block-checkout__billing-fields .wc-block-components-address-form, 
    .wc-block-checkout__shipping-fields .wc-block-components-address-form {
        gap: 0 24px;
    }

     .wc-block-components-form.wc-block-checkout__form {
        font-size: 15px;
        color: var(--wp--preset--color--contrast);
        line-height: 26px;

        .wc-block-components-text-input label,
        .wc-blocks-components-select .wc-blocks-components-select__label {
            left: 20px;
            font-size: 17px;
            font-weight: 400;
            line-height: 32px;
            color: var(--wp--preset--color--contrast);
            transform: translateY(-15px);
        }
       
         /* Floating label */
        .wc-block-components-text-input.is-active label,
        .wc-block-components-text-input.has-value label {
            left: 12px;
            padding: 0 10px;
            transform: translateY(-21px) scale(0.885);
            background-color: var(--wp--preset--color--white);
        }
        .wc-block-components-checkout-step {
            margin: 0 0 60px 0;
        }

        .wc-block-components-radio-control__option-checked input {
            background-color: transparent;
        }
    
        .wc-blocks-components-select .wc-blocks-components-select__label {
            font-size: 15px;
            left: 12px;
            color: var(--wp--preset--color--contrast);
            background-color: var(--wp--preset--color--white);
            padding: 0 10px;
            transform: translateY(-21px) scale(1);
        }

        .wc-block-components-checkout-step__heading-container {
            margin-bottom: 0;
        }

        .wc-blocks-components-select,
        .wc-block-components-text-input {
            margin-top:28px;

            &.has-error input {
                border-color: red;
                padding-left: 20px;
                height: 54px;
            }
        }
        
        textarea,
        .wc-blocks-components-select .wc-blocks-components-select__select,
        .wc-block-components-text-input:not(.has-error) input[type=email],
        .wc-block-components-text-input:not(.has-error) input[type=number],
        .wc-block-components-text-input:not(.has-error) input[type=password],
        .wc-block-components-text-input:not(.has-error) input[type=tel],
        .wc-block-components-text-input:not(.has-error) input[type=text],
        .wc-block-components-text-input:not(.has-error) input[type=url],
        .wc-block-components-form .wc-block-components-text-input:not(.has-error) input[type=email],
        .wc-block-components-form .wc-block-components-text-input:not(.has-error) input[type=number],
        .wc-block-components-form .wc-block-components-text-input:not(.has-error) input[type=password],
        .wc-block-components-form .wc-block-components-text-input:not(.has-error) input[type=tel],
        .wc-block-components-form .wc-block-components-text-input:not(.has-error) input[type=text],
        .wc-block-components-form .wc-block-components-text-input:not(.has-error) input[type=url] {
            height: 54px;
            border: 1px solid var(--wp--preset--color--gray-100);
            color: var(--wp--preset--color--contrast);
            padding: 0 20px 0 20px;
            font-weight: 400;
            font-size: 17px;
            border-radius: 0;
            &:focus {
               border-color: var(--wp--preset--color--contrast);
            }

            &::placeholder {
              font-size: 15px;
            }
        }        

        .wc-block-components-checkout-step__heading {
            .wc-block-components-title.wc-block-components-title {
                font-size: 18px;
                font-style: normal;
                font-weight: 500;
                line-height: 24px; 
                color: var(--wp--preset--color--contrast);
                text-transform: uppercase;
                margin-bottom: 5px;
            }
        }

        .wc-block-components-checkout-step__content {
            padding-top: 0;
        }

        .wc-block-components-checkbox {
            margin: 0;
        }

        .wc-block-checkout__guest-checkout-notice {
            font-size: 14px;
            margin-top: 8px;
        }

        .wc-block-components-address-card {
                margin-top: 30px;
        }

        .wc-block-checkout__payment-method,
        .wc-block-checkout__shipping-option {
            .wc-block-components-checkout-step__content {
                margin-top: 23px;
            }
        }


        /*.wc-block-components-radio-control .wc-block-components-radio-control__input:checked:before {
            background: var(--wp--preset--color--contrast);
        }*/

        .wc-block-components-radio-control__input {
            width: 18px;
            height: 18px;
        }

        .wc-block-components-radio-control--highlight-checked .wc-block-components-radio-control-accordion-option--checked-option-highlighted,
        .wc-block-components-radio-control--highlight-checked label.wc-block-components-radio-control__option--checked-option-highlighted {
            border: 0;
        }

        .wc-block-components-radio-control--highlight-checked div.wc-block-components-radio-control-accordion-option:after,
        .wc-block-components-radio-control--highlight-checked .wc-block-components-radio-control__option:after,
        .wc-block-components-radio-control--highlight-checked:after {
            content: none;
        }

        .wc-block-components-shipping-rates-control__package {
            .wc-block-components-radio-control__input {
                top: 23px;
            }
            .wc-block-components-radio-control__option {
                padding-left: 44px;
            }
        }

        .wc-block-components-payment-methods__save-card-info {
            margin-top: 30px;
        }

        .wc-block-components-radio-control {
            display: flex;
            flex-direction: column;
            gap: 12px;

            .wc-block-components-radio-control__label,
            .wc-block-components-radio-control__secondary-label,
            .wc-block-components-payment-method-label {
                font-size: 17px;
                font-weight: 500;
                line-height: 32px;
            }
        }

        .wc-block-components-radio-control__option,
        .wc-block-components-radio-control-accordion-option {
            border: 1px solid var(--wp--preset--color--gray-100);
            border-radius: 0;
            
        }

        .wc-block-components-radio-control-accordion-option .wc-block-components-radio-control__option {
            border: none;
            padding-left: 44px;
        }

        .wc-block-components-checkout-return-to-cart-button {
            font-size: 15px;
            text-underline-offset: 12px;
            text-decoration: underline;

            &:hover {
                color: var(--wp--preset--color--contrast);
            }
        }

        .wp-block-woocommerce-checkout-actions-block .wc-block-checkout__actions_row {
            margin-top: 30px;

            .wc-block-components-checkout-place-order-button {
                padding: 18px 30px;
                &::after {
                    content: "";
                    display: inline-block;
                    width: 16px;
                    height: 16px;
                    margin-left: 10px;
                    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M15.5556 0H5.7778C5.53214 0 5.33334 0.198792 5.33334 0.444458C5.33334 0.690125 5.53214 0.888917 5.7778 0.888917H14.4827L0.130219 15.2413C-0.0434062 15.415 -0.0434062 15.6962 0.130219 15.8698C0.21701 15.9566 0.33076 16 0.444469 16C0.558177 16 0.671885 15.9566 0.758719 15.8698L15.1111 1.51737V10.2222C15.1111 10.4679 15.3099 10.6667 15.5556 10.6667C15.8013 10.6667 16.0001 10.4679 16.0001 10.2222V0.444458C16 0.198792 15.8012 0 15.5556 0Z' fill='%23000000'/%3E%3C/svg%3E");
                    background-repeat: no-repeat;
                    background-position: center;
                    background-size: contain;
                }
                
                .wc-block-components-checkout-place-order-button__text {
                    font-size: 15px;
                    font-weight: 500;
                    line-height: 24px;
                    text-transform: uppercase;
                }

                &:hover::after {
                    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M15.5556 0H5.7778C5.53214 0 5.33334 0.198792 5.33334 0.444458C5.33334 0.690125 5.53214 0.888917 5.7778 0.888917H14.4827L0.130219 15.2413C-0.0434062 15.415 -0.0434062 15.6962 0.130219 15.8698C0.21701 15.9566 0.33076 16 0.444469 16C0.558177 16 0.671885 15.9566 0.758719 15.8698L15.1111 1.51737V10.2222C15.1111 10.4679 15.3099 10.6667 15.5556 10.6667C15.8013 10.6667 16.0001 10.4679 16.0001 10.2222V0.444458C16 0.198792 15.8012 0 15.5556 0Z' fill='%23ffffff'/%3E%3C/svg%3E");
                }
            }
        }

        .wc-block-components-checkbox__label {
            font-size: 15px;
        }
    }

    .wp-block-woocommerce-checkout-order-summary-block {
        padding: 20px;
        
        border: 1px solid var(--wp--preset--color--gray-100);

        .wp-block-woocommerce-checkout-order-summary-cart-items-block {
            .wc-block-components-order-summary {
                padding: 0;

                .wc-block-components-order-summary__content {
                    display: flex;
                    flex-direction: column;
                    gap: 20px;
                    padding: 20px 0;

                    .wc-block-components-order-summary-item {
                        .wc-block-components-order-summary-item__image {
                            border: 1px solid var(--wp--preset--color--gray-100);
                            
                            padding: 8px;
                            height: 66px;
                            width: 66px;
                            margin: 0 18px 0 0;
                        }

                        &:last-child>div.wc-block-components-order-summary-item__image {
                            padding: 8px;
                        }

                        .wc-block-components-product-name {
                            flex-grow: 0;
                        }

                        .wc-block-components-order-summary-item__total-price,
                        .wc-block-components-product-name {
                            color: var(--wp--preset--color--contrast);
                            font-size: 15px;
                            font-weight: 400;
                            line-height: 26px; 
                            padding: 0;
                        }

                        .wc-block-components-formatted-money-amount {
                            font-size: 14px;
                            font-weight: 400;
                            color: var(--wp--preset--color--contrast);
                        }

                        .wc-block-components-order-summary-item__quantity {
                            min-width: 0;
                            min-height: 0;
                            padding: 0;
                            box-shadow: none;
                            border: none;
                            background-color: var(--wp--preset--color--primary);
                            font-size: 10px;
                            font-weight: 600;
                            line-height: 20px; 
                            width: 20px;
                            height: 20px;
                            text-align: center;
                            border-radius: 9999px;

                            span {
                                color: var(--wp--preset--color--contrast);
                            }
                        }

                        .wc-block-components-product-metadata {
                            margin: 0;
                            padding: 0;

                            &:empty {
                                display: none;
                            }
                        }

                        .wc-block-components-order-summary-item__description {
                            padding: 0;
                            display: flex;
                            flex-direction: column;
                            gap: 5px;
                            margin-right: 24px;

                            .wc-block-components-order-summary-item__individual-prices {
                                font-weight: 400;
                                font-size: 14px;
                                line-height: 26px;
                                padding: 0;
                                color: var(--wp--preset--color--contrast);
                                gap: 0;
                                del {
                                    opacity: 0.3;
                                }
                            }

                            .wc-block-components-product-metadata {
                                display: none;
                            }
                        }
                    }
                }
            }
        }

        .wc-block-components-totals-wrapper {
            padding: 0;
        }

        .wc-block-components-product-price {
            margin: 0;
        }

        .wc-block-components-totals-footer-item {
            padding: 13px 0 0 0;
            .wc-block-components-totals-item__label,
            .wc-block-components-totals-item__value {
                font-size: 17px;
                line-height: 32px;
                font-weight: 500;
            }
        }

        .wp-block-woocommerce-checkout-order-summary-totals-block,
        .wc-block-components-totals-wrapper {
            border-color: var(--wp--preset--color--gray-100);
        }

        .wc-block-components-sale-badge {
            font-weight: 500;
            font-size: 12px;
            border-radius: 4px;
        }
    
        .wc-block-components-checkout-order-summary__title {
            margin: 0;
            border: none;
            padding: 0;
            .wc-block-components-checkout-order-summary__title-text {
                margin: 0;
                color: var(--wp--preset--color--contrast);
                font-size: 15px;
                font-weight: 500;
                line-height: 24px;
                text-transform: uppercase;
            }
        }

        .wp-block-woocommerce-checkout-order-summary-totals-block {
            display: flex;
            flex-direction: column;
            gap: 0;
            padding: 0;

            > *:empty {
                display: none;
            }
            .wc-block-components-totals-wrapper {
                padding: 16px 0;

                &:not(:last-child) {
                    border-bottom: 1px solid var(--wp--preset--color--gray-100);
                }
                .wc-block-components-totals-item {
                    padding: 0;

                    .wc-block-components-totals-item__label,
                    .wc-block-components-totals-item__value {
                        font-size: 15px;
                        font-weight: 400;
                    }
                }
            }
        }
    }

    .wp-block-woocommerce-checkout-order-summary-coupon-form-block.wc-block-components-totals-wrapper {
        padding: 15px 0;

        .wc-block-components-totals-coupon {
            padding: 0;
            font-size: 15px;

            .wc-block-components-text-input {
                height: 45px;
                margin-top: 0;

                label {
                    left: 20px;
                    font-size: 15px;
                    font-weight: 400;
                    color: var(--wp--preset--color--contrast);
                    transform: translateY(-15px);
                }
                &.is-active {
                    label {
                        font-size: 15px;
                        left: 12px;
                        transform: translateY(-22px) scale(1);
                        background-color: var(--wp--preset--color--white);
                        color: var(--wp--preset--color--contrast);
                    }
                    input {
                        font-size: 15px;
                        font-weight: 400;
                        padding: 15px 20px 10px;
                    }
                }

            }
            .wc-block-components-button {
                padding: 10px;
            }
        }
    }

    .wc-block-components-sidebar-layout {
        margin-bottom: 120px;
    }
}

.editor-styles-wrapper .wp-block-woocommerce-checkout .wc-block-checkout {
    .wp-block-woocommerce-checkout-order-summary-totals-block {
        display: none;
    }

    .wc-block-cart__totals-title textarea {
        text-transform: unset;
        font-weight: 700;
        padding: 0;
    }

    .wc-block-components-main {
        .wc-block-components-checkout-step__heading textarea {
            border: none;
            padding: 0;
        }
    }

    .wc-block-components-sidebar {
        padding: 0;
        border: none;
    }
    
    .wp-block-woocommerce-checkout-order-summary-totals-block 
    .wc-block-components-totals-wrapper {
        border-bottom: 1px solid var(--wp--preset--color--gray-100);
    }  
}

.wc-block-store-notices,
.wp-block-post-content {
    margin: 0;
}

/**
 * Min width lg: 1024px
 */
@media (width >= 64rem) {
    .wc-block-components-sidebar-layout {
        display: grid;
        grid-template-columns: 1fr minmax(min(400px, 35%), 400px);
        column-gap: 76px;

        .wc-block-components-main {
            width: 100%;
            padding: 0;

            .wc-block-checkout__actions_row {
                margin: 0;
            }
        }

        .wc-block-components-sidebar {
            width: 100%;
            padding: 0;

            .wc-block-components-checkout-order-summary__title {
                margin-bottom: 10px;

                .wc-block-components-checkout-order-summary__title-text {
                    font-size: 18px;
                }
            }

            .wc-block-components-totals-item {
                gap: 0;
            }

            .wp-block-woocommerce-checkout-order-summary-block {
                padding: 34px 40px 30px;
                border: 1px solid var(--wp--preset--color--gray-100);
                align-self: flex-start;
            }
        }
    }
}
