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

        .wp-block-woocommerce-checkout-order-summary-block {
            padding: 40px;
            border-radius: 8px;
            border: none;
            background-color: var(--wp--preset--color--bg-3);

            @media (width <= 767px) {
                padding: 20px;
                
                .checkout-order-summary-block-fill {
                    border: 0;
                }
            }
        }

         .wc-block-checkout__shipping-method-option.wc-block-checkout__shipping-method-option--selected {
            border: none;
         }

        @media (width >= 1280px) {
            .wc-block-components-sidebar-layout .wc-block-components-main {
                 width: 61.8%;
                padding-right: 60px;
            }
            .wc-block-components-sidebar {
                width:38.2%;
                padding-left:0;
            }
        }

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

            .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-checkout-order-summary__content.is-open {
                border-bottom: none;
            }

            .wc-block-components-product-badge{
                margin-bottom: 10px;
            }

            .checkout-order-summary-block-fill-wrapper {
                .wc-block-components-checkout-step__heading {
                    margin: 0 !important;
                }

                .wc-block-components-title {
                    margin-bottom: 0;
                }
            }
        }

        @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;
                }
            }
        }

        @media (max-width: 425px) { 
            .wc-block-components-totals-coupon__form::after {
                display: none !important;
            }

            .wc-block-components-checkout-return-to-cart-button {
                text-align: center;
            }

            .wc-block-checkout__actions .wc-block-checkout__actions_row {
                align-items: normal;
            }
        }
        
      



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

        .wc-block-components-state-input{
            margin-top: 9px;
        }

        .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: -7px 0 0;
                color: var(--wp--preset--color--text-primary);
                font-size: 20px;
                font-weight: 700;
                
                @media (width >= 768px) {
                    font-size: 24px;
                    font-family: var(--wp--preset--font-family--space-grotesk);
                }
            }
        }

        .wc-block-checkout__actions_row {
            margin-top: 30px;
            margin-bottom: 0;
        }

        .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: 10px;
                    padding: 20px 0 10px 0;
                }
            }
        }

        .wc-block-components-order-summary-item {
            padding: 0;
            font-size: 18px;
            border-radius: 8px;
            border:1px solid var(--wp--preset--color--neutral-200);
            background: var(--wp--preset--color--white);

           &:last-child {
            border-bottom: 1px solid var(--wp--preset--color--neutral-200);
           }

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

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

                @media (width <= 400px) {
                    padding-left: 10px;
                    padding-top: 10px ;
                    padding-bottom: 10px ;
                }
                
                img {
                    width: 100px;
                    aspect-ratio: 1;
                    max-width: none;
                    height:100px;
                    border-radius: 8px 0 0 8px;

                    @media (width <= 400px) {
                        border-radius: 0 ;
                    }
                }
            }

            .wc-block-components-product-name {
                color: var(--wp--preset--color--text-primary);
                flex-grow: 0;
                font-size: 14px;
                font-style: normal;
                font-weight: 400;
                line-height: 26px; 
            }

            .wc-block-components-order-summary-item__total-price {
                color:  var(--wp--preset--color--text-primary);
                font-size: 15px;
                line-height: 26px;
                font-weight: 600;
                padding-right: 20px;
                padding-top: 15px;
            }

            .wc-block-components-order-summary-item__individual-prices{
                color: var(--wp--preset--color--text-primary);
                font-size: 15px;
                font-style: normal;
                font-weight: 600;
                line-height: 26px; 
            }

            .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);
                color: var(--wp--preset--color--white);
                font-size: 12px;
                font-weight: 500;
                line-height: 1;
                width: 15px;
                height: 15px;
                text-align: center;
                border-radius: 9999px;

                @media (width <= 400px) {
                    top: 10px;
                    right: 5px;
                }
            }

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

                .wc-block-components-product-metadata__description p {
                    line-height: 1;
                    margin-top: 4px;
                    display: -webkit-box;
                    -webkit-line-clamp: 1;
                    -webkit-box-orient: vertical;
                    overflow: hidden;
                    text-overflow: ellipsis;
                    font-size: 11px;
                }

                 @media (width >= 768px) {
                     .wc-block-components-product-metadata__description p {
                    font-size: 14px;
                      }
                }

                &:empty {
                    display: none;
                }
            }

            .wc-block-components-order-summary-item__description {
                padding: 0;
                display: flex;
                flex-direction: column;
                gap: 0px;
                padding-left: 10px;
                justify-content: center;

                .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: 12px 0;
            border: none;
            border-bottom: 1px solid var(--Border, #E2E8F0);

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

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

            > *:empty {
                display: none;
            }
        }

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

            .wc-block-components-totals-item {
                color: var(--wp--preset--color--text-primary);
                padding: 0;
                font-size: 15px;
                line-height: 26px; 
                font-weight: 600;
                padding-bottom: 12px;
                border-bottom: 1px solid var(--Border, #E2E8F0);
            }
        }

        .wc-block-components-totals-item.wc-block-components-totals-footer-item {
            color: var(--wp--preset--color--text-primary);
            padding-bottom: 0;
            padding-top: 10px;
            border-bottom: none;

            .wc-block-components-totals-item__label,
            .wc-block-components-totals-item__value {
                font-size: 20px;
                line-height: 14px;
                font-weight: 600;
            }
        }

        .wc-block-components-totals-item__value {
            font-size: 14px;
            font-weight: 400;
            line-height: 26px;
            color: var(--wp--preset--color--text-primary);
        }

        .wc-block-components-totals-shipping{
            .wc-block-components-totals-item__value {
                font-weight: 300;
            }
        }

        /**
        * Coupon form styles
        */
        .wc-block-components-totals-coupon__form {
            background-color: white;
            border: 1px solid var(--wp--preset--color--neutral-200);
            box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.03);
            border-radius: 8px;
            display: flex;
            gap: 10px;
            font-size: 16px;
            font-style: normal;
            font-weight: 400;
            line-height: 24px;
          
            .wc-block-components-totals-coupon__input {
                margin-top: 0;
             
                input {
                    border-radius: 8px;
                    padding-left: 16px;
                    background-color: white;
                    color: var(--wp--preset--color--text-primary);
                    border: none;
                    outline: 0;

                    &:focus-visible {
                        outline:0;
                    }
                }
            }

            .wc-block-components-totals-coupon__button {
                background-color:white;
                color: var(--wp--preset--color--text-primary);
                border-radius: 12px;
                font-size: 14px;
                font-weight: 500;
                line-height: 22px;
                padding: 10px 20px;
            }

                &::after {
                content: "";
                display: inline-block;
                width: 15px;
                height: 15px;
                position: absolute;
                transform: translateY(-50%);
                right: 18px;       
                top: 50%;
                background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M7.32812 3.0625L11.2656 7L7.32812 10.9375M10.7188 7H2.73438' stroke='%230B1220' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
                background-position: center;
                background-repeat: no-repeat;
                background-size: contain;
            }
        }
        
        .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: 8px;
            font-size: 14px;

            &:focus-visible {
                outline-color: var(--wp--preset--color--text-primary);
                padding-left: 15px;
            }
        }

        .wc-block-components-text-input.is-active input[type=text], .wc-block-components-text-input.is-active input[type=url] {
            padding: 24px 15px 20px;
        }

        .wc-blocks-components-select .wc-blocks-components-select__select {
            padding: 15px 15px 13px;
        }

        .wc-block-components-text-input.is-active input[type=email] {
             padding: 15px 15px 13px;
        }
        
        .wc-block-components-text-input label {
            font-size: 14px;
            font-weight: 400;
            line-height: 26px;
            color: var(--wp--preset--color--text-primary);
            padding-left: 5px;
        }

        /* Floating label */
        .wc-block-components-text-input.is-active label,
        .wc-block-components-text-input.has-value label {
            font-size: 12px;
            left: 15px;
            padding: 0px 6px;
            transform: translateY(-17px) scale(1);
            background-color: var(--wp--preset--color--white);
            color: var(--wp--preset--color--text-secondary);
        }

       .wc-blocks-components-select .wc-blocks-components-select__label{
            font-size: 12px;
            left: 15px;
            color: var(--wp--preset--color--text-secondary);
            background-color: var(--wp--preset--color--white);
            padding: 0px 6px;
            transform: translateY(-13px) scale(1);
        }

        .wc-blocks-components-select select {
            padding-left: 15px;
        }

        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--neutral-200);
            color: var(--wp--preset--color--text-primary);

            &:focus-visible { 
                 outline-color: var(--wp--preset--color--text-primary);
            }
        }

    .wc-block-components-totals-wrapper,
    .wp-block-woocommerce-checkout-order-summary-totals-block {
        border: none;

        .wc-block-components-totals-item__value {
            color: var(--wp--preset--color--black);
        }
    }

    .wc-block-components-main {
        .wc-block-components-title {
            font-size: 18px;
            font-style: normal;
            font-weight: 400;
            line-height: 25.2px; 
        }
    
        .wc-block-components-form.wc-block-checkout__form {

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

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

                .wc-block-components-title{
                    font-size: 24px;
                    font-style: normal;
                    font-weight: 700;
                    color: var(--wp--preset--color--text-primary);
                    font-family: var(--wp--preset--font-family--space-grotesk);
                }
            }

            .wc-block-components-checkout-return-to-cart-button {
                font-size: 14px;
                font-weight: 500;
                color: var(--wp--preset--color--primary);
                padding: 18px 47px 18px 30px;
                border-radius: 8px;
                border: 1px solid var(--wp--preset--color--primary);
                background: var(--wp--preset--color--white);

                &::after {
                content: "";
                display: inline-block;
                width: 15px;
                height: 15px;
                position: absolute;
                transform: translateY(-50%);
                right: 24px;       
                top: 50%;
                background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M7.32812 3.0625L11.2656 7L7.32812 10.9375M10.7188 7H2.73438' stroke='%231D4ED8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
                background-position: center;
                background-repeat: no-repeat;
                background-size: contain;
                }

                &:focus{
                    outline: none;
                }
            }

            .wc-block-components-checkout-return-to-cart-button svg {
                display: none;
            }

           .wp-block-woocommerce-checkout-actions-block .wc-block-checkout__actions_row .wc-block-components-checkout-place-order-button {
            padding: 18px 52px 18px 30px;
            border-radius: 8px;
        
                &::after {
                content: "";
                display: inline-block;
                width: 15px;
                height: 15px;
                position: absolute;
                transform: translateY(-50%);
                right: 30px;       
                top: 50%;
                background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M7.32812 3.0625L11.2656 7L7.32812 10.9375M10.7188 7H2.73438' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
                background-position: center;
                background-repeat: no-repeat;
                background-size: contain;
                }

                &:focus{
                    outline: none;
                }
            }
            .wc-block-components-checkout-place-order-button__text{
                font-size: 14px;
                font-style: normal;
                font-weight: 500;
                line-height: 22px; /* 157.143% */
            }

            .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-components-radio-control__label{
                font-size: 16px;
                font-style: normal;
                font-weight: 600;
                line-height: 28px;
            }

            .wc-block-components-radio-control-accordion-content{
                font-size: 14px;
                font-style: normal;
                font-weight: 400;
                line-height: 26px;
                padding: 0;
                padding-top: 15px;
            }

            .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: none;
            }

            .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 {
                border: none;
                background: none;
            }

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

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

            .wc-block-components-radio-control__option{
                padding-left: 30px;
                padding-top: 0;
                padding-bottom: 0;
            }

            .wc-block-components-radio-control-accordion-option .wc-block-components-radio-control__option {
                border: none;
            }
            
            .wc-block-components-local-pickup-rates-control .wc-block-components-local-pickup-select,
                .wc-block-components-shipping-rates-control__package {
                    .wc-block-components-radio-control {
                        .wc-block-components-radio-control__input {
                            left: 1px;
                            top: 6px;
                            width: 18px;
                            height: 18px;
                        }
                    }
                }

            .wc-block-checkout__terms{
                margin: 0 0 50px;

            }

            .wc-block-components-checkbox__label{
                font-size: 14px;
                font-weight: 400;
                line-height: 26px;
            }

           .wc-block-components-radio-control .wc-block-components-radio-control__input {
                left: 1px;
                width: 18px;
                height: 18px;
            }
        }
        
        @media (min-width: 700px) { 
            .wc-block-checkout__billing-fields .wc-block-components-address-form,
            .wc-block-checkout__shipping-fields .wc-block-components-address-form {
                gap: 0 20px;
            }

            .wc-block-components-form .wc-block-components-text-input, .wc-block-components-text-input {
                margin-top: 20px;
            }
        
        } 
    }
}