/* 
THIS STYLING USE FOR PRODUCT GRID SIDE DRAWER PICKER
*/
.revamp-card-variant-picker{
    z-index: unset;
}
twa-variant-drawer-picker{
    display: block;
    button[data-atc-trigger]{
        appearance: none;
        border: none;
        background: none;
        cursor: pointer;
        padding: 0;
        margin: 0;
        text-align: center;
        text-decoration: none;
        width: 20px;
        height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        svg{
            width: 12px;
            height: 12px;
        }
    }

    .twa-variant__drawer{
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: -1;
        visibility: hidden;

        .twa-variant__drawer-overlay{
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(19, 19, 19, 0.50);
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);
            display: block;
            opacity: 0;
            inset: 0;
            pointer-events: none;
            transform: translate(100%, 0%);
            transition: opacity 0.3s ease-in-out;
        }

        .twa-variant__drawer-innercontent{
            width: 100%;
            max-width: 100%;
            height: 100%;
            max-height: 100dvh;
            position: fixed;
            box-sizing: border-box;
            display: flex;
            flex-direction: column;
            min-height: 0;            
            inset: 100% 0 0 0;
            transition: top 0.3s ease-in-out;

            @media screen and (min-width: 750px) {
                width: 500px;
                inset: 0 -100% 0 auto;
                transition: right 0.3s ease-in-out;
            }

            .twa-variant__drawer-header{  
                flex-shrink: 0;                
                padding: 12px 12px 20px;
                border-bottom: 1px solid #F4F4F4;
                display: flex;
                justify-content: flex-end;
                @media screen and (min-width: 750px) {
                    background: #fff;
                    padding: 6px 15px;
                }

                button{
                    appearance: none;
                    border: none;
                    background: none;
                    cursor: pointer;
                    padding: 0;
                    margin: 0;
                    text-align: center;
                    text-decoration: none;
                    width: 28px;
                    height: 28px;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    svg{
                        width: 14px;
                        height: 14px;
                    }

                    @media screen and (max-width: 750px){
                        border-radius: 9999px;
                        border: 1px solid #FFF;
                        background: rgba(255, 255, 255, 0.80);
                        backdrop-filter: blur(1px);
                    }
                }
            }

            .twa-variant__drawer-productdetails{                
                background: #fff;
                flex: 1 1 auto;
                min-height: 0;
                display: flex;
                flex-direction: column;
                overflow: hidden;
                padding: 32px 0 0;
                @media screen and (min-width: 750px) {
                    padding-top: 32px;
                }

                .twa-variant__drawer-productinfo-inner{
                    flex: 1 1 auto;
                    min-height: 0;
                    overflow-y: auto;
                    -webkit-overflow-scrolling: touch;
                    overscroll-behavior-y: contain;
                    padding-bottom: 12px;
                    scrollbar-width: thin;
                    scrollbar-color: #131313 transparent;
                }

                .twa-variant__drawer-productheader{
                    margin-bottom: 20px;
                    padding-inline: 8px;
                    @media screen and (min-width: 750px) {
                        padding-inline: 12px;
                    }
                    h3{
                        margin: 0;
                        font-size: 12px;
                        line-height: 1.2;
                        @media screen and (min-width: 750px) {
                            font-size: 14px;
                        }
                    }

                    .twa-variant__drawer-productinfo{
                        display: flex;
                        gap: 14px;
                        justify-content: space-between;
                        align-items: center;
                        p{
                            margin: 0;
                            line-height: 1.2;
                            &.twa-variant__drawer-swatchcolor{
                                font-size: 10px;
                                color: #A9A9A9;
                                @media screen and (min-width: 750px) {
                                    font-size: 12px;
                                }
                            }

                            &.twa-variant__drawer-price{
                                color: #131313;
                                font-size: 12px;
                                @media screen and (min-width: 750px) {
                                    font-size: 14px;
                                }
                            }
                        }
                    }
                }

                .twa-variant__drawer-productmedia{
                    display: flex;
                    flex-wrap: nowrap;
                    gap: 2px;
                    min-width: 0;
                    overflow-x: auto;
                    overflow-y: hidden;
                    scrollbar-width: none;
                    -ms-overflow-style: none;
                    cursor: grab;
                    touch-action: pan-x;
                    -webkit-overflow-scrolling: touch;
                    overscroll-behavior-x: contain;
                    scroll-behavior: smooth;
                    padding-left: 8px;
                    height: 280px;
                    @media screen and (min-width: 750px) {
                        padding-left: 12px;
                        height: 410px;
                    }

                    &::-webkit-scrollbar {
                        display: none;
                    }

                    &.twa-variant__drawer-productmedia--dragging {
                        cursor: grabbing;
                        scroll-behavior: auto;
                        -webkit-user-select: none;
                        user-select: none;
                        img {
                            pointer-events: none;
                        }
                    }

                    .twa-variant__drawer-productmedia-item{
                        flex: 0 0 48%;
                        min-width: 48%;
                        max-width: 48%;

                        @media screen and (min-width: 750px) {
                            flex: 0 0 65%;
                            min-width: 65%;
                            max-width: 65%;
                        }

                        img{
                            display: block;
                            width: 100%;
                            height: 100%;
                            object-fit: cover;
                            -webkit-user-drag: none;
                            -webkit-user-select: none;
                            user-select: none;
                        }
                    }
                }

                .twa-variant__drawer-product-actions{
                    flex-shrink: 0;
                    display: flex;
                    flex-direction: column;
                    gap: 16px;
                    margin-top: auto;
                    border-top: 1px solid #F4F4F4;
                    padding-top: 12px;
                    padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
                    padding-inline: 8px;
                    @media screen and (min-width: 750px) {
                        padding-inline: 12px;
                    }
                    button[data-add-to-cart]{
                        padding: 18px;
                        text-transform: uppercase;
                        font-size: 12px;
                        line-height: 1;
                        color: #fff;
                        background: #131313;
                        @media screen and (min-width: 750px) {
                            font-size: 14px;
                        }
                    }

                    button[data-add-to-cart].is-loading{
                        cursor: wait;
                        opacity: 0.88;
                    }

                    a{
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        gap: 6px;
                        line-height: 1.1;
                        font-size: 10px;
                        text-decoration: none;
                        margin-inline: auto;
                        color: #131313;
                        border-bottom: 1px solid #131313;
                        width: fit-content;
                        @media screen and (min-width: 750px) {
                            font-size: 12px;
                        }
                    }
                }
            }
        }
    }

    /* Class is on the host element (see twa-global.js), not a descendant */
    &.twa-variant__drawer-open {
        .twa-variant__drawer {
            visibility: visible;
            z-index: 100001;
        }
        .twa-variant__drawer-overlay {
            transform: translate(0%, 0%);
            opacity: 1;
            pointer-events: auto;
            z-index: 1;
        }
        .twa-variant__drawer-innercontent {
            top: 0%;
            z-index: 2;
            @media screen and (min-width: 750px) {
                right: 0.5%;
            }
        }
    }

    /* SWATCH PICKER */
    .twa-variant__drawer-product-variants{
        margin-top: 20px;
        padding-inline: 8px;
        @media screen and (min-width: 750px) {
            padding-inline: 12px;
        }
        .twa-product__swatch-picker{
            display: flex;
            flex-direction: column;
            gap: 24px;
        }
        .twa-product__swatch-footwear,
        .twa-product__swatch-clothing{
            .twa-product__swatch-picker-color{
                p[data-selected-color]{
                    margin-top: 0;
                    margin-bottom: 12px;
                    font-size: 12px;
                    color: #131313;
                }

                .twa-product__swatch-picker-color-list{
                    display: flex;
                    gap: 1px;
                    overflow-y: auto;
                    -webkit-overflow-scrolling: touch;
                    overscroll-behavior-y: contain;
                    scrollbar-width: none;
                    -ms-overflow-style: none;
                    margin-right: -8px;
                    @media screen and (min-width: 750px) {
                        margin-right: -12px;
                    }
                    &::-webkit-scrollbar {
                        display: none;
                    }

                    &.twa-footwear-swatch-list--loading{
                        position: relative;
                        min-block-size: 48px;
                        pointer-events: none;
                    }

                    &.twa-footwear-swatch-list--loading::before{
                        content: "";
                        position: absolute;
                        inset: 0;
                        z-index: 2;
                        background: rgba(255, 255, 255, 0.72);
                    }

                    &.twa-footwear-swatch-list--loading::after{
                        content: "";
                        position: absolute;
                        z-index: 3;
                        inset-block-start: 50%;
                        inset-inline-start: 50%;
                        inline-size: 20px;
                        block-size: 20px;
                        border: 2px solid #f4f4f4;
                        border-block-start-color: #131313;
                        border-radius: 50%;
                        transform: translate(-50%, -50%);
                        animation: twa-footwear-swatch-spin 0.65s linear infinite;
                    }

                    button{
                        appearance: none;
                        border: none;
                        background: #f6f6f6;
                        cursor: pointer;
                        padding: 0;
                        margin: 0;
                        object-fit: cover;
                        flex-shrink: 0;
                        width: calc(100%/6.5);
                        border-bottom: 1px solid transparent;

                        img{
                            width: 100%;
                            height: 100%;
                            display: block;
                        }

                        &.twa-product__color-swatchactive{
                            border-color: #131313;
                        }
                    }

                    &.twa-product__swatch-clothing{
                        button{                            
                            width: calc(100%/7.5);
                            height: 80px;
                            position: relative;
                            @media screen and (min-width: 750px) {
                                height: 92px;
                            }

                            img{
                                object-fit: contain;
                                object-position: bottom;
                            }

                            svg{
                                position: absolute;
                                top: 3px;
                                right: 3px;
                            }
                        }
                    }
                }
            }
            .twa-product__swatch-picker-option{
                .twa-product__swatch-picker-header{
                    display: flex;
                    align-items: center;
                    justify-content: space-between;
                    gap: 12px;
                    margin-bottom: 12px;

                    p[data-selected-size]{
                        font-size: 12px;
                        color: #131313;
                        margin: 0;
                        line-height: 1.1;
                    }

                    .twa-sidemodal-btn{
                        appearance: none;
                        -webkit-appearance: none;
                        background: transparent;
                        border: none;
                        cursor: pointer;
                        text-transform: capitalize;
                        text-decoration: underline;
                        padding: 0;
                        font-size: 12px;
                        color: #131313;
                    }
                }
                .twa-product__option-list{
                    display: grid;
                    grid-template-columns: repeat(6, 1fr);
                    border-left: 1px solid #F4F4F4;
                    label{
                        position: relative;
                        display: block;
                        font-size: 11px;
                        text-align: center;
                        padding: 12px;
                        border-top: 1px solid #f4f4f4;
                        border-left: 1px solid transparent;
                        border-right: 1px solid #F4F4F4;
                        border-bottom: 1px solid #F4F4F4;
                        line-height: 1.1;
                        color: #131313;
                        cursor: pointer;
                        touch-action: manipulation;
                        -webkit-tap-highlight-color: transparent;
                        input{
                            position: absolute;
                            inset: 0;
                            width: 100%;
                            height: 100%;
                            margin: 0;
                            opacity: 0;
                            cursor: pointer;
                            appearance: none;
                            z-index: 1;
                        }
    
                        &.active,
                        &:hover{
                            border: 1px solid #131313;
                        }

                        &.twa-product__option-soldout{
                            background: #fafafa;
                            color: #C2C2C2;
                            cursor: not-allowed;
                            border: 1px solid #f4f4f4;
                        }
                    }
                }
    
                .twa-product__size-region-switcher{
                    margin-bottom: 12px;
                    padding: 2px;
                    border: 1px solid #F4F4F4;
                    display: flex;
                    gap: 6px;
                    width: fit-content;
                    button{
                        width: 35px;
                        font-size: 11px;
                        appearance: none;
                        border: none;
                        background: none;
                        cursor: pointer;
                        padding: 0;
                        margin: 0;
                        color: #C2C2C2;
                        padding: 5px 8px;
                        position: relative;
                        &.twa-region_active,
                        &:hover{
                            color: #fff;
                            background: #131313;
                        }

                        svg{
                            position: absolute;
                            top: 3px;
                            right: 3px;
                        }
                    }
                }
            }
        }
    }
}

.twa-sidemodal-sizeguide{
    &.twa-sidemodal-outercontainer{
        position: relative;
    
        &.twa-sidemodal-contentonly{
            &.twa-sidemodal-active{
                .twa-sidemodal-contents-outer{
                    @media screen and (max-width: 750px){
                        transform: translateY(0);
                    }
                }
            }
            & .twa-sidemodal-contents-outer{
                @media screen and (max-width: 749px){
                    height: auto;
                    top: unset;
                    bottom: 0;
                }
            }
            & .twa-sidemodals-header{
                padding: 20px 15px;
                margin: 0;
                @media screen and (min-width: 750px){
                    padding: 24px 15px;
                }
                
                h2{
                    text-transform: uppercase;
                    margin: 0;
                    font-weight: 500;
                    font-size: 12px;
                    color: #131313;
                    line-height: 1;
                    letter-spacing: 0;
                    @media screen and (min-width: 750px){
                        font-size: 14px;
                    }
                }
            }
        }
        &.twa-sidemodal-active{
            display: block;
            .twa-sidemodal-overlay{
                display: block;
            }
            .twa-sidemodal-contents-outer{
                transform: translateY(25%);
                @media screen and (min-width: 750px){
                    transform: translateX(0) translateY(0);
                }
            }
    
            .twa-sidemodal-btnclose{
                &.twa-mobile{
                    display: flex;
                    @media screen and (min-width: 750px){
                        display: none;
                    }
                }
            }
        }
    
        .twa-sidemodal-btnclose{
            display: flex;
            align-items: center;
            justify-content: center;
            width: 16px;
            height: 16px;
            z-index: 99999;
            padding: 3px;
            position: unset;

            svg{
                width: 14px;
                height: 14px;
            }
            @media screen and (min-width: 750px){         
                width: 28px;
                height: 28px;
            }
            &.twa-mobile{
                @media screen and (min-width: 750px){
                    display: none;
                }
            }
            &.twa-desktop{
                position: absolute;
                display: none;
                @media screen and (min-width: 750px){
                   display: flex;
                }
            }
        }
    
        button{
            appearance: none;
            -webkit-appearance: none;
            background: transparent;
            border: none;
            cursor: pointer;
        }
    
        .twa-sidemodal-overlay{
            background: rgba(19, 19, 19, 0.50);
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);
            cursor: pointer;
            display: none;
            width: 100%;
            height: 100%;
            z-index: 99999;
            position: fixed;
            top: 0;
            left: 0;
        }
    
        .twa-sidemodals-header{
            padding: 10px;
            position:relative;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 32px;
            overflow-x: auto;
            background: #FAFAFA;
            margin: 0 !important;
            @media screen and (min-width: 750px){
                gap: 45px;
                padding: 12px 24px;
            }

            h2{
                margin: 0;
                font-size: 10px;
                font-weight: 500;
                @media screen and (min-width: 750px){
                    font-size: 14px;
                }
            }
        }
    
        .twa-sidemodal-contents-outer{
            max-width: 100%;
            width: 100%;
            height: 100%;
            background-color: #fff;
            position: fixed;
            z-index: 999999;
            transition: transform 0.3s ease-in-out;
            top: 0;
            right: 0;
            transform: translateY(100%);
            @media screen and (min-width: 750px){
                width: 500px;
                margin-left: auto;            
                transform: translateX(100%) translateY(0);
            }
    
            .twa-sidemodals-contents{
                border-top: 1px solid #f4f4f4;
                position: relative;
                height: 100%;
    
                .twa-sidemodals-innercontent{
                    padding: 32px 15px;
                    display: none;
                    z-index: 1;
                    font-size: 12px;
                    color: #131313;
                    max-height: 70vh;
                    overflow-y: auto;
                    @media screen and (min-width: 750px){
                        max-height: 95vh;
                        max-height: 95dvh;
                    }      
    
                    a{
                        color: inherit;
                        font-weight: 500;
                    }
    
                    ul{
                        padding-left: 14px;
                        margin: 0;
                    }
                    
                    @media screen and (min-width: 750px){
                        padding: 42px 15px;
                    }
    
                    &.twa-tabactivecontents,
                    &.twa-uspcontentsonly{
                        display: block;
                        @media screen and (max-width: 749px){
                            padding: 24px 15px;
                        }
    
                        p{
                            margin: 0;
                            &:not(:last-child){
                                margin-bottom: 10px;
                            }
                        }
                        ul{
                            padding-left: 14px;
                            margin: 0;
                        }
                    }
    
                    .metafield-rich_text_field{
                        line-height: 1.2;
                        font-size: 12px;
                        color: #131313;
                        p{
                            margin: 0;
                            &:not(:last-child){
                                margin-bottom: 10px;
                            }
                        }
                        ul{
                            padding-left: 14px;
                            margin: 0;
                        }
                    }
                }
            }

            .twa-sizechart{
                @media screen and (min-width: 750px){
                    padding: 32px 24px;
                }

                .twa-sizechart-switcher{
                    display: flex;
                    align-items: center;
                    justify-content: space-between;
                    gap: 12px;
                    padding: 10px 0;
                    p{
                        margin: 0;
                        font-weight: 500;
                        font-size: 12px;
                        @media screen and (min-width: 750px){
                            font-size: 14px;
                        }
                    }

                    .twa-sizechart-switcher-options{
                        display: flex;
                        gap: 7px;

                        .twa-sizechart-switcher-unit{                            
                            display: flex;
                            align-items: center;
                            padding: 3px;
                            border: 1px solid #F4F4F4;
                            background: #FAFAFA;
                            button{
                                text-align: center;
                                text-transform: uppercase;
                                padding: 11px 8px;
                                appearance: none;
                                -webkit-appearance: none;
                                background: transparent;
                                border: none;
                                cursor: pointer;
                                font-weight: 400;
                                font-size: 11px;
                                width: 40px;
                                &.twa-sizechart-switcher-unit-btn-active{
                                    background: #131313;
                                    color: #fff;
                                }
                            }
                        }

                        .twa-sizechart-switcher-select{
                            position: relative;
                            &[open]{
                                summary{
                                    svg{
                                        transform: rotate(180deg);
                                    }
                                }
                            }
                            summary{
                                display: flex;
                                align-items: center;
                                gap: 6px;
                                padding: 10px;                                
                                border: 1px solid #F4F4F4;
                                background: #FAFAFA;
                                line-height: 1.2;
                                height: 100%;
                                @media screen and (min-width: 750px){
                                    padding: 10px;
                                    font-size: 12px;
                                }
                            }
                            ul{
                                position: absolute;
                                top: 100%;
                                left: 0;
                                width: 100%;
                                background: #fff;
                                border: 1px solid #F4F4F4;
                                padding: 10px;
                                list-style: none;
                                margin: 6px 0 0;
                                padding: 2px;

                                button{
                                    padding: 10px;
                                    text-align: center;
                                    width: 100%;
                                    @media screen and (min-width: 750px){
                                        padding: 10px;
                                        font-size: 12px;
                                    }

                                    &.twa-sizechart-switcher-unit-btn-active{
                                        border: 1px solid #000;
                                    }
                                }
                            }
                        }
                    }
                }

                .twa-sizechart-inner-container{
                    display: flex;
                    flex-direction: column;
                    gap: 22px;
                    padding: 0 10px;
                    @media screen and (min-width: 750px){
                        gap: 24px;
                        padding: 0;
                    }
                }

                .twa-sizechart-table{
                    display: block;
                    p:first-child{
                        display: none;
                    }

                    table + p{
                        font-size: 10px;
                        line-height: 1.2;
                        color: #939393;
                        @media screen and (min-width: 750px){
                            font-size: 12px;
                        }
                    }

                    table{
                        border-color: #f4f4f4;
                        box-shadow: 0 0 0 1px #f4f4f4;
                        tr{
                            font-size: 10px;
                            line-height: 1;
                            &:first-child{
                                td{
                                    font-weight: 500;
                                    text-transform: uppercase;
                                    background: #fafafa;
                                    height: 38px;
                                    @media screen and (min-width: 750px){
                                        height: 42px;
                                    }
                                }
                            }

                            td{                                
                                border-color: #f4f4f4;
                                height: 42px;                                
                                text-align: center;
                                &:first-child{
                                    font-weight: 500;
                                    text-transform: uppercase;
                                    background: #fafafa;
                                }
                                @media screen and (min-width: 750px){
                                    height: 45px;
                                }
                            }
                            @media screen and (min-width: 750px){
                               font-size: 12px;
                            }
                        }
                    }
                }
            }
        }
    }

    .twa-sizemodal-innercontents{
        .twa-sizemodalinner-btn{
            padding: 13px 16px;
            border: 1px solid #F4F4F4;
            display: flex;
            justify-content: space-between;
            gap: 12px;
            width: 100%;
            font-weight: 500;
            font-size: 12px;
            span{
                width: calc(100% - 28px);
                display: inline-block;
                text-align: left;
            }
            svg{
                width: 16px;
                height: 16px;
            }
        }

        .twa-sizemodalsub-outer{
            position: absolute;
            width: 100%;
            height: 100%;
            top: 0;
            left: 0;
            background: #fff;
            z-index: 2;
            transition: transform 0.3s ease-in-out;
            transform: translateY(100%);
            @media screen and (min-width: 750px){
                transform: translateX(100%) translateY(0);          
            }
            &.twa-sizemodalsub-outer-active{                
                transform: translateY(0%);
                @media screen and (min-width: 750px){
                    transform: translateX(0) translateY(0);
                }
            }
            .twa-sizemodalsub-header{
                background: #FAFAFA;
                display: grid;
                align-items: center;
                grid-template-columns: auto 1fr auto;
                padding: 10px;
                @media screen and (min-width: 750px){
                    padding: 12px 24px;
                }
                .twa-sizemodalsub-back{
                    padding: 0;
                    @media screen and (min-width: 750px){
                        width: 28px;
                        height: 28px;
                    }
                    svg{
                        transform: rotate(-180deg);
                        width: 14px;
                    }
                }

                h3{
                    margin: 0;
                    font-weight: 500;
                    text-transform: uppercase;
                    text-align: center;
                    font-size: 10px;
                    @media screen and (min-width: 750px){
                        font-size: 14px;
                    }
                }
            }
            
            .twa-sizemodalsub-content{
                padding: 32px 10px;
                max-height: 65dvh;
                overflow-y: auto;
                @media screen and (min-width: 750px){
                    padding: 32px 24px;
                    max-height: 88dvh;
                }

                .twa-sizemodalsub-content-list{
                    display: flex;
                    flex-direction: column;
                    gap: 28px;
                    .twa-sizemodalsub-content-item{
                        display: flex;
                        gap: 12px;
                        .twa-submodal-index{
                            width: 24px;
                            height: 24px;
                            background: #131313;
                            font-size: 12px;
                            font-weight: 500;
                            margin: 0;
                            color: #fff;
                            display: flex;
                            align-items: center;
                            justify-content: center;
                        }
                        .twa-submodal-content{
                            width:calc(100% - 36px);
                            h4{
                                margin:0 0 6px;
                                font-size: 12px;
                                font-weight: 500;
                                text-transform: uppercase;
                                line-height: 1.2;
                                @media screen and (min-width: 750px){
                                    font-size: 14px;
                                }
                            }
                            .twa-submodal-content-text{
                                font-size: 10px;
                                line-height: 1.2;
                                @media screen and (min-width: 750px){
                                    font-size: 12px;
                                }
                            }
                        }
                    }
                }

                .twa-sizemodalsub-content-image{
                    img{
                        width: 100%;
                        height: auto;
                        max-width: 100%;
                    }
                }

                &.twa-sizemodalsub-withimage{
                    display: flex;
                    gap: 18px;

                    .twa-sizemodalsub-content-list{
                        width: 45%;
                    }

                    .twa-sizemodalsub-content-image{
                        width: 54%;
                    }
                }
            }
        }
    }
}

@keyframes twa-footwear-swatch-spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}