/* Menu del object  */
.grid__container{
   display: grid;
   grid-template-columns: 1fr;
}
.menu-container {
   position: relative;
   z-index: 10;
   top: -120px
}
.menu-button {
   padding: 10px 20px;
   font-size: 16px;
   color: #ffffff;
   background-color: #000000;
   border: none;
   cursor: pointer;
   border-radius: 4px;
}

.menu-button:hover {
   background-color: #333333;
}

.menu-list {
   display: none;
   position: absolute;
   top: 100%;
   left: 0;
   background-color: #b8b8b8;
   box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
   list-style-type: none;
   padding: 0;
   margin: 0;
   border-radius: 4px;
   width: 200px;
   transition: opacity 0.3s ease, visibility 0s 0.3s;
}

.menu-list li {
   border-bottom: none;
   position: relative;
   width: 200px;
}

.menu-list li button {
   display: block;
   width: 100%;
   border: none;
   margin: auto;
   text-align: center;
   background-color: transparent;
   padding: 10px 20px;
   color: #000000;
   text-decoration: none;
}

.menu-list li button:hover {
   background-color: #cccccc;
   color: #000000;
   font-weight: bold;
   cursor: pointer;
}

.menu-list.show-menu {
   display: block;
   visibility: visible;
   opacity: 1;
}

.submenu-list {
   display: none;
   position: absolute;
   top: 0;
   left: 100%;
   background-color: #b8b8b8;
   box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
   border-radius: 4px;
}

.menu-list li:hover .submenu-list {
   display: block;
}
/* Estilos para el buscador */
.search-title{
   margin: 8px 0;   
}
.search-section{
   margin: auto;
   margin-bottom: 20px;
   position: relative;

}
.search-container{
   padding: 24px;
   margin: auto;
   background-color: #eee;
   border-radius: 8px;
   max-width: 870px;
   box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.search-icon{
   background-color: transparent;
   width: 32px;
   border: none

}
.search-form input{
   width: 100%;
   padding: 8px;
   border: 1px solid #ddd;
   border-radius: 8px;
}
.search-form{
   display: flex;
}
.search-results{
   z-index: 20;
   width: 870px;
   border-radius: 8px;
   background-color: transparent;
   max-height: 400px;
   margin: auto;
   position: absolute;
   top: 100%;
   left: 50%;
   transform: translate(-50%);
   overflow: auto;
}
.results-item{
   height: 40px;
   border: none;
   padding: 4px 2px;
   list-style: none;
   display: flex;
   align-items: center;
   width: 100%;
   cursor: pointer;
   z-index: 100;
}
.results-item:hover{
   background-color: #ccc !important;
}
.results-item .item-code{
   margin: 0 4px;
   width: 70px; /* Ajustá este valor según el diseño */
   overflow: hidden;
   text-overflow: ellipsis;
   white-space: nowrap;
}
.results-item .item-name {
   margin: 0 4px;
   max-width: 300px; /* Ajustá este valor según el diseño */
   overflow: hidden;
   text-overflow: ellipsis;
   white-space: nowrap;
}
.results-item:nth-child(even) {
    background-color: #eee;
}
.results-item:nth-child(odd) {
    background-color: #ddd;
}
/* Estilos para la tabla CSV */
#csv-container{
  max-width: 1300px !important;
  margin: auto;
  padding-bottom: 20px;
}

.csv-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 5px;
    border-radius: 10px;
    padding: 10px;
}

.csv-table tr:hover td {
  background-color: #dedede;
}

.csv-table th, .csv-table td {
  padding: 10px;
  text-align: left;
  border-radius: 10px;
  background-color: #eee;
  border: none;
  height: 100%;
  white-space: nowrap; /* Evita el salto de línea */
  overflow: hidden; /* Oculta el texto que se desborda */
  text-overflow: ellipsis; /* Muestra "..." cuando el texto se desborda */
  max-width: 300px; /* Establece un ancho máximo para que se pueda truncar */
}

.csv-table th {
  background-color: #be0319; /* Color 2: #ED3237 */
  color: #fff;
  font-weight: bold;
  text-transform: uppercase;
}

.csv-table td:has(button) {
  padding: 0;
  position: relative;
}

.csv-table button {
  font-size: 16px;
  font-weight: bold;
  background-color: #be0319;
  border: none;
  border-radius: 10px;
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.csv-table button svg {
  width: 24px;
  height: 24px;
}

.csv-table button:hover {
  background-color: #cc2f34;
}
.object-container {
   margin: auto;
   max-width: 900px;
}
#svg-viewer{
   margin: auto;
   height: 800px;
   padding: 0 10px;
   margin-top: -70px;
}
@media(width < 1100px){
   .menu-container {
        top: 0px;
        margin-bottom: 30px;
    }
   
}
@media(width > 1000px){
   .csv-table th {
      position: sticky;
      top: 0;
      z-index: 1;
   }
   .csv-wrapper {
      max-height: 515px;
      overflow-y: auto;
      width: 100%;
   }
}
@media(width < 1000px){
   .grid__container{
      grid-template-columns: 1fr !important;
   }
   .csv-wrapper {
      width: 100vw;
   }
}
@media(width < 880px){
   .search-results, .search-container{
      width: 95%;
   }
      .results-item .item-name {
      margin: 0 4px;
      max-width: calc(100% - 82px); 
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
   }
   .results-item .item-code, .results-item .item-name{
      font-size: 14px;
      
   }
}
@media (width < 750px){
   #svg-viewer {
      height: 350px;
   }

}
/* Estilos para tamaños de pantalla específicos */
@media (width < 600px){
   .search-title{
      font-size: 20px;
   }
   .csv-table{
      & td, th{
         width: fit-content;
         max-width: 25vw;
         font-size: 12px;
      }
   }
   .csv-table th:nth-child(1), 
   .csv-table td:nth-child(1), 
   .csv-table th:nth-child(4), 
   .csv-table td:nth-child(4) {
       width: 10%;
       max-width: 100px;
   }

   .csv-table th:nth-child(2), 
   .csv-table td:nth-child(2) {
      width: 15%;
      max-width: 150px;
   }
   tr > th:nth-child(2), tr > td:nth-child(2){
      display: none;
   }
}
