form{
    display: flex;
    flex-direction: row;
    height: 100%;
}

.flexCol{
    flex-direction: column;
}

#images{
    gap: 10px;
    margin-bottom: 10px;
    display: grid;
}

#left{
    position: fixed;
    top: 120px;
    overflow: hidden;
    height: calc(100% - 140px);
    width: 400px;
    padding-right: 20px;
    border-right: 2px solid #2f393db6;
}

#left > div{
    padding: 20px;
    border-radius: 5px;
    color: white;
}

#template{
    padding: 10px 15px;
}

#language{
    padding: 10px 15px;
}

select{
    height: 30px;
    border-radius: 4px;
}

#template input{
    margin: 0;
    margin-left: 10px;
}

#language input{
    margin: 0;
    margin-left: 10px;
}

#template-fields textarea,
#template-fields input {
    display: block;
    width: 100%;
    padding: 5px;
    height: 30px;
    box-sizing: border-box;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    border-radius: 5px;
    margin: 5px 0;
}

#submitBtn{
    margin: 20px;
    width: 200px;
    padding: 8px;
    border-radius: 5px;
    border: none;
    transition: all 0.3s ease;
}

#right{
    height: fit-content;
    flex-grow: 1;
    position: relative;
    margin-left: 460px;
}

#itemsHeader{
    width: calc(100% - 20px);
    position: sticky;
    height: 25px;
    padding: 10px;
    top: 0;
    background-color: #7c685f;
    color: white;
    z-index: 1;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
}

#itemsHeader div{
    height: max-content;
}

#itemsHeader button{
    padding: 6px 5px;
    border-radius: 3px;
    border: none;
    background-color: white;
}

.itemContainer{
    position: relative;
    background-color: #f5d7b6;
    border-radius: 5px;
    padding: 20px;
    height: fit-content;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    max-height: 100%;
    transition: all 0.3s ease;
}

.itemContainer.drag-sort-active {
    background-color: transparent;
    border: 2px dashed wheat;
}

.itemContainer.drag-sort-active  *{
    opacity: 0;
}

.itemContainer.delete{
    max-height: 0;
    padding: 0 20px;
    margin-bottom: 0;
}

.itemContainer.delete  * {
    height: 0 !important;
    max-height: 0 !important;
    border: 0;
    overflow: hidden;
    font-size: 0;
    padding: 0;
}

.itemContainer > button{
    width: 120px;
    padding:6px 0;
    border-radius: 5px;
    top: 20px;
    right: 20px;
    position: absolute;
    background-color: white;
    transition: all 0.2s ease;
    border: none;
}



#addBtn{
    margin: 20px;
    width: 100px;
    padding: 20px;
    background-color: #b697832d;
    border-radius: 5px;
    border: 2px dashed white;
    cursor: pointer;
    color: white;
}

.selectItemLabel, .selectItem{
    display: none;
}

.selectItem{
    min-width: 430px;
    max-width: 600px;
}
.selectCategory{
    min-width: 380px;
    display: inline-block;
    padding-bottom: 10px;
}

label,.selectItemLabel.active{
    display: inline;
}

.selectItemLabel.active ~ .selectItem{
    display: inline-block;
}

.descriptionContainer{
    display: none;
    flex-direction: column;
    position: relative;
    padding-top: 20px;
}

.descriptionContainer.active{
    display: flex;
}

.itemImgGrid{
    display: grid;
    max-width: 170px;
    grid-template-columns: repeat(auto-fill,minmax(80px, 1fr));
    gap :10px;
}

.description.hasExtra > .itemImgGrid{
    grid-template-rows: repeat(auto-fill,minmax(80px, 1fr));
    grid-template-columns:none;
}

.descriptionContainer .descImg{
    width: 80px;
    height: 80px;
}

.description{
    padding-top: 20px;
    display: flex;
    flex-direction: row;
    gap: 40px;
}

.itemExtra{
    width: 100%;
}

.description > div{
    width: 30%;
    min-width: 150px;
}

.price > input{
    width: 40px;
    border-radius: 4px;
    border: none;
    padding: 4px;
    margin: 2px;
}

.descriptionContainer a{
    padding:6px 8px;
    border-radius: 5px;
    margin-top: 20px;
    background-color: white;
    text-decoration: none;
    color: black;
    transition: all 0.2s ease;
    width: 100px;
    text-align: center;
}

.size-price-container{
    width: 100%;
    margin-bottom: 5px;
}

.editItem{
    position: absolute;
    top: -30px;
    right: 20px;
}

.itemContainer.folded > select,
.itemContainer.folded > label,
.itemContainer.folded > .selectCategory,
.itemContainer.folded > .selectItem,
.itemContainer.folded > button,
.itemContainer.folded > br,
.itemContainer.folded .description > span,
.itemContainer.folded .item-note,
.itemContainer.folded .descriptionContainer > a,
.itemContainer.folded .description > div,
.itemContainer.folded .flexCol {
    display: none;
    overflow: hidden;
}

.itemContainer.folded {
    max-height: 250px;
    display: flex;
    flex-direction: row;
}

.itemContainer.folded > .itemsCount{
    display: block;
    height: max-content;
    align-self: center;
    padding-right: 20px;
    font-size: 25px;
}

.itemContainer.folded .itemImgGrid{
    display: flex !important;
    max-width: fit-content;
    order: 1;
}

.itemContainer.folded .description{
    padding-top: 0;
}

.itemContainer.folded .descriptionContainer{
    flex-direction: row;
    padding: 0;
}

.itemContainer.folded .itemName{
    order: 2;
    height: fit-content;
    align-self: center;
    font-size: 20px;
    padding-left: 50px;
}

.item-note {
    min-height: 50px;
    max-width: 100%;
    min-width: 100%;
    border-radius: 8;
    font-size: 15px;
    margin-top: 10px;
}

.delete-image{
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: white;
    border: none;
    font-size: 18px;
    position: absolute;
    right: 5px;
    bottom: 5px;
    z-index: 1;
    transition: all 0.3s ease;
}

.select-image{
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: white;
    border: none;
    font-size: 18px;
    position: absolute;
    left: 5px;
    bottom: 5px;
    z-index: 1;
    transition: all 0.3s ease;
}

.delete-image:hover,
.select-image:hover,
.buttonSpan > input:hover,
.buttonSpan > button:hover{
    color: white;
    background-color: #A3423C;
    border-color: white;
}

.imageInput{
    display: none;
}

.image-container{
    position: relative;
    border: 2px dashed white;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.image-container > span{
    width: 100%;
    height: 100%;
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-container > .cr-slider-wrap{
    z-index: 2;
}

.image-container.imageAdded > span{
    z-index: -1;
}

.image-container > img{
    width: auto;
    height: 100%;
    object-fit: contain;
    min-width: 100%;
}

@media(hover: hover){

    
    #submitBtn:hover{
        margin-top: 18px;
        padding: 10px;
        background-color: #A3423C;
        color: white;
        letter-spacing: 1.2px;
    }

    .itemContainer > button:hover,
    .descriptionContainer a:hover{
        background-color: #A3423C;
        color: white;
    }

    #addBtn:hover{
        color: rgb(29, 29, 29);
        background-color: rgb(231, 231, 231);
    }


}


@keyframes gradientBG {
	0% {
		background-position: 0% 50%;
	}
	50% {
		background-position: 100% 50%;
	}
	100% {
		background-position: 0% 50%;
	}
}
