:root :where(.wp-block-woocommerce-checkout.wc-block-checkout) {
    padding: 0;
    color: var(--wp--preset--color--zinc-950);

    .wp-block-woocommerce-checkout-order-summary-block {
        padding: 20px;
        border-radius: 24px;
        border: none;
        background-color: var(--wp--preset--color--stone-100);

        @media (width >= 768px) {
            padding: 40px;
        }

        .wc-block-components-formatted-money-amount {
            font-weight: 700;
        }

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

    @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-components-checkout-order-summary__title {
        margin: 0;

        @media (width <= 767px) {
            border-width: 0;
            padding: 0;
        }

        .wc-block-components-checkout-order-summary__title-text {
            margin: 0;
            color: var(--wp--preset--color--zinc-950);
            font-size: 18px;
            font-style: normal;
            font-weight: 600;
            line-height: 32px; /* 133.333% */
            letter-spacing: -0.48px;

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

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

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

            .wc-block-components-order-summary__content {
                display: flex;
                flex-direction: column;
                gap: 40px;
                padding: 40px 0;
            }
        }
    }
    
    .wc-block-components-order-summary-item {
        padding: 0;
        font-size: 18px;
        gap: 24px;

        @media (width <= 400px) {
            flex-direction: column;
        }

        .wc-block-components-order-summary-item__image {
            margin: 0;
            padding: 0;
            width: 84px;

            img {
                width: 84px;
                aspect-ratio: 1;
                border-radius: 12px;
                max-width: none;
                height: 84px;
            }
        }

        .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--zinc-950);

            font-size: 18px;
            font-style: normal;
            font-weight: 600;
            line-height: 26px; /* 144.444% */
            letter-spacing: -0.36px;
        }

        .wc-block-components-order-summary-item__total-price {
            font-weight: 700;
        }

        .wc-block-components-order-summary-item__individual-prices {
            color: var(--wp--preset--color--zinc-950);

            font-size: 16px;
            font-style: normal;
            line-height: 24px; /* 150% */
            letter-spacing: -0.32px;
        }

        .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--teal-800);
            color: var(--wp--preset--color--white);
            font-size: 14px;
            font-weight: 600;
            line-height: 20px; /* 142.857% */
            width: 28px;
            height: 28px;
            text-align: center;
            border-radius: 9999px;
        }

        .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: 8px;

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

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

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

    .wp-block-woocommerce-checkout-order-summary-totals-block,
    .wc-block-components-totals-wrapper {
        border-image: url( "data:image/svg+xml;utf8,<svg width='346' height='1' viewBox='0 0 346 1' fill='none' xmlns='http://www.w3.org/2000/svg'><line x1='0.5' y1='0.5' x2='345.5' y2='0.50003' stroke='%23D4D4D8' stroke-linecap='round' stroke-dasharray='6 6'/></svg>") 1 repeat;
    }
    
    .wp-block-woocommerce-checkout-order-summary-totals-block {
        display: flex;
        flex-direction: column;
        gap: 16px;
        padding: 30px 0;

        > *:empty {
            display: none;
        }
    }

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

        .wc-block-components-totals-item {
            padding: 0;
            font-size: 18px;
        }
    }

    .wc-block-components-totals-item.wc-block-components-totals-footer-item {
        padding-top: 40px;

        .wc-block-components-totals-item__label,
        .wc-block-components-totals-item__value {
            font-size: 20px;
            line-height: 28px; /* 140% */
            letter-spacing: -0.4px;
        }
    }

    .wc-block-components-form.wc-block-checkout__form {
        font-size: 16px;
        color: var(--wp--preset--color--zinc-800);
        line-height: 24px;
        letter-spacing: -0.32px;
        border-radius: 12px;

        .wc-block-components-checkout-step {
            margin: 0 0 56px 0;
        }

        .wc-block-components-checkout-step__heading {
            margin: 0 0 12px 0;

            .wc-block-components-title.wc-block-components-title {
                font-size: 24px;
                font-style: normal;
                font-weight: 600;
                line-height: 32px; /* 133.333% */
                letter-spacing: -0.48px;
                color: var(--wp--preset--color--zinc-950);
            }
        }

        .wc-block-components-checkout-step__description {
            font-size: inherit;
            margin-bottom: 0;
        }

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

        .wc-block-components-checkbox label {
            font-size: inherit;
        }

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

        .wc-block-components-address-card {
            border-radius: 12px;
        }

        
        .wc-blocks-components-select .wc-blocks-components-select__select,
        .wc-block-components-text-input input[type=email],
        .wc-block-components-text-input input[type=number],
        .wc-block-components-text-input input[type=password],
        .wc-block-components-text-input input[type=tel],
        .wc-block-components-text-input input[type=text],
        .wc-block-components-text-input input[type=url],
        .wc-block-components-form .wc-block-components-text-input input[type=email],
        .wc-block-components-form .wc-block-components-text-input input[type=number],
        .wc-block-components-form .wc-block-components-text-input input[type=password],
        .wc-block-components-form .wc-block-components-text-input input[type=tel],
        .wc-block-components-form .wc-block-components-text-input input[type=text],
        .wc-block-components-form .wc-block-components-text-input input[type=url],
        textarea {
            border-radius: 12px;
            padding-left: 16px;

            &:focus-visible {
                outline-color: var(--wp--preset--color--teal-800);
            }
        }

        .wc-block-components-text-input label,
        .wc-block-components-form .wc-block-components-text-input label {
            line-height: 24px;
            letter-spacing: -0.32px;
            left: 18px;
        }

        .wc-blocks-components-select .wc-blocks-components-select__label {
            left: 17px;
            color: var(--wp--preset--color--zinc-600);
        }

        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] {
            border-color: var(--wp--preset--color--zinc-300);
            color: var(--wp--preset--color--zinc-950);

            &:focus-visible { 
                 outline-color: var(--wp--preset--color--teal-800);
            }
        }

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

        .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-radius: 12px;
            box-shadow: inset 0 0 0 1.5px var(--wp--preset--color--teal-800);
        }

        .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-radio-control {
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

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

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

    .wc-block-components-sidebar-layout {
        margin-bottom: var(--wp--preset--spacing--24);
    }

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

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

    .wp-block-woocommerce-checkout-actions-block .wc-block-checkout__actions_row .wc-block-components-checkout-place-order-button {
        padding: 16px 24px;
    }

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

    .wc-block-components-totals-coupon__form {
        display: flex;
        flex-direction: column;
        gap: 16px;
        font-size: 16px;
        font-style: normal;
        font-weight: 400;
        line-height: 24px; /* 150% */
        letter-spacing: -0.32px;

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

            label { /* stylelint-disable-line */
                left: 18px; 
            }

            input {
                border-radius: 12px;
                padding-left: 16px;
                background-color: transparent;
                color: var(--wp--preset--color--zinc-600);
                border-color: var(--wp--preset--color--zinc-300);

                &:focus-visible {
                    outline-color:var(--wp--preset--color--teal-800);
                }
            }
        }

        .wc-block-components-totals-coupon__button {
            border: 1px solid var(--wp--preset--color--zinc-300);
            background-color: transparent;
            color: var(--wp--preset--color--teal-800);
        }
    }
}