:root :where(.wp-block-woocommerce-checkout.wc-block-checkout) {
    .wp-block-woocommerce-checkout-order-summary-block {
        border-width: 0;
        border-radius: 1rem;

        @media (width >= 1280px) {
            margin-left: 8px;
        }

        @media (width >= 768px) {
            padding: var(--wp--preset--spacing--12);
            background-color: var(--wp--preset--color--stone-50);
        }

        .checkout-order-summary-block-fill {
            border-width: 0;
        }

        &.checkout-order-summary-block-fill-wrapper {
            padding: var(--wp--preset--spacing--6);
            background-color: var(--wp--preset--color--stone-50);
        }

        .wc-block-components-checkout-order-summary__title {
            margin-top: 0;

            .wc-block-components-checkout-order-summary__title-text {
                margin-left: 0;
                font-size: var(--wp--preset--font-size--2-xl);
                font-weight: 500;
                line-height: 1.25;
                font-family: var(--wp--preset--font-family--eb-garamond);

                @media (width >=768px) {
                    font-size: var(--wp--preset--font-size--3-5-xl);
                }
            }

            .wc-block-components-checkout-order-summary__title-icon {
                @media (width <= 767px) {
                    display: flex;
                }
            }
        }

        .wc-block-components-order-summary {
            padding: 0;
        }

        .wc-block-components-order-summary-item__individual-prices,
        .wc-block-components-order-summary-item__total-price {
            line-height: 1.55;
            display: inline-block;
            letter-spacing: 0.18px;
        }

        .wc-block-components-order-summary-item__individual-prices {
            .wc-block-components-formatted-money-amount {
                font-weight: 400;
            }

            ins {
                float: left;
                margin-left: 0;
                margin-right: 6px;
                color: var(--wp--preset--color--red-600);
            }

            del {
                color: var(--wp--preset--color--stone-600);
                font-size: 0.875rem;
            }
        }

        .wc-block-components-order-summary-item__total-price {
            .wc-block-components-formatted-money-amount {
                font-weight: 500;
            }
        }

        .wc-block-components-totals-wrapper:last-child {
            @media (width >= 768px) {
                padding-bottom: 0;
            }
        }
    }

    .wc-block-components-checkout-return-to-cart-button {
        text-underline-offset: 8px;
        font-size: 1.125rem;
        font-weight: 500;
        line-height: 1.55;
        letter-spacing: .18px;
        color: var(--wp--preset--color--stone-950);
        padding: 0;

        svg {display: none;}
    }

    .wc-block-checkout__actions {
        .wc-block-checkout__actions_row {
            @media (width <= 767px) {
                margin-top: 2rem;
                align-items: stretch;
                gap: 10px;

                .wc-block-components-checkout-place-order-button {
                    width: 100%;
                }
            }
        }
    }

    @media (width <= 1023px) {
        .wc-block-components-sidebar-layout  {
            .wc-block-components-main,
            .wc-block-components-sidebar {
                padding: 0;
                width: 100%;
            }
        }
    }

    @media (768px <= width <= 1023px) {
        .wc-block-components-sidebar-layout {
            flex-direction: column-reverse;
            gap: 2rem;
        }
    }

    @media (1024px <= width <= 1279px) {
        .wc-block-components-sidebar-layout {
            .wc-block-components-main {
                width: 60%;
                padding-right: 2rem;
            }

            .wc-block-components-sidebar {
                width: 40%;
                padding-left:0;
            }
        }
    }

    .wc-block-checkout__form {
        @media (width >= 1280px) {
            margin-right: 2.375rem;
        }

        .wc-block-components-checkout-step__title {
            font-family: var(--wp--preset--font-family--eb-garamond);
            line-height: 1.33;
            font-weight: 500;
            font-size: var(--wp--preset--font-size--2-xl);
        }

        .wc-block-components-checkout-step__description {
            margin-bottom: var(--wp--preset--spacing--8);
            letter-spacing: .16px;
            line-height: 1.62;
            font-size: 1rem;
        }

        .wc-block-components-checkout-step {
            @media (width >= 1280px) {
                margin-bottom: var(--wp--preset--spacing--16);
            }
        }
    }
    
    .wc-block-components-sidebar {
        .slot-wrapper .wc-block-components-panel,
        .wc-block-components-panel,
        .wc-block-components-totals-coupon,
        .wc-block-components-totals-item {
            padding: 0;
        }

        .wc-block-components-totals-coupon {
            .wc-block-components-panel__button {
                font-size: 1.125rem;
                font-weight: 500;
                color: var(--wp--preset--color--stone-950);
                margin-bottom: 0;
            }
        }
    }

    .wc-block-components-totals-wrapper {
        border-color: var(--wp--preset--color--stone-300);
    }

    .wp-block-woocommerce-checkout-order-summary-totals-block {
        font-size: 1.125rem;
    }

    .wc-block-components-totals-coupon__form {
        flex-direction: column;
        gap: 16px;

        .wc-block-components-totals-coupon__input {
            flex:none;
        }
    }

    .wp-block-woocommerce-checkout-order-summary-cart-items-block {
        margin-bottom: 1.4rem;
    }

    .wc-block-components-order-summary {
        .wc-block-components-order-summary-item {
            padding-top: 4px;

            @media (width >= 768px) {
                font-size: 1.125rem;
            }

            .wc-block-components-product-metadata {
                font-size: 0.875rem;
                color: var(--wp--preset--color--stone-700);

                @media (width <= 767px) {
                    display: none;
                }
            }
        }

        .wc-block-components-product-name {
            font-size: 1.25rem;
            font-family: var(--wp--preset--font-family--eb-garamond);
            line-height: 1.4;
            font-weight: 500;
            margin: 0;
        }

        .wc-block-components-order-summary-item__image {
            &,>img {
                @media (width >= 768px) {
                    width: 5.25rem;
                    height: auto;
                }
            }

            > img {
                max-width: 5.25rem;
                aspect-ratio: 21/25;
                object-fit: cover;
                border-radius: 8px;
            }            
        }

        .wc-block-components-order-summary-item__quantity {
            width: 18px;
            height: 18px;
            background-color: var(--wp--preset--color--stone-600);
            border-width: 0;
            box-shadow: none;
            border-radius: 1000px;
            font-size: 0.875rem;
            line-height: 1.4;
            padding: 0;
            color: var(--wp--preset--color--white);

            @media (width >= 768px) {
                width: 28px;
                height: 28px;
            }
        }
    }

    .wc-block-components-form .wc-block-components-text-input,
    .wc-block-components-text-input {
        input[type=email],
        input[type=number],
        input[type=password],
        input[type=tel],
        input[type=text],
        input[type=url] {
            outline: none;
        }
    }

    .wc-blocks-components-select {
        .wc-blocks-components-select__select {
            border-color: transparent transparent var(--wp--preset--color--stone-300) transparent;
            border-radius: 0;
            outline: none;
            padding-inline: 0;
        }

        .wc-blocks-components-select__expand {
            right: 0;
        }

        label {
            left: 0;
        }
    }

    .wc-block-components-form .wc-block-components-text-input:not(.has-error),
    .wc-block-components-text-input:not(.has-error) {
        input[type=email],
        input[type=number],
        input[type=password],
        input[type=tel],
        input[type=text],
        input[type=url] {
            border-color: transparent transparent var(--wp--preset--color--stone-300) transparent;
            background-color: transparent;
            padding-left: 0;
            border-radius: 0;

            &:focus-visible,
            &:focus {
                border-color: transparent transparent var(--wp--preset--color--stone-950) transparent;
            }
        }

        label {
            left: 0;
        }
    }

    @media (width >= 768px) {
        .wc-block-checkout__billing-fields .wc-block-components-address-form, 
        .wc-block-checkout__shipping-fields .wc-block-components-address-form {
            gap: 0 var(--wp--preset--spacing--6);
        }
    }

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

    .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 {
        box-shadow: inset 0 0 0 1px var(--wp--preset--color--stone-300);
    }

    .wc-block-components-radio-control-accordion-content {
        font-size: 0.875rem;
    }

    .wc-block-checkout__payment-method .wc-block-components-radio-control__option {
        padding-left: 2.6rem;
    }

    .wc-block-components-radio-control {
        > *:not(:last-child) {
            margin-bottom: 10px;
        }

        .wc-block-components-radio-control__input {
            height: 16px;
            width: 16px;
            min-width: 16px;
            min-height: 16px;

            &:checked {
                outline: none;

                border-color: var(--wp--preset--color--stone-300);

                &:before {
                    width: 10px;
                    height: 10px;
                    min-width: 10px;
                    min-height: 10px;
                    background-color: var(--wp--preset--color--stone-800);
                }
            }
        }

        .wc-block-components-radio-control-accordion-option {
            border-radius: 12px;
        }
    }
}