.editor{
    margin: 0;
    padding: 0;
    font-family: 'Oswald', sans-serif;
    font-size: 20px;
    font-weight: 400;
    box-sizing: border-box;

    min-height: 90vh;
    height: 100%;
}
.editor *{
    font-family: 'Oswald', sans-serif;
    box-sizing: border-box;
}
.editor::after, .editor::before{
    box-sizing: inherit;
}
.editor p, .editor h1, .editor h2, .editor h3, .editor h4, .editor h5, .editor h6{
    margin: 0;
}

/* Main */
.editor .editorContainer{
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    padding: 0px;
    overflow: hidden;

    padding: 0px;
}

/* Sidebar */
.editor .sidebar{
    display: flex;
    flex-direction: column;
    row-gap: 46px;
    margin-right: 0px;
    position: relative;

    padding-right: 10px;
}
.editor .sidebar::before{
    content: '';
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    background-color: #ffffff99;
    visibility: hidden;
    opacity: 0;
}
.editor .popup.shirtActive ~ .editorContainer .sidebar::before{
    animation: fadeIn 250ms ease-in-out forwards;
}
.editor .popup.popupOut ~ .editorContainer .sidebar::before{
    animation: fadeOut 250ms ease-in-out forwards;
}
.editor .side__bx{
    display: flex;
    flex-direction: column;
    row-gap: 10px;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: none;
    outline: none;
    padding: 0;
    cursor: pointer;

    display: none;
}
.editor .side__bx.active{
    display: flex;
}
.editor .side__iconBx{
    display: flex;
}
.editor .side__icon{
    width: 64px;
}
.editor .side__desc{
    font-size: 24px;
    font-weight: 400;
}

/* SVG */
.editor .editorCanvas{
    width: 100%;
    height: 100%;
    border: 2px dotted #ab0d09;
}

.editor .editor__shirtSvg{
    transition: height 250ms ease-in-out;
}

/* POPUP */
.editor .popup{
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 100dvh;
    background-color: white;
    z-index: 50;
    display: grid;

    opacity: 0;
    visibility: hidden;
    scale: 0.6;
}
.editor .popup__container{
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;

    display: none;
}
.editor .popup.popupActive{
    animation: zoomFadeIn 250ms ease-in-out forwards;
}
.editor .popup.popupOut{
    animation: zoomFadeOut 250ms ease-in-out forwards;
}
.editor .popup.imageActive .popup__container.popupImage{
    display: flex;
}
.editor .popup.textActive .popup__container.popupText{
    display: flex;
}
.editor .popup.shirtActive{
    height: 40%;
    min-height: 400px;
}
.editor .popup.shirtActive ~ .editorContainer .editor__shirtSvg{
    height: 50%;
}
.editor .popup.popupOut ~ .editorContainer .editor__shirtSvg{
    height: 797px;
}
.editor .popup.patternActive .popup__container.popupPattern{
    display: flex;
}
.editor .popup.patternColorActive .popup__container.popupPatternColor{
    display: flex;
}

.editor .popup__title{
    font-size: 42px;
    margin-block: -60px 50px;

    line-height: 50px;
}
.editor .popup__btnBx{
    display: flex;
    flex-direction: row;
    column-gap: 28px;
    align-items: center;
    justify-content: center;
    margin-top: 40px;
}
.editor .popup__btn{
    font-size: 20px;
    padding: 10px 32px;
    border: 2px solid #ab0d09;
    cursor: pointer;
    transition: color 200ms ease-in-out, background-color 200ms ease-in-out;
}
.editor .popup__btn.btnLeave,
.editor .popup__btn.btnGoBack{
    background-color: white;
    color: #ab0d09;
}
.editor .popup__btn.btnLeave:hover,
.editor .popup__btn.btnGoBack:hover{
    background-color: #ab0d09;
    color: white;
}
.editor .popup__btn.btnConfirm{
    background-color: #ab0d09;
    color: white;
}
.editor .popup__btn.btnConfirm:disabled{
    background-color: #6c0b09;
    border-color: #6c0b09;
}
.editor .popup__btn.btnConfirm:not(:disabled):hover{
    background-color: white;
    color: #ab0d09;
}

.popup__btn.btnPatternConfirm{
    opacity: 0;
    visibility: hidden;
}


/* Image Grid */
.editor .popup__imageGrid{
    display: flex;
    width: 80%;
    max-height: calc(110px + 16px);
    margin-block: 6px 22px;
}
.editor .popup__imageGrid.loaderActive .popup__imageGridLoader{
    display: flex;
}
.editor .popup__imageGrid.loaderActive .popup__imageGridContainer{
    display: none;
}

.editor .popup__imageGridContainer{
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    width: 100%;
    gap: 16px 18px;
    height: 100%;
    
    overflow-x: hidden;
    overflow-y: auto;
}
.editor .popup__imageGridBx{
    display: flex;
    width: 100%;
    height: 100%;
    max-width: 110px;

    background-color: transparent;
    border: none;
    outline: none;
    padding: 0;
}
.editor .popup__imageGridImg{
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: pointer;
}

.editor .popup__imageGridLoader{
    height: 100%;
    width: 100%;
    display: flex;

    display: none;
}
.editor .popup__imageGridLoader img{
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Image Popup */
.editor .popup__container.popupImage.imgActive .popup__fileLabel{
    display: none;
}
.editor .popup__container.popupImage.imgActive .popup__imgPreview{
    display: flex;
}
.editor .popup__container.popupImage.imgActive .popup__imageRemoveBackground{
    display: flex;
}

/* .editor .popup__container.popupImage.imgActive .popup__imageGridContainer{
    display: none;
}
.editor .popup__container.popupImage.loaderActive .popup__imageGridLoader{
    display: flex;
}
.editor .popup__container.popupImage.loaderActive .popup__imageGridContainer{
    display: none;
} */

.editor .popup__imageBx{
    display: flex;
    flex-direction: column;
    position: relative;
}
.editor .popup__imageInputBx{
    display: flex;
    column-gap: 20px;
}
.editor .popup__imageUploadInput{
    width: 700px;
    height: 275px;
    display: flex;
    flex-direction: column;
    row-gap: 16px;
    align-items: center;
    justify-content: center;
    position: relative;
}
.editor .popup__fileInput{
    opacity: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 50;
    cursor: pointer;
}
.editor .popup__fileLabel{
    width: 100%;
    height: 100%;
    border: 2px dotted #ab0d09;
    display: flex;
    flex-direction: column;
    row-gap: 14px;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}
.editor .popup__labelImg{
    width: 128px;
}
.editor .popup__imgPreview{
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: none;
}
.editor .popup__imageError{
    display: none;
    font-size: calc(1em - 1px);
    color: #ab0d09;
}

.editor .popup__imageRemoveBackground{
    display: flex;
    flex-direction: column;
    justify-content: center;
    row-gap: 10px;

    display: none;
}
.editor .popup__imageBgInputBx{
    display: flex;
    column-gap: 8px;
    align-items: center;
}


.popup__imageBgInputBox{
    display: flex;
    align-items: center;
    justify-content: center;
    column-gap: 1ch;
}

.editor .popup__imageBgLabel{
    font-size: 18px;
    font-weight: 500;
    color: black;
}
.editor .popup__imageBgLabel span{
    color: #ab0d09;
}
.editor .popup__imageBgDesc{
    font-size: 16px;
    font-weight: 300;
}

/* Ai popup */
.editor .popup__aiTextBx{
    display: flex;
    flex-direction: column;
    row-gap: 10px;
}
.editor .popup__aiTextBx .popup__title{
    line-height: 1.3;
    margin: 0;
}
.editor .popup__aiTextBx .popup__description{
    text-align: center;
    font-size: 20px;
}
.editor .popup__aiInputBx{
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 400px;
}
.editor .popup__aiInput{
    width: 100%;
    min-height: 48px;
    font-size: 18px;
    padding-inline: 20px;
    border: 2px solid black;
    outline: none;
    height: 48px;
    margin-top: 12px;
}
.editor .popup__aiInputError{
    font-size: 18px;
    font-weight: 400;
    color: #ab0d09;

    display: none;
}
.editor .popup__aiImgPreview{
    width: 100%;
    height: 100%;
    max-height: 400px;
    object-fit: contain;
    margin-top: 24px;

    display: none;
}

.editor .popup.aiActive .popup__container.popupAi{
    display: flex;
}
.editor .popup__container.popupAi.inputError .popup__aiInputError{
    display: block;
}

.editor .popup__container.popupAi.previewActive .popup__aiInput,
.editor .popup__container.popupAi.previewActive .popup__description,
.editor .popup__container.popupAi.previewActive .popup__imageGrid.popupAiGrid{
    display: none;
}
.editor .popup__container.popupAi.previewActive .popup__aiImgPreview{
    display: flex;
}

/* Login Failed Popup */
.editor .popup.failedActive .popup__container.popupFailed{
    display: flex;
}
.editor .popup.failedActive .popup__btn.btnConfirm,
.editor .popup.failedActive .popup__imageGrid.popupFailedGrid{
    display: none;
}
.editor .popup.failedActive .popup__btn.btnConfirm.activeButton{
    display: block;
}
.editor .popup.failedActive .popup__imageGrid.popupFailedGrid.activeGrid{
    display: flex;
}

/* Text popup */
.editor .popup__textInput{
    width: 100%;
    max-width: 500px;
    min-height: 100px;
    font-size: 20px;
    padding: 10px 20px;
    border: 2px solid black;
    outline: none;

    height: 100px;
}
.editor .popup__textSel{
    display: flex;
    flex-direction: row;
    column-gap: 70px;
    justify-content: center;
    margin-block: 32px 12px;
}
.editor .popup__selBx,
.editor .popup__patternColorChoose{
    display: flex;
    flex-direction: column;
    row-gap: 14px;
}
.editor .popup__selTitle,
.editor .popup__patternColorTitle{
    font-size: 26px;
    font-weight: 400;
    text-align: center;
}
.editor .popup__selColorBx,
.editor .popup__patternColorBx{
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(13, 1fr);
    grid-auto-rows: 40px;
    max-height: calc((40px + 6px) * 4 - 3px);
    overflow-x: hidden;
    overflow-y: auto;
}
.editor .popup__selColor,
.editor .popup__patternColor{
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: border-radius 200ms ease-in-out;

    border: 1px solid #ececec;
}
.editor .popup__selColor.selectedColor,
.editor .popup__patternColor.selectedColor{
    border-radius: 50%;
}

.editor .popup__selFontBx{
    display: grid;
    gap: 10px 20px;
    grid-template-columns: repeat(2, 1fr);
    font-size: 20px;
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
}
.editor .popup__selFont{
    display: inline-block;
    width: 180px;
    white-space: nowrap;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
            line-clamp: 1; 
    -webkit-box-orient: vertical;
    line-height: 2;
    height: 2em;
    cursor: pointer;
    transition: color 200ms ease-in-out;
}
.editor .popup__selFont.selectedFont{
    color: #ab0d09;
}

.editor .popup__selAlignButton{
    border: 2px solid #ab0d09;
    background-color: #ab0d09;
    color: white;
    font-size: calc(1em - 1px);
    padding: 4px 16px;
    cursor: pointer;
    transition: color 200ms ease-in-out, background-color 200ms ease-in-out;
}
.editor .popup__selAlignButton.selectedAlign{
    background-color: white;
    color: #ab0d09;
}

/* Custom Scrollbar */
.editor .customScrollbar::-webkit-scrollbar{
    width: 12px;
}
.editor .customScrollbar::-webkit-scrollbar-track{
    background: #e9e9e9;
}
.editor .customScrollbar::-webkit-scrollbar-thumb{
    background: #999999;
    border-inline: 3px solid #e9e9e9;
}
.editor .customScrollbar::-webkit-scrollbar-thumb:hover{
    background: #666666;
}

/* Patterns Popup */
.editor .popup__container.popupPattern{
    padding-inline: 100px;
    min-height: 100%;
    height: 100%;
}
.editor .popup__container.popupPattern .popup__title{
    margin-top: 0;
}
.editor .popup__patternContainer{
    display: grid;
    width: 100%;
    height: auto;
    overflow: hidden;
    margin-bottom: auto;
}

.editor .popup__patternContainer.activeCategories .popup__categories{
    animation: fadeIn 250ms ease-in-out forwards;
}
.editor .popup__patternContainer.activePatterns .popup__categories{
    animation: fadeOut 250ms ease-in-out forwards;
}
.editor .popup__patternContainer.activeCategories .popup__patterns{
    animation: fadeOut 250ms ease-in-out forwards;
}
.editor .popup__patternContainer.activePatterns .popup__patterns{
    animation: fadeIn 250ms ease-in-out forwards;
}

.editor .popup__patternContainer.showPatterns .popup__categories{
    opacity: 0;
    visibility: hidden;
}
.editor .popup__patternContainer.showPatterns .popup__patterns{
    opacity: 1;
    visibility: visible;
}
.editor .popup__patternContainer.showPatterns .popup__patternBx{
    display: contents;
}
.editor .popup__patternContainer.showPatterns .popup__patternBx .popup__pattern{
    display: none;
}

.editor .popup__categories{
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 28px 24px;
    align-items: flex-start;
    grid-row: 1;
    grid-column: 1;

    overflow-x: hidden;
    overflow-y: auto;
}
.editor .popup__category{
    display: flex;
    flex-direction: column;
    row-gap: 10px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background-color: transparent;
    padding: 0;
    border: none;
    outline: none;
}
.editor .popup__categoryImgBx{
    width: 100%;
    height: 275px;
    padding: 22px 20px;
    background-color: rgb(217, 217, 217);
}
.editor .popup__categoryImg{
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: scale 200ms ease-in-out;
}
.editor .popup__category:hover .popup__categoryImg{
    scale: 0.9;
}
.editor .popup__categoryName{
    font-size: 22px;
    font-weight: 400;
    word-break: break-word;
}

.editor .popup__patterns{
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 28px 24px;
    align-items: flex-start;
    grid-row: 1;
    grid-column: 1;

    overflow-x: hidden;
    overflow-y: auto;

    opacity: 0;
    visibility: hidden;
}
.editor .popup__patternBx{
    display: none;
}
.editor .popup__patternBx.activePatterns{
    display: contents;
}
.editor .popup__pattern{
    height: 200px;
    background-color: rgb(217, 217, 217);
    padding: 10px 8px;
    border: none;
    outline: none;
    cursor: pointer;
}
.editor .popup__pattern.active{
    display: block !important;
}
.editor .popup__patternImg{
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: scale 200ms ease-in-out;
}
.editor .popup__pattern:hover .popup__patternImg{
    scale: 0.9;
}

.editor .popup__patternInput{
    width: 100%;
    max-width: 300px;
    min-height: 48px;
    font-size: 18px;
    padding-inline: 20px;
    border: 2px solid black;
    outline: none;
    height: 48px;

    margin-bottom: 44px;
}
.editor .popup__container.popupPattern .popup__title{
    margin-bottom: 22px;
}

/* Popup Draft */
.editor .popup.draftActive .popup__container.popupDraft{
    display: flex;
}

.editor .popup__container.popupDraft{
    min-height: 100%;
    height: 100%;
}
.editor .popupDraft .popup__title{
    margin-top: 0;
}
.editor .popup__draftContainer{
    display: grid;
    width: 100%;
    height: auto;
    overflow: hidden;
    margin-bottom: auto;
}
.editor .popup__draftImages{
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 28px 24px;
    align-items: flex-start;
    overflow-x: hidden;
    overflow-y: auto;
}
.editor .popup__draft{
    width: 100%;
    max-height: 250px;
    height: 100%;
    cursor: pointer;

    background-color: transparent;
    border: none;
    outline: none;
}
.editor .popup__draftImg{
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: scale 200ms ease-in-out;
}
.editor .popup__draftImg:hover{
    scale: 0.95;
}


@keyframes zoomFadeIn {
    0%{
        opacity: 0;
        visibility: hidden;
        scale: 0.6;
    }
    1%{
        opacity: 0;
        visibility: visible;
        scale: 0.6;
    }
    100%{
        opacity: 1;
        visibility: visible;
        scale: 1;
    }
}

@keyframes zoomFadeOut {
    0%{
        opacity: 1;
        visibility: visible;
        scale: 1;
    }
    99%{
        opacity: 0;
        visibility: visible;
        scale: 0.6;
    }
    100%{
        opacity: 0;
        visibility: hidden;
        scale: 0.6;
    }
}

@keyframes fadeIn {
    0%{
        opacity: 0;
        visibility: hidden;
    }
    1%{
        opacity: 0;
        visibility: visible;
    }
    100%{
        opacity: 1;
        visibility: visible;
    }
}

@keyframes fadeOut {
    0%{
        opacity: 1;
        visibility: visible;
    }
    99%{
        opacity: 0;
        visibility: visible;
    }
    100%{
        opacity: 0;
        visibility: hidden;
    }
}

/* Summary Section */
.editor .summary{
    height: 100%;
    display: flex;
    flex-direction: column;
    row-gap: 10px;
    margin-left: auto;
}
.sum__btn{
    align-self: flex-end;
    width: 100%;
    font-size: 20px;
    padding: 10px 20px;
    background-color: #ab0d09;
    border: 2px solid #ab0d09;
    color: white;
    outline: none;
    cursor: pointer;
    transition: color 200ms ease-in-out, background-color 200ms ease-in-out;
}
.editor .sum__btn:hover{
    background-color: white;
    color: #ab0d09;
}

/* Breakpoints */
@media only screen and (max-height: 38em){
    .editor .sidebar{
        grid-template-columns: repeat(2, 1fr);
        gap: 34px;
        margin-right: 30px;
    }
}

@media only screen and (min-width: 35em){
    .editor .popup__selColorBx,
    .editor .popup__patternColorBx{
        grid-template-columns: repeat(13, 1fr);
    }
}

@media only screen and (max-width: 84em){
    .editor .popup__categories{
        grid-template-columns: repeat(4, 1fr);
    }
    .editor .popup__patterns{
        grid-template-columns: repeat(4, 1fr);
    }
    .editor .popup__categoryImgBx{
        height: 224px;
    }
    .editor .popup__title{
        font-size: 40px;
        margin-bottom: 36px;
    }
    .editor .popup__categoryName{
        font-size: 21px;
    }

    .editor .popup__container.popupPattern .popup__title{
        margin-bottom: 22px;
    }
    .editor .popup__patternInput{
        margin-bottom: 44px;
    }
}

@media only screen and (min-width: 62.0625em) and (max-width: 72em){
    .editor .popup__selColorBx,
    .editor .popup__patternColorBx{
        grid-template-columns: repeat(8, 1fr);
    }
}


@media only screen and (max-width: 62em), (max-height: 38em){
    .editor .editorContainer{
        justify-content: flex-start;
    }
    
    /* Popups */
    .editor .popup__imageUploadInput{
        height: inherit;
    }

    .editor .popup__selColorBx,
    .editor .popup__patternColorBx{
        grid-auto-rows: 32px;
        max-height: calc((32px + 4px) * 4 - 2px);
        gap: 2px;
    }
    .editor .popup__selColor,
    .editor .popup__patternColor{
        width: 25px;
        height: 25px;
    }
    .editor .popup__textSel{
        margin-block: 22px 8px;
    }
    .editor .popup__selFont{
        font-size: 16px;
        width: 120px;
    }

    .editor .popup__categoryImgBx{
        height: 144px;
        padding: 10px;
    }
    .editor .popup__pattern{
        height: 152px;
        padding: 10px;
    }
    .editor .popup__categories{
        gap: 16px 14px;
        margin-top: 16px;
        grid-template-columns: repeat(5, 1fr);
    }
    .editor .popup__patterns{
        grid-template-columns: repeat(5, 1fr);
        gap: 16px 14px;
    }
    .editor .popup__categoryName{
        font-size: 20px;
    }

    .editor .popup.shirtActive{
        height: 100%;
    }
    .editor .popup.shirtActive ~ .editorContainer .editor__shirtSvg{
        scale: 1;
        top: 0;
    }

    .editor .popup__title{
        font-size: 32px;
        margin-block: 0;
        margin-bottom: 20px;
    }
    .editor .popup__btnBx{
        margin-top: 28px;
        column-gap: 20px;
    }
    .editor .popup__btn{
        padding: 6px 28px;
    }
    .editor .popup__selBx,
    .editor .popup__patternColorChoose{
        row-gap: 10px;
    }
    .editor .popup__selTitle,
    .editor .popup__patternColorTitle{
        font-size: 22px;
    }
    .editor .popup__imageGrid{
        max-height: calc(100px + 16px);
        margin-block: 16px 26px;
    }
    .editor .popup__imageGridContainer{
        grid-template-columns: repeat(5, 1fr);
        gap: 16px 18px;
    }
    .editor .popup__imageGridBx{
        max-width: 100px;
    }
}

@media only screen and (max-width: 1250px){
    .editor{
        padding: 8px 18px 24px 18px;
    }
    .editor .editorContainer{
        flex-direction: column;
    }
    .editor .sidebar{
        display: flex;
        flex-direction: row;
        column-gap: 8px;
        justify-content: space-evenly;
        width: 100%;
        margin-right: 0;
    }
    .editor .side__icon{
        width: 52px;
    }
    .editor .side__desc{
        font-size: 22px;
    }

    /* Popups */
    .editor .popup__imageInputBx{
        flex-direction: column;
        align-items: center;
        row-gap: 16px;
    }
    
    .editor .popup__imageUploadInput{
        width: 100%;
    }
    .editor .popup__title{
        text-align: center;
        margin-bottom: 16px;
    }
    .editor .popup__fileLabel{
        row-gap: 6px;
    }
    .editor .popup__labelImg{
        width: 86px;
    }
    .editor .popup__fileLabel p{
        font-size: 20px;
    }

    .editor .popup__textSel{
        flex-direction: column;
        column-gap: 0;
        row-gap: 16px;
    }
    .editor .popup__shirtColorBx{
        gap: 8px 14px;
        margin-block: 4px 8px;
    }
    .editor .popup__shirtColor{
        width: 40px;
        height: 40px;
    }

    .editor .popup__categories{
        grid-template-columns: repeat(3, 1fr);
        gap: 14px 10px;
        margin-top: 12px;
    }
    .editor .popup__patterns{
        grid-template-columns: repeat(3, 1fr);
        gap: 14px 10px;
        margin-top: 12px;
    }
    .editor .popup__category{
        row-gap: 6px;
    }

    .editor .popup__draftImages{
        grid-template-columns: repeat(4, 1fr);
    }
    .editor .popup__draft{
        max-height: 225px;
    }
    
    .editor .popup__container{
        padding: 36px 26px !important;
    }

    .editor__patternColorContainer{
        display: none !important;
    }
    .editor .popup__patternInput{
        margin-bottom: 16px;
    }
    .editor .popup__container.popupPattern .popup__title{
        margin-bottom: 8px;
    }
}

@media only screen and (min-width: 62.0625em){
    .popup.popupActive.patternColorActive{
        display: none !important;
    }
}

@media only screen and (max-width: 38em){
    .editor .popup__container.popupPatternColor{
        padding-inline: 0 !important;
    }
    .editor .popup__categories{
        grid-template-columns: repeat(2, 1fr);
    }
    .editor .popup__patterns{
        grid-template-columns: repeat(2, 1fr);
    }
    .editor .popup__title{
        font-size: 24px;
    }
    .editor .popup__categoryName{
        font-size: 18px;
    }
    .editor .popup__categoryImgBx{
        height: 136px;
    }
    .editor .popup__pattern{
        height: 136px;
    }

    .editor .popup__imageInputBx{
        row-gap: 12px;
    }
    .editor .popup__imageRemoveBackground{
        row-gap: 6px;
    }
    .editor .popup__imageBgLabel{
        font-size: 16px;
    }
    .popup__imageBgCheckbox{
        width: 18px;
        height: 18px;
    }
    .editor .popup__imageBgDesc{
        font-size: 15px;
    }
    .editor .popup__imageGrid{
        max-height: calc(90px + 14px);
        margin-block: 12px 20px;
    }
    .editor .popup__imageGridContainer{
        grid-template-columns: repeat(3, 1fr);
        gap: 14px 16px;
    }
    .editor .popup__imageGridBx{
        max-width: 90px;
    }
    .editor .popup__imageGridLoader{
        height: calc(90px + 14px);
    }
}

/* For parent element */
@media only screen and (max-width: 48em){
    .editor{
        min-height: auto !important;
        padding: 0px !important;
    }
    .editor .editorContainer{
        flex-wrap: wrap;
        height: 100%;
    }
    .editor .sidebar{
        flex-direction: row;
        margin-top: 10px;
        position: relative;
        z-index: 49;
    }
    .editor .editor__container{
        margin-top: -20px;
    }
    .editor .editor__shirtSvg{
        height: auto;
    }
    .editor .side__bx{
        margin-right: 20px;
        row-gap: 0px;
    }
    .editor .side__bx:last-of-type{
        margin-right: 0px;
    }
    .editor .popup.popupActive{
        top: 0px;
        position: fixed;
        padding: 10px;
    }
    .editor .popup.textActive .popup__container.popupText{
        padding: 0px !important;
        justify-content: flex-start;
    }
    .editor .popup__textInput{
        width: 100%;
    }
    .editor .popup__textSel{
        width: 100%;
    }
    .editor .popup__textSel{
        flex-direction: column;
    }
    .editor .popup__title{
        margin-block: 0px;
    }
    .editor .popup__selBx{
        margin-top: 5px;
        row-gap: 0px;
    }
    .editor .popup__categories{
        grid-template-columns: repeat(2, 1fr);
    }
    .editor .popup.patternActive .popup__container.popupPattern{
        padding-bottom: 50px !important;
    }
    .editor .popup__patterns{
        grid-template-columns: repeat(2, 1fr);
    }
    .editor .popup.imageActive .popup__container.popupImage{
        padding-bottom: 50px !important;
    }
    .editor .popup__selFontBx{
        max-height: 110px;
    }
    .editor .popup__selColorBx{
        max-height: 100px;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .editor .popup__draftImages{
        grid-template-columns: repeat(3, 1fr);
    }
    .editor .popup__draft{
        max-height: 200px;
    }

    .editor .popup__aiInputError{
        font-size: 16px;
    }
    .editor .popup__aiTextBx{
        row-gap: 10px;
    }
    .editor .popup__aiTextBx .popup__description{
        text-align: center;
        font-size: 18px;
    }
}

@media only screen and(max-width: 93.75em){
    .editor{
        padding: 8px 18px 24px 18px;
    }
    .editor .editorContainer{
        flex-direction: column;
        justify-content: flex-start;
    }
    .editor .sidebar{
        display: flex;
        flex-direction: row;
        column-gap: 8px;
        justify-content: space-evenly;
        width: 100%;
        margin-right: 0;
    }
    .editor .side__icon{
        width: 52px;
    }
    .editor .side__desc{
        font-size: 16px;
    }

    /* Popups */
    .editor .popup__imageUploadInput{
        width: 100%;
        max-height: 70vh;
    }
    .editor .popup__title{
        font-size: 28px;
        text-align: center;
        margin-bottom: 16px;
    }
    .editor .popup__fileLabel{
        row-gap: 6px;
    }
    .editor .popup__labelImg{
        width: 86px;
    }
    .editor .popup__fileLabel p{
        font-size: 20px;
    }
    .editor .popup__textSel{
        flex-direction: column;
        column-gap: 0;
        row-gap: 16px;
    }
    .editor .popup__shirtColorBx{
        gap: 8px 14px;
        margin-block: 4px 8px;
    }
    .editor .popup__shirtColor{
        width: 40px;
        height: 40px;
    }
    .editor .popup__categories{
        grid-template-columns: repeat(3, 1fr);
        gap: 14px 10px;
        margin-top: 12px;
    }
    .editor .popup__patterns{
        grid-template-columns: repeat(3, 1fr);
        gap: 14px 10px;
        margin-top: 12px;
    }

    .editor .popup__category{
        row-gap: 6px;
    }
    .editor .popup__container{
        padding: 36px 26px !important;
    }
}


/* EDITOR CONTAINER */
.editor .editor__container{
    display: flex;
    position: relative;
    width: 100%;
    height: 100%;
}
.editor__wrapper{
    display: flex;
    width: 100%;
    height: 100%;
}
.editor__bx{
    display: grid;
}

.editor .editorImage__container{
    grid-row: 1;
    grid-column: 1;
}
.editor .editorImage{
    display: flex;
    width: 100%;
    height: 100%;

    display: none;
}
.editor .editorImage.active{
    display: flex;
}
.editor .editorImage.overlayImg{
    position: relative;
    z-index: 9;
    pointer-events: none;
}
.editor .editor__canvasMiddleBx{
    position: relative;
    pointer-events: none;
    grid-row: 1;
    grid-column: 1;
}
.editor .editor__canvasBottomBx{
    position: absolute;
    pointer-events: all;
}
.editor .editor__canvasMiddleImg{
    width: 100%;
    height: 100%;
    object-fit: cover;

    position: absolute;
    left: 0;
    top: 0;

    display: none;
}

.editor__bxContainer{
    display: flex;
    flex-direction: column;
    row-gap: 16px;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Zoom Buttons */
.zoomContainer{
    position: absolute;
    right: 8px;
    top: 16px;
    display: flex;
    flex-direction: column;
    row-gap: 10px;

    display: none;
}
.zoomContainer.active{
    display: flex;
}
.zoomContainer__btn{
    width: 48px;
    aspect-ratio: 1;
    border-radius: 50%;
    padding: 0;
    background-color: transparent;
    border: none;
    outline: none;
    cursor: pointer;
}
.zoomContainer__btn img{
    width: 100%;
    height: 100%;
    object-fit: contain;
}


/* Check Quality */
.editor .editor__checkQuality{
    display: flex;
    margin-top: 16px;
}
.editor .editor__checkQualityBox{
    display: flex;
    column-gap: 8px;
    align-items: center;
    justify-content: center;
}
.editor .editor__checkQualityBox:has(.editor__checkQualityInput:disabled){
    opacity: 0.5;
}

.editor .editor__checkQualityResult{
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: grid;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 300px;
    z-index: 99;
    transform-origin: center center;

    opacity: 0;
    visibility: hidden;
    scale: 0.6;
}
.editor .editor__checkQualityResultImg{
    grid-column: 1;
    grid-row: 1;
    display: none;
}

.editor .editor__checkQualityResult.active{
    animation: zoomFadeIn 250ms ease-in-out forwards;
}
.editor .editor__checkQualityResult.hidden{
    animation: zoomFadeOut 250ms ease-in-out forwards;
}
.editor .editor__checkQualityResult.active-perfect .editor__checkQualityResultImg.perfect{
    display: block;
}
.editor .editor__checkQualityResult.active-good .editor__checkQualityResultImg.good{
    display: block;
}
.editor .editor__checkQualityResult.active-bad .editor__checkQualityResultImg.bad{
    display: block;
}


/* IOS Button color fix */
button{
    color: black;
}

/* Border Box */
.editor .borderBox{
    display: block;
    position: absolute;
    cursor: move;
    z-index: 10;
    border: 2px solid #ab0d09;
    pointer-events: none;
}
.editor .borderBox.boxHidden{
    display: none;
}
.editor .borderBox__btn{
    width: 36px;
    height: 36px;
    background-size: contain;
    background-repeat: no-repeat;
    background-color: transparent;
    border: none;
    outline: none;
    position: absolute;
    z-index: 10;
    padding: 0;
    border-radius: 50%;
    pointer-events: all;
}
.editor .borderBox__removeBtn{
    right: -36px;
    bottom: -36px;
    background-image: url(../img/icons/delete.png);
    cursor: pointer;
}
.editor .borderBox__resizeBtn{
    left: -36px;
    bottom: -36px;
    background-image: url(../img/icons/resize.png);
    cursor: ne-resize;
}
.editor .borderBox__moveBtn{
    left: -36px;
    top: -36px;
    background-image: url(../img/icons/move.png);
    cursor: move;
}
.editor .borderBox__rotateBtn{
    right: -36px;
    top: -36px;
    background-image: url(../img/icons/rotate.png);
    cursor: crosshair;
}
.editor .borderBox__layerControlBtn{
    left: 50%;
    bottom: -39px;
    transform: translateX(-50%);
    background-image: url(../img/icons/layer.png);
    cursor: pointer;
}
.editor .borderBox__layerFrontControlBtn{
    display: none;
    left: 50%;
    bottom: -72px;
    transform: translateX(-44px);
    background-image: url(../img/icons/layer-front.png);
    cursor: pointer;
}
.editor .borderBox__layerBackControlBtn{
    display: none;
    left: 50%;
    bottom: -72px;
    transform: translateX(8px);
    background-image: url(../img/icons/layer-back.png);
    cursor: pointer;
}
.editor .borderBox.activeLayer .borderBox__layerFrontControlBtn,
.editor .borderBox.activeLayer .borderBox__layerBackControlBtn{
    display: block;
}
.editor .borderBox__textEditBtn{
    display: none;
    left: -22px;
    top: 50%;
    transform: translate(-50%, -50%);
    background-image: url(../img/icons/updateText.png);
    cursor: pointer;
}
.editor .borderBox.textPopupActive .borderBox__textEditBtn{
    display: block;
}
.editor .borderBox__patternColorBtn{
    display: none;
    bottom: -39px;
    left: 50%;
    transform: translateX(-50%);
    background-color: transparent;
    border: 2px solid #ab0d09;
    cursor: pointer;
}
.editor .borderBox.patternColorActive .borderBox__patternColorBtn{
    display: block;
}
.editor .borderBox__objectCloneBtn{
    right: -22px;
    top: 50%;
    transform: translate(50%, -50%);
    background-image: url(../img/icons/clone.png);
    cursor: pointer;
}

/* Border box object size */
.editor .borderBox__objectSizeContainer{
    position: absolute;
    z-index: 10;
    left: 50%;
    bottom: calc(100% + 19px);
    transform: translateX(-50%);
    display: flex;
    flex-direction: column-reverse;
    row-gap: 6px;

    align-items: center;
    white-space: nowrap;
    pointer-events: none;

    display: none;
}
.editor .borderBox__imageHelpers{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    column-gap: 8px;
}
.editor .borderBox .borderBox__text{
    background-color: #ab0d09;
    color: white;
    font-size: 15px;
    font-weight: 400;
    padding: 4px 8px;
    border-radius: 6px;
}

.editor .borderBox__removeBg{
    display: none;
}
.editor .borderBox.removeBgActive .borderBox__removeBg{
    display: block;
}

.editor .borderBox__imageScaleRatioContainer{
    display: flex;
    align-items: center;
    justify-content: center;
    column-gap: 6px;
    text-align: center;
    font-size: 16px;
    font-weight: 400;
    background-color: #ab0d09;
    color: white;
    padding: 4px 10px;
    border-radius: 6px;

    display: none;
}
.editor .borderBox.imageQualityActive .borderBox__imageScaleRatioContainer{
    display: flex;
}

.editor .borderBox__imageScaleRatioBx{
    display: grid;
}
.editor .borderBox__imageScaleRatio{
    grid-column: 1;
    grid-row: 1;
    width: auto;
    height: 1em;

    display: none;
}
.editor .borderBox__imageScaleRatioBx.s-4 .s-4{
    display: block;
}
.editor .borderBox__imageScaleRatioBx.s-3 .s-3{
    display: block;
}
.editor .borderBox__imageScaleRatioBx.s-2 .s-2{
    display: block;
}
.editor .borderBox__imageScaleRatioBx.s-1 .s-1{
    display: block;
}
.editor .borderBox__imageScaleRatioBx.s-0 .s-0{
    display: block;
}

.editor .borderBox.objectSizeActive .borderBox__objectSizeContainer{
    display: flex;
}

.editor .borderBox.textPopupFix .borderBox__layerControlBtn,
.editor .borderBox.patternColorActive .borderBox__layerControlBtn{
    bottom: -78px;
}
.editor .borderBox.textPopupFix .borderBox__layerFrontControlBtn,
.editor .borderBox.patternColorActive .borderBox__layerFrontControlBtn{
    bottom: -108px;
}
.editor .borderBox.textPopupFix .borderBox__layerBackControlBtn,
.editor .borderBox.patternColorActive .borderBox__layerBackControlBtn{
    bottom: -108px;
}
.editor .borderBox.textPopupFix .borderBox__textEditBtn{
    bottom: -39px;
    top: unset;
}


/* Pattern color popup */
.editor .popup__container.popupPatternColor{
    max-height: 100dvh;
}
.editor .popup__patternColorContainer{
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Pattern Colors */
.editor .editor__patternColorContainer{
    display: grid;
    row-gap: 8px;
    align-items: center;
    justify-content: center;

    position: absolute;
    right: 10px;
    background-color: white;
    padding: 6px 10px;
    box-shadow: inset rgba(0, 0, 0, 0.15) 0px 0px 7px 0px;
    z-index: 999;

    opacity: 0;
    visibility: hidden;
}

.editor .editor__patternColorTitle{
    text-align: center;
    min-width: 0;
    min-height: 0;
    white-space: pre;
    overflow: hidden;
    font-size: 28px;
}
.editor .editor__patternColorBx{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    height: fit-content;

    grid-auto-rows: 40px;
    max-height: calc((40px + 6px) * 8 - 3px);
    overflow-y: auto;
    overflow-x: hidden;
}
.editor .editor__patternColor{
    width: auto;
    height: 100%;
    aspect-ratio: 1;
    cursor: pointer;
    display: block;
    transition: border-radius 200ms ease-in-out;
}
.editor .editor__patternColor.selectedColor{
    border-radius: 50%;
}
.editor .editor__patternColorContainer.disableTransition .editor__patternColor{
    transition: none !important;
}


@media only screen and (max-width: 62em){
    .editor .editor__patternColorTitle{
        font-size: 26px;
    }
    .editor .editor__patternColorBx{
        gap: 4px;
        margin-block: 0;
        max-height: calc((40px + 6px) * 8 - 3px);
        grid-template-columns: repeat(4, 1fr);
    }
    .editor .editor__patternColor{
        width: 32px;
        height: 32px;
        cursor: pointer;
        display: block;
    }
}

@media only screen and (max-width: 38em){
    .editor .editor__patternColorTitle{
        font-size: 22px;
    }
    .editor .popup__draftImages{
        grid-template-columns: repeat(2, 1fr);
    }
    
    .editor .editor__patternColorContainer{
        width: max-content;
        bottom: -25%;
        left: 50%;
        right: unset;
        transform: translateX(-50%);
    }
    .editor .editor__patternColorBx{
        grid-template-columns: repeat(6, 1fr);
        max-height: calc((40px + 6px) * 4 - 3px);
    }

    .zoomContainer{
        right: 8px;
        top: 16px;
        row-gap: 8px;
    }
    .zoomContainer__btn{
        width: 40px;
    }
}


/* Loader */
.editorLoader{
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;

    font-family: 'Oswald', sans-serif;
    box-sizing: border-box;

    display: none;
}
.editorLoader.activeLoader{
    display: flex;
}
.editorLoader__description{
    font-size: 32px;
    font-weight: 400;
    text-align: center;
}


@media only screen and (max-width: 62em){
    .editorLoader__description{
        font-size: 26px;
    }
}

@media only screen and (max-width: 38em){
    .editorLoader__description{
        font-size: 20px;
    }
}



/* EDITOR BELLOW */
.editor.canvasBellowActive .editor__bx{
    display: block;
}
.editor.canvasBellowActive .editor__container{
    height: 100% !important;
}
.editor.canvasBellowActive .editor__canvasBottomBx{
    top: 0 !important;
}
.editor.canvasBellowActive .editor__canvasMiddleImg{
    display: block;
}


/* Custom Checkbox */
/* .customCheckbox-input, .customCheckbox-span */
.customCheckbox-input{
    display: none;
}

.customCheckbox-span{
    width: 20px;
    height: 20px;
    border: 2px solid #000;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-color: white;
}
.customCheckbox-input:checked + .customCheckbox-span{
    background-color: #ab0d09;
    border-color: #ab0d09;
}
.customCheckbox-input:checked + .customCheckbox-span::after{
    content: "";
    position: absolute;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    transform-origin: 5px;
}


/* Invisible Block helper */
.invisibleBlock{
    width: 100%;
    height: 100%;
    position: fixed;;
    top: 0;
    left: 0;
    z-index: 90;
    
    display: none;
}
.invisibleBlock.active{
    display: block;
}