
.drop-area {
  border: 2px dashed #ccc;
  padding: 20px;
  text-align: center;
  position: relative;
  cursor: pointer;
  margin-bottom: 10px;
   width: 100%;
}
.drop-area svg {
  margin-bottom: 10px;
}
.preview img {
  max-height: 100px;
  margin: 5px;
}

.file-item {
  display: inline-block;
  position: relative;
  margin: 5px;
}

.preview#image-preview .file-item img {
  max-height: 100px;
  border-radius:10px;
  width:auto;
  object-fit:contain;
  display: block;
}

.preview#stl-preview .file-item{
  display:flex;
  align-items:center;
}   

.file-item img {
  max-height: 100px;
  display: block;
}
.remove-file {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--ast-global-color-0);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-weight: bold;
  text-align: center;
  line-height: 18px;
  cursor: pointer;
}

.file-item {
  opacity: 0;
  transition: opacity 0.4s ease;
}

.file-item.visible {
  opacity: 1;
}



.upload-progress {
  position: relative;
  width: 100%;
  height: 20px;
  background: #eee;
  margin: 10px 0;
  border-radius: 4px;
  overflow: hidden;
  transition:all .2s ease-in-out;
}
.upload-progress .bar {
  height: 100%;
  background: var(--ast-global-color-0);
  width: 0%;
  transition: width 0.3s;
}
.upload-progress .percent {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 12px;
  line-height: 20px;
}

.jaws{
        margin-top:30px;
        display:flex;
        flex-direction:column;
        gap:20px;
        & label.center{
            color:black;
        }
    }    
        
  .jaws__table_tooth {
    display: grid;
    grid-template-columns: repeat(16, 1fr);
    grid-template-rows: 1fr;
    align-items: end;
  }

  .jaws__table_tooth label {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
    user-select: none;
  }

  .jaws__table_tooth label:hover {
    border-color: #000000;
  }

  .jaws__table_tooth input[type="checkbox"] {
    display: none;
  }

  .jaws__table_tooth input[type="checkbox"]:checked + .tooth-label {
    width: 100%;
    border-color:var(--ast-global-color-0);
    transition:all .2s ease-out;
  }
  
  .jaws__upper,.jaws__lower {
    display: flex;
    flex-direction: row;
    flex-wrap:wrap;
    justify-content:space-between;
    gap: 0px 40px;
    & label{
        width:100%;
    }
    & .jaws__options{
        width:20%;
        align-self: center;
    }
    & .jaws__table_tooth{
        flex-grow: 1;
        align-items:stretch;
    }
}

.jaws__options label {
    height: 25px;
}

.tooth-label {
    transition:all .2s ease-out;
    width:100%;
    flex-grow: 1;
}

svg.tooth-svg {
    height: 100%;
}

  .tooth-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 2px solid transparent;
    border-radius: 6px;
    padding: 4px;
    transition: 0.2s;
  }
  
  .tooth-label.selected{
      border: 1px var(--ast-global-color-0) solid;
  }

  .tooth-label img {
    width: 40px;
    height: auto;
    margin-bottom: 4px;
  }

  .jaws__options {
    display: flex;
    gap: 0px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .jaws__options label {
    cursor: pointer;
  }

  .jaws__options input {
    margin-right: 6px;
  }
  
  .form-row.fullwide-row-prostho.dataset {
    & #wcuf_file_uploads_container{
        display:flex;
        flex-direction:row;
    }
}

.form-row.fullwide-row-prostho.dataset{
    & #upload_row_1, #upload_row_2{
        width:50%;
    }
}

#prosthodontics-order-form{
    margin-bottom: 50px;
}

#prosthodontics-order-form .wcuf_single_upload_field_container{
    border-color:black;
    & h3{
        color:black;
    }
}

div#teeth-summary .totals .row {
    display:flex;
    justify-content:space-between;
}

  
  /*
  .tooth-label svg path {
  transition: fill 0.2s ease;
}

input[type="checkbox"]:checked + .tooth-label svg path {
  fill: var(--ast-global-color-0);
}
*/

.files-upload-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
    border: 1px solid black;
    border-radius: 20px;
    transition: all .2s ease-in-out;
}

.files-upload-row .preview{
    width:100%;
    transition: all .2s ease-in-out;
}

.upload-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    align-self: stretch;
    flex-basis: 50%;
    padding: 20px;
    &:first-child{
        border-right: 1px solid;
    }
}

.order-summary {
    border-top: 1px #B4B4B4 solid;
    margin-top: 40px;
}

div#order-summary-content {
    margin-top:15px;
    margin-bottom:25px;
    font-family: "Exo 2";
    font-weight:600;
    font-size:16px;
    display:flex;
    flex-direction:column;
    gap:10px;
    line-height:100%;
    letter-spacing:0%;
}

div#order-summary-content #teeth-summary{
    display:flex;
    flex-direction:column;
    gap:10px;
    margin-top:10px;
}

div#order-summary-content p{
    margin:0;
}

div#order-summary-content .product {
    display:flex;
    justify-content:space-between;
}

.tooth-svg path {
    transition: fill 0.3s ease;
}

.prosthodontics-file-errors {
  margin-bottom: 20px;
  padding: 15px;
  border-left: 4px solid #b81c23;
  background: #f8d7da;
  color: #721c24;
  list-style: disc;
}


.grid-files{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:10px;
    width:100%;
}


.grid-files.images-grid {
    & img{
        width: 100%;
        aspect-ratio: 1 / 1; /* Заставит картинку быть квадратной */
        object-fit: cover;   /* Обрезает изображение по центру */
        border-radius: 10px;
    }
}

.grid-files.stl-grid{
    & a.stlfile img{
        width: 50% !important;
    }
    & a.stlfile{
        display:flex;
        flex-direction:column;
        align-items:center;
    }
}

.grid-files.images-grid a{
    width:100%;
    text-align:center;
}

.upload-files {
    margin-top:20px;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 30px;
    & .row{
        width:50%;
    }
}

.prosthodontics-order-details{
    margin-top:20px;
}

@media screen and (max-width:920px){
    form#prosthodontics-order-form {
        flex-direction:column;
        gap:5px;
        margin-bottom: 20px;
        & .wide-row-prostho, .shrink-row-prostho{
            width:100%;
        }
        & .jaws{
            width:100%;
        }
        & .jaws__upper, .jaws__lower{
             width:100%;
            display:flex;
            flex-direction:column;
            gap:10px;
            
        }
        & .jaws__options{
            align-self:start;
            width:100%;
        }

        & .jaws__table_tooth {
            width:100%;
            overflow-x:scroll;
            display:flex !important;
            flex-direction:row;
            & label{
               min-width:60px;
            }
            
        }
        

        
        & .files-upload-row{
            display:flex;
            flex-direction:column;
            gap:20px;
            border-style:unset;
            & .upload-section{
                border: 1px solid black;
                border-radius:20px;
            }
        }
        
    }
    
    .prosthodontics-order-details{
        & .jaws__upper, .jaws__lower {
            width: 100%;
            overflow-x: scroll;
        }
        
        & .upload-files {
            display: flex;
            flex-direction: column;
            & .row{
                min-width: 100%;
            }

            & .images-grid{
                 grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
            }
            
             & .stl-grid{
               display:flex;  
             }
            
            & .stl-grid div{
                width:100%;
                display:flex !important;
                flex-direction:row;
            }
        }
    }
}

@media screen and (max-width: 768px) {
  .jaws__table_tooth label:hover {
    border-color: white; /* или какой был цвет до hover */
  }
}


