* {
    margin:0;
    padding: 0;
    box-sizing: border-box;
    outline:none;
    font-family: IRANSans, Segoe UI, Verdana, Geneva, Tahoma, sans-serif;
}
#container {
    width:100%;
    height:100vh;
    position:relative;
    max-height: 100vh;
    overflow:hidden;
    background-repeat: no-repeat;
    background-size: contain;
    display:flex;
    flex-direction: row;
    align-items: center;
    justify-content:center;
}

#thumbnails {
    position: absolute;
    bottom:0;
    left:50%;
    transform: translate(-50%);
    display:block;
    z-index:1000;
}

#thumbnails ul {
    display:flex;
    align-items:center;
    justify-content:center;
    flex-wrap: nowrap;
    flex-direction:row;
    width:max-content;
    height:max-content;
    list-style:none;
    margin-bottom:15px;
}

#thumbnails ul li {
    width:80px;
    height:50px;
    border: 1px solid #3c3c3c;
    border-radius: 4px;
    margin: 2px;
    cursor:pointer;
}

#thumbnails ul li img {
    display:block;
    width:100%;
    height:100%;
    object-fit:cover;
    border-radius: 4px;
}

#toolbar {
    position: absolute;
    top:10%;
    left:0;
    width:50px;
    height:max-content;
    border: 2px solid #3c3c3c;
    border-radius: 0 5px 5px 0;
    border-left: none;
    background-color: rgba(255, 255, 255, 0.685);
    z-index: 99998;
}

#toolbar ul {
    list-style:none;
}

#toolbar ul li button ,
#toolbar ul li label {
    cursor:pointer;
    padding:5px;
    border:none;
    width:100%;
    background-color:transparent;
    display:flex;
    align-items: center;
    justify-content:center;
    height:40px;
}

#toolbar ul li {
    position:relative;
}

.liActive :nth-child(1) {
    background-color: rgb(33, 36, 207);
    color:#fff;
    border-radius: 4px;
    padding:5px;
}

.liActive input[type=color] {
    height:40px!important;
}

.imageFromUrl {
    position:absolute;
    left:55px;
    top:50%;
    transform: translate(0, -50%);
    z-index: 999999;
}

.imageFromUrl input[type=text] {
    padding: 5px;
    width: 300px;
    border: 1px solid #4286f4;
    border-radius: 4px;
    display:none;
}

.imageFromUrl input[type=text]:focus {
    border-width: 2px;
    display:block;
}

.chooseDrawColor {
    position:absolute;
    left:50px;
    top:0;
    display:none;
    flex-direction: row;
    align-items: center;
    z-index:100000;
}

.chooseDrawColor input[type=number] {
    width:65px;
    height:28px;
    margin-left: 5px;
}

#bgCon {
    position:relative;
    max-height: 100vh;
}

#bgCon canvas {
    width:100%;
    height:100%;
}


#bgCon > div {
    position: absolute;
    top:0;
    left:0;
    right:0;
    bottom:0;
    z-index:1;
    width:100%;
    height:100%;
}

#bgCon img{
    width:100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

#addImageFromUrlTrigger:focus-within .imageFromUrl input[type=text] {
    display:block;
}

#floatingImageContainer > div {
    position:absolute;
    z-index:9;
}

#floatingImageContainer > div img {
    border-radius: 5px;
    display:block;
    width:100%;
    height:100%;
    object-fit:cover;
}

#floatingImageContainer > div > div {
    cursor: move;
}

.resizable {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.resizable .resizers{
    width: 100%;
    height: 100%;
    border: 3px solid #4286f4;
    box-sizing: border-box;
}

.resizable .resizers .resizer{
    width: 10px;
    height: 10px;
    border-radius: 50%; 
    border: 3px solid #4286f4;
}

.resizable .resizers .resizer,
.resizable .resizers .rotateor{
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 3px solid #4286f4;
    position: absolute;
    background-color: #4286f4;
}

.resizable .resizers .rotateor{
    display:none;
    cursor: crosshair;
}

.top-left {
    left: -5px;
    top: -5px;
    cursor: nwse-resize;
}

.top-right {
    right: -5px;
    top: -5px;
    cursor: nesw-resize;
}

.bottom-left {
    left: -5px;
    bottom: -5px;
    cursor: nesw-resize;
}

.bottom-right {
    right: -5px;
    bottom: -5px;
    cursor: nwse-resize;
}

.resizers.inactive {
    border: 3px solid transparent;
}

.resizers.inactive .resizer {
    display:none;
}

.d-none {
    display:none!important;
}

.camera_container {
    position:fixed;
    top:0;
    left:0;
    right:0;
    bottom:0;
    background-color: #fff;
    z-index:1001;
    display:none;
}

.camera_container > div ,
.camera_container > div >div#camera {
    width:100%;
    height:100vh;
    position:relative;
    display:block;
}

.camera_container .close_camera ,
.camera_container #camera_trigger,
.close_welcome_modal {
    position: absolute;
    top:20px;
    right:20px;
    width:30px;
    height:30px;
    padding:0 0 6px 0;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    border:none;
    background-color: rgba(211, 23, 32, 0.76);
    color: #fff;
    border-radius: 5px;
    font-size: 30px;
}

.close_welcome_modal {
    top:5px;
    right:5px;
}

.camera_container #camera_trigger {
    bottom:20vh;
    left:50%;
    transform: translate(-50%);
    width:100px;
    top:unset;
}

.welcome_modal > div {
    position: fixed;
    top: 50px;
    left:50%;
    transform: translate(-50%, 0);
    width: 80%;
    height: 80vh;
    background-color: rgb(255, 255, 255);
    border-radius: 10px;
    border: 1px solid #3c3c3c;
    z-index: 100000;
}

.welcome_modal > div > div {
    width:100%;
    height:100%;
    position:relative;
    display:flex;
    align-items:center;
    justify-content:center;
    flex-direction: column;
    width:100%;
    height:100%;
}

.welcome_modal > div > div > h3 {
    text-align: right;
    direction: rtl;
}

.welcome_modal > div > div > section {
    display:flex;
    flex-direction: row;
    width:100%;
    overflow:auto;
    
}

.welcome_modal > div > div > section > div {
    flex: 1 1 0;
    margin-top: 10px;
    padding: 4px;
}

.welcome_modal > div > div > section > div > h4 {
    direction: rtl;
    text-align: right;
    display:block;
    position: relative;
    margin-bottom:15px;
    padding:5px 10px;
}

.welcome_modal > div > div > section > div > h4:after {
    content: '';
    position: absolute;
    width: 132px;
    height: 2px;
    bottom: -2px;
    background-color:  rgba(211, 23, 32, 0.774);
    right: 10px;
}

.welcome_modal > div > div > section > div > ul {
    list-style: inside;
    padding: 4px 8px;
}

.welcome_modal > div > div > section > div > ul > li {
    direction: rtl;
    text-align: right;
    margin-bottom:8px;
}

.welcome_modal {
    position: fixed;
    top:0;
    left:0;
    right:0;
    bottom:0;
    z-index:99999;
    content: '';
    background-color: #4286f470;
}

@media only screen and (max-width: 500px){
    .welcome_modal > div {
        width:95%;
        height:95vh;
        top: 10px;
    }
}

.products_list_trigger {
    position:fixed;
    top: 15px;
    right:15px;
    border: 1px solid #3c3c3c;
    border-radius: 10px;
    padding:4px 8px;
    cursor:pointer;
    background-color: #4286f4;
    color:#fff;
    direction:rtl;
    display:none;
    align-items: center;
}

.products_list > ul {
    list-style: none!important;
    display:flex;
    align-items: center;
    justify-content:space-around;
    flex-wrap: wrap;
}

.products_list > ul > li {
    width: 150px;
    height:150px;
    border-radius: 10px;
    border: 1px solid #3c3c3c;
    cursor:pointer;
    position:relative;
    display:flex;
    align-items: center;
    justify-content:center;
}

.products_list > ul > li > img {
    width:98%;
    height: 98%;
    display:block;
    object-fit: cover;
    border-radius: 10px;
}

.products_list > ul > li > a {
    position: absolute;
    bottom:0;
    left: 0;
    width: max-content;
    display:flex;
    align-items: center;
    justify-content:center;
    padding: 4px 0;
    text-decoration: none;
    color:#4286f4;
}