@import url("https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Open+Sans:wght@400;600;800&display=swap");

:root {
  --clr-princ-2: #009acd;

  --cl-geo: MediumSeaGreen;
  --cl-misrepo: FireBrick;
  --cl-repor: #03a9f4;
  --cl-prosp: #FF9800;
  
  --cp-grosor: 3px;
}

.centrar {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

header {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  box-sizing: border-box;
  width: 100vw;
  padding: 10px 30px;
  background: #fff;
  box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.2);
  user-select: none;
  font-size: 0.9rem;
}

header > div {
  display: flex;
  flex-direction: row;
  flex: 1;
  max-width: 1200px;
  flex-wrap: wrap;
  align-items: center;
}

header nav ul {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  flex: 1;
  gap: 4px;
  list-style-type: none;
  padding: 0;
}

header nav ul img {
  width: auto;
  height: 50px;
  margin-right: 20px;
}

header nav ul li {
  padding: 16px 8px;
}

header nav ul li:hover {
  color: #666;
}

header nav ul .activo {
  background-image: linear-gradient(to bottom, #ffffff00, #ddd);
  border-radius: 0 0 10px 10px;
}

header > div > div {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  min-width: 210px;
  flex: 1;
  gap: 10px;
}

header .boton {
  height: 36px;
  padding: 0 16px;
  background: #0091c1;
  border-radius: 6px;
  color: #fff;
}

header .boton:hover {
  filter: brightness(1.2);
}

.o_lang_flag {
  width: 1.3rem;
  height: 1.3rem;
  margin-right: 10px;
  border-radius: 50%;
}

/* -------------------------------------------- */

.hidden {
  display: none;
}

.centrar {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.bold {
  font-weight: 600;
}

.linea {
  margin: 10px 0;
  border-top: 1px solid #ddd;
  width: 100%;
}

.cerrar {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #111;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  transition: transform 0.2s ease;

  &:hover {
    transform: rotate(180deg);
  }

  & i {
    color: white;
    font-size: 1rem;
  }
}

/* Botones tipo de vista */
.tipo-vista {
  & .forma-grilla,
  & .forma-titulos {
    background: #ddd;
  }

  & .activo {
    background: #888 !important;
    color: white;
  }
}

/* -------------------------------------------- */
/* MODAL REPORTES general */

.modal_reportes {
  font-family: "Open Sans", sans-serif;
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 20px;
  position: relative;
  max-width: 1200px;
  width: 75%;
  height: 90vh;
  background: #ffffff;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  color: #555;
  /*resize: both;*/
  overflow-x: hidden;
  box-sizing: border-box;

  &.explorer_window:not(closed) {
    animation: fadein .3s ease;
  }

  & .marco {
    width: 100%;
    height: 100%;
    margin-top: 10px;
    overflow: hidden;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: 40px 1fr;
    gap: 20px;

    & button {
      color: grey;
      border-radius: 50%;
      height: 40px;
      width: 40px;
      border: 2px solid #ddd;
      cursor: pointer;
      &:hover {
        border: 2px solid #bbb;
      }
    }

    & .listado {
      overflow-y: auto;
    }
    & .temas {
      width: 170px;
      overflow: hidden;
      transition: width 0.2s ease-in-out;
    }
    &.collapsed {
      & .temas {
        width: 0px !important;
      }
    }
    & input {
      height: 40px;
      border-radius: 20px;
      padding: 16px;
      width: 80%;
      border: 2px solid #ddd;
    }
  }

  & .titulo {
    width: 100%;
    font-size: 1.3rem;
    line-height: 1.5rem;
    font-weight: 800;
    color: #333;
  }

  & .icono {
    float: inline-end;
    margin-inline-start: 1rem;
  }

  & .subtit {
    margin: 6px 0;
    font-weight: 800;
  }

  & .btn-tipo {
    width: 170px;
    height: 36px;
    background: white;
    display: flex;
    flex-direction: row;
    padding: 12px;
    border-radius: 6px;
    align-items: center;
    color: #666;
    gap: 10px;
    transition: background 0.3s ease;
    &.active {
      background: var(--clr-princ-2);
      color: white;
    }
    &:hover {
      background: #eee;
      color: var(--clr-princ-2);
      cursor: pointer;
    }
  }
}

.modal_reportes.closed {
   display: none;
}

/* -------------------------------------------- */
/* LISTA de REPORTES con miniaturas */

.lista_grilla {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  /*flex-direction: row;
  flex-wrap: wrap;*/
  gap: 18px;

  /*width: 100%;*/
  padding: 0px 0px 10px 0px;
  overflow-x: hidden;
  overflow-y: auto;
  align-content: flex-start;

  & .reporte {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 160px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: opacity 0.4s ease;
    
    &.tipo-geoecon .textos {
      border-top: var(--cp-grosor) solid var(--cl-geo); 
    }
    &.tipo-mis-capas .textos {
      border-top: var(--cp-grosor) solid var(--cl-misrepo);
    }
    &.tipo-mis-reportes .textos {
      border-top: var(--cp-grosor) solid var(--cl-repor);
    }
    &.tipo-mis-prospects .textos {
      border-top: var(--cp-grosor) solid var(--cl-prosp);
    }

    & div.imagen {
      display: flex;
      align-items: center;
      width: 100%;
      height: 108px;
      overflow: hidden;

      background-image: url(https://geoecon.info/web/image/1350-dcac6b7b/logo-margen.png), radial-gradient(rgb(183 183 183), rgb(135 135 135));
      background-size: contain;
      background-repeat: no-repeat;
      background-position: center;

      & img {
        width: 100%;
        transition: transform 0.5s ease;
      }
    }

    & > div.textos {
      width: 100%;
      height: 50px;
      padding: 6px 24px 8px 10px;
      box-sizing: border-box;
      background: #e1e1e1;
      color: #333;
      opacity: 1;
      position:relative;
      transition: height 0.4s ease, background .4s ease, color .4s ease;
      z-index: 1;

      & i {
        margin-right: 4px;
      }

      & .tit {
        font-size: 0.9rem;
        font-weight: 600;
        line-height: 1.1rem;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      & .fech {
        font-size: 0.8em;
        display: none;
      }

      & .aut {
        font-size: 0.8em;
        position: absolute;
        bottom: 8px;
      }

    }

    & div.contextual {
      position: absolute;
      bottom: 8px;
      right: 10px;
      width: 30px;
      height: 30px;
      border-radius: 50%;
      display: flex;
      justify-content: center;
      align-items: center;

      & i {
        margin-right: 0;
      }

      &:hover {
        background: #555;
      }
    }

    &:hover {
      & div.imagen img {
        transform: scale(1.2);
      }

     

      & .textos {
        background: var(--clr-neutro-2);
        color: white;
        height: 80px; 
        
        & .tit {
          -webkit-line-clamp: 2;
        }
        
      }
    }
    &.agregar {
      box-sizing: border-box;
      background: var(--clr-princ-6);
      color: #2c6d83;
      /*flex-direction: row;
      justify-content: flex-start;*/
      gap: 0px;
      padding-inline: 10px;
      transition: background 0.2s ease;
      & i {
        font-size: 3rem;
        margin-bottom: 8px;
      }
      &:hover {
        background: var(--clr-princ-2);
        color: white;
      }
    }
  }
  & .vacio {
    min-width: 250px;
    width: 250px;
    height: 160px;
    border-radius: 8px;
    border: 2px #aaa dashed;
    background: #eee;
  }
}

/* -------------------------------------------- */
/* LISTA por TITULOS */

.lista_titulos {
  display: flex;
  flex-direction: column;
  gap: 2px;

  & .encabezado {
    display: flex;
    flex-direction: row;
    gap: 8px;
    padding: 10px 26px 10px 10px;

    & div:nth-child(1) {
      width: 100%;
    }
    & div:nth-child(2) {
      width: 200px;
      text-align: center;
    }
    & div:nth-child(3) {
      width: 200px;
      text-align: center;
    }
    & div:nth-child(4) {
      width: 30px;
    }
  }

  & div {
    font-size: 0.9rem;
  }

  & .reporte {
    position: relative;
    display: flex;
    flex-direction: row;
    gap: 8px;
    justify-content: space-between;
    align-items: center;
    background: white;
    border-radius: 0px 6px 6px 0px;
    padding: 16px 26px 16px 16px;
    transition: background 0.3s ease;

    &:hover {
      background: #eee !important;
      /*color: white !important;*/
      cursor: pointer;
    }
    
    /* Colores para la lista */
    &.tipo-geoecon .textos {
        border-left: var(--cp-grosor) solid var(--cl-geo) !important;
    }
    &.tipo-mis-capas {
        border-left: var(--cp-grosor) solid var(--cl-misrepo) !important;
    }
    &.tipo-mis-reportes {
        border-left: var(--cp-grosor) solid var(--cl-repor) !important;
    }
    &.tipo-mis-prospects {
        border-left: var(--cp-grosor) solid var(--cl-prosp) !important;
    }

    /*&:nth-child(even) {
      background: #0002;
    }

    &:nth-child(odd) {
      background: #0001;
    }*/

    & .imagen {
      display: none;
    }

    & .textos {
      display: flex;
      flex-direction: row;
      gap: 8px;
      width: 100%;

      & .tit {
        width: 100%;
      }

      & .aut {
        font-size: 0.8rem;
        width: 200px;
      }

      & .fech {
        font-size: 0.8rem;
        width: 200px;
      }

      & i {
        margin-right: 4px;
      }
    }

    &.agregar {
      justify-content: flex-start;
      background: var(--clr-princ-6);
      color: #2c6d83;
      & i {
        font-size: 1.4rem !important;
      }
      &:hover {
        background: var(--clr-princ-3) !important;
        color: white;
      }
    }

    & div.contextual:last-child {
      position: absolute;
      top: 10px;
      right: 8px;
      width: 30px !important;
      height: 30px !important;
      border-radius: 50%;
      display: flex;
      justify-content: center;
      align-items: center;

      & i {
        margin: 0;
      }

      &:hover {
        background: #555;
        color: white;
      }
    }
  }
  & .vacio {
    height: 30px;
    padding: 10px 26px 10px 10px;
    border: 1px #aaa dashed;
    background: #fff;
    border-radius: 6px;
  }
}

/* -------------------------------------------- */
/* MENU CONTEXTUAL */

#context-menu {
  padding: 0px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #eee;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
  width: 200px;

  & ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  & li {
    padding: 10px 15px;
    cursor: pointer;

    &:hover {
      background: #ddd;
    }
  }
}
