:root {
  --color-tableSecondDT: black;
  --headHead: #494949;

  --tableDangerOK: #ab000033;
  --tableSuccesOK: #28a74533;

  --tableDanger: #AB0000;
  --tableWarging: #E7BD3F;
  --tableSucces: #28A745;

  --tableHover: rgba(0, 0, 0, 0.25);
  --borderTablethml: var(--color-borderT);
  --backgroudArrow:  rgba(0, 0, 0, .05);
  --color-hover-selected-rows: #0075FF;
  &[data-theme="dark"]{
    --color-tableSecondDT: var(--color-text-S360);
    --headHead: #585858;
    --tableDanger:  var(--color-danger-LimitPTS);
    --tableWarging: var(--color-warning-S360);
    --tableSucces: var(--color-success-S360);

    --tableDangerOK:var(--color-danger-LimitPTS);
    --tableSuccesOK:var(--color-success-S360);

    --tableHover: rgba(255, 255, 255, 0.25);
    --borderTablethml:  #696969;
    --backgroudArrow:  rgb(53 53 53);
  }
}


.filter_row{
  position: relative;
  display: flex;
  align-items: start;
  height: calc(100% + 5px);
  width: 100%;
  cursor: pointer;
  padding-left: 8px;

  .info_icon {
      position: relative;
      top: -2px;
      right: 22px;
      font-size: 12px;
      font-weight: lighter;
      color: red;
      font-variation-settings:
          'FILL' 0,
          'wght' 400,
          'GRAD' 0,
          'opsz' 24;
      transition: transform 0.3s ease;
      transform: scale(0);
      opacity: 0;
  }

  .show_icon {
      transform: scale(1);
      opacity: 1;
  }

  .filter_icon{
      position: relative;
      top: 3px;
      font-size: 12px !important;
      color: rgba(146, 146, 146, 1);
      transition: font-variation-settings 0.3s ease;
      left: 1px
  }
  .expand_icon{
      transition: transform 0.5s ease;
      transform: rotate(0deg);
      position: relative;
      top: 0px;
      right: 4px;
      color: rgba(146, 146, 146, 1);
      align-self: flex-end;
      font-size: 23px;
      height: 19px;
  }

  &.clicked-hover {
    outline: 2px solid var(--color-hover-selected-rows);
    outline-offset: -1px;
  }

  & .clicked-hover2 {
    color:  var(--color-hover-selected-rows);
  }

  .rotate {
      transition: transform 0.5s ease;
      transform: rotate(180deg);
  }
}

.noFilter{
  cursor: default;
  .filter_icon{
      visibility: hidden;
  }
}

.class_selector_filter{
  position: absolute !important;
  display: none;
  z-index: 1000;
  opacity: 0;
  transform: translateY(-10px);
  /* transition: opacity 0.3s ease, transform 0.3s ease; */

  .btn-block{
      flex-direction: row;
      .btn:not(:disabled):not(.disabled){
          width: 100%;
      }
  }

  #selector_filter_table{
      margin: 0;
  }
  .select-btn{
      display: none !important;
  }
}

.class_selector_filter.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

#overlay{
  height: calc(96% - 12px);
  width: 100%;
  overflow: hidden;

  /* Centrar visualmente la barra de scroll */
  &::-webkit-scrollbar {
    height: 8px; /* Altura de la barra de desplazamiento */
    width: 8px;
  }

  &::-webkit-scrollbar-track {
    background-color: var(--background-scroll);
    border-radius: 30px;
  }

  &::-webkit-scrollbar-thumb {
    background-color: #999;
    border-radius: 30px;
  }

  &::-webkit-scrollbar-thumb:hover {
    background: #818080; /* Color cuando se pasa el cursor */
  }

  #overlayContent {

    width: 100%;
    border: 1px solid var(--color-border-S360);
    border-radius: 6px;
    padding: 4px;
    padding-top: 7px;
    position: relative;
    height: 100%;
    overflow: hidden;
    padding-bottom: 8px;

     /* Centrar visualmente la barra de scroll */
    &::-webkit-scrollbar {
      height: 6px; /* Altura de la barra de desplazamiento */
      width: 6px;
    }

    &::-webkit-scrollbar-track {
      background-color: var(--background-scroll);
      border-radius: 30px;
    }

    &::-webkit-scrollbar-thumb {
      background-color: #999;
      border-radius: 30px;
      cursor: pointer;
    }

    &::-webkit-scrollbar-thumb:hover {
      background: #818080; /* Color cuando se pasa el cursor */
    }

    & table {

      color: var(--color-text-S360);
      width: 100%;
      min-width: 1699px;
      border-collapse: separate;
      font-size: var(--font-size-normal-S360);
      border-spacing: 0;

      & th, & td {
        border: 0.1px solid var(--borderTablethml) !important;
        text-align: center;
        vertical-align: middle;
      }

      & thead {
        user-select: none; /* Deshabilita la selección de texto */
        position: sticky;
        top: -1px;
        background-color: #fff;
        z-index: 2;

        & tr:nth-child(2){
          background-color: var(--color-primary)
        }

        tr {
          & th:nth-child(1){
            width: 130px;
            min-width: 130px;
            max-width: 130px;
          }
          & th:nth-child(2){
            width: 100px;
            min-width: 100px;
            max-width: 100px;
          }
          & th:nth-child(3){
            width: 145px;
            min-width: 145px;
            max-width: 145px;
          }
          & th:nth-child(n+4):nth-child(-n+5){
            width: 100px;
            min-width: 100px;
            max-width: 100px;
          }
          & th:nth-child(6){
            width: 10px;
          }
          & th:nth-child(n+7):nth-child(-n+8){
            width: 145px;
          }
          & th:nth-child(9){
            width: 200px;
          }

        }

        & th {
          background: var(--headHead);
          padding: 2px 1px;
          color: white;
          font-size: 13px;
          font-weight: unset;

          &.Limits{
            width: 10px;
          }
        }

        & .reduceWith{
          width: 20px;
        }
        & .reduceComment {
          width: 40px;
        }

        .head_Lir{
          background: var(--tableDanger);
          color: var(--color-tableSecondDT);
        }
        .head_Lie{
          background: var(--tableWarging);
          color: var(--color-tableSecondDT);
        }
        .head_Tg{
          background: var(--tableSucces);
          color: var(--color-tableSecondDT);
        }
        .head_Lse{
          background: var(--tableWarging);
          color: var(--color-tableSecondDT);
        }
        .head_Lsr{
          background: var(--tableDanger);
          color: var(--color-tableSecondDT);
        }
      }

      & tbody {
        td {
          padding: 3px;
        }

        & tr:nth-of-type(odd) {
          background-color: var(--backgroudArrow);
        }

        & .Cumple {
          background-color: var(--tableSuccesOK);
        }
        & .NoCumple {
          background-color: var(--tableDangerOK)
        }
        & tr:hover {
          background-color: var(--tableHover);
        }


      }

      thead th:nth-child(-n+4) {
        background: var(--headHead);
        z-index: 1;
      }

      tbody td:nth-child(1),
      thead th:nth-child(1),
      thead th:nth-child(1) {
        position: sticky;
        left: 0px; /* Ajusta el valor según el ancho de la primera columna */
      }

      tbody td:nth-child(2),
      thead th:nth-child(2),
      thead th:nth-child(2) {
        position: sticky;
        left: 130px; /* Ajusta el valor según el ancho de la primera columna */
      }

      tbody td:nth-child(3),
      thead th:nth-child(3),
      thead th:nth-child(3) {
        position: sticky;
        left: 230px; /* Ajusta el valor según el ancho de la primera columna */
      }
      tbody td:nth-child(4),
      thead th:nth-child(4),
      thead th:nth-child(4) {
        position: sticky;
        left: 375px; /* Ajusta el valor según el ancho de la primera columna */
      }
    }

    & .contenIconsInput {

      & span {
        color: var(--color-border-S360);
        cursor: pointer;
      }

      & i {
        color: var(--color-border-S360);
        cursor: pointer;
      }

      & .material-symbols-outlined{
        font-size: 19px;
      }

      & .containeMessage{
        color: var(--color-containMessage) !important;
      }

      & .activedGrag{
        color: var(--color-activeGrag) !important;
      }
    }

    & .contTitle {
      color: #d1a33c;
      font-weight: bold;
      padding: 0px 0px 4px 0px;
      font-size: var(--font-size-large-S360);
      position: sticky;
      left: 0;
      border-bottom: #d1a33c solid 4px;
      width: calc(100% - 0.4rem);
    }

    & .tabScroll {
      height: calc(100% - 54px);
      overflow: auto;
      padding-right: 5px;
      padding-bottom: 5px;

      /* Centrar visualmente la barra de scroll */
      &::-webkit-scrollbar {
        height: 8px; /* Altura de la barra de desplazamiento */
        width: 8px;
      }

      &::-webkit-scrollbar-track {
        background-color: var(--background-scroll);
        border-radius: 30px;
      }

      &::-webkit-scrollbar-thumb {
        background-color: #999;
        border-radius: 30px;
        cursor: pointer;
      }

      &::-webkit-scrollbar-thumb:hover {
        background: #818080; /* Color cuando se pasa el cursor */
      }

      &::-webkit-scrollbar-corner {
        background-color: transparent; /* Elimina el cuadro blanco */
      }
    }

    .panelInfo {
      border: 1px solid;
      border-radius: var(--border-radius-S360);
      padding: 0px 10px;
      margin-left: 4px;
      user-select: none;
    }
  }
}

.scrollable {
  width: calc(100% - 0.8rem) !important;
}


.freezer{
  position: sticky;
  left: 0;
  background-color: var(--background-S360);
  z-index: 1;
}

#comentModal {
    cursor: not-allowed;
}

@media  (max-width: 991px)   {
  #overlay {
    height: calc(90% - 12px);
  }
}

@media  (max-width: 1739px)   {
  #overlay #overlayContent {
    table{
      width: 80%;
    }
    .scrollable {
      width: calc(100% - 13px) !important;
    }
  }
}

@media  (min-width: 1200px) and  (max-width: 1343px) {
  .panelInfo, #divEmptyFilter div:first-child{
    flex: 0 0 10.333333%;
    max-width: 10.333333%;
  }
}

@media  (min-width: 1200px) and  (max-width: 1343px) {
  .panelInfo, #divEmptyFilter div:first-child{
    flex: 0 0 10.333333%;
    max-width: 10.333333%;
  }
}

@media (max-width: 450px) {
  .freezer{
    position: static;
  }
  #overlay {
    & #overlayContent {
      & table {
        tbody td:nth-child(1),
        thead th:nth-child(1),
        thead th:nth-child(1) {
          position: static;
        }

        tbody td:nth-child(2),
        thead th:nth-child(2),
        thead th:nth-child(2) {
          position: static;
        }

        tbody td:nth-child(3),
        thead th:nth-child(3),
        thead th:nth-child(3) {
          position: static;
        }
        tbody td:nth-child(4),
        thead th:nth-child(4),
        thead th:nth-child(4) {
          position: static;
        }
      }
    }
  }
}
