/* globales */

ul {
  margin: 0;
  padding: 0;
  margin-bottom: 10px;
}

ul li {
  list-style: none;
  padding-bottom: 10px;
}

ul li:last-child {
  padding-bottom: 0;
}
/********************/

.custom-container {
  max-width: 100%;
  margin: 0 auto;
  height: auto;
}

#obras-mapa-container {
  max-width: 100%;
  margin: 10px 17px;
  height: auto;
  font-family: sans-serif, Raleway !important;
}
#obras-mapa-filtro {
  display: grid;
  grid-template-columns: 80% 20%;
  grid-template-rows: auto;
  grid-template-areas:
    "filtro-estado total-obras"
    "filtro-departamento total-obras";
  /*
  margin-bottom: 15px;
  padding: 10px;
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);*/
}

.filtro-departamento {
  grid-area: filtro-estado;
  color: white;
  /*display: inline-flex*/
}

.filtro-departamento {
  grid-area: filtro-departamento;
  color: black;
  display: inline-flex;
}
.filtro-titulo {
  /* color: #7a7a7a;*/
  color: black;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 17px;
  padding-right: 10px;
  display: inline;
}

.filtro-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: inline;
}

.filtro-list li {
  margin-right: 20px;
}

.filtro-list li:last-child {
  margin-right: 0px;
}

.filtro-label-text {
  color: black;
}

.filtro-list-item {
  text-transform: capitalize;
  font-weight: bold;
  font-size: 16px;
  display: inline-flex;
}

.filtro-nObras {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
  margin-left: 6px;
  border: 1px solid #000;
  color: black;
}

.filtro-nObras-adjudicada {
  background-color: rgb(122, 51, 45);
  color: white;
}
.filtro-nObras-ejecucion {
  background-color: rgb(38, 151, 64);
  color: white;
}

.filtro-nObras-finalizada {
  background-color: rgb(5, 28, 158);
  color: white;
}

.label-adjudicada {
  color: rgb(122, 51, 45);
}

.label-ejecucion {
  color: rgb(38, 151, 64);
}

.label-finalizada {
  color: rgb(5, 28, 158);
}

/* Total */
#total-texto {
  grid-area: total-obras;
  font-family: fantasy;
  font-size: 3.5vh;
  color: black;
  justify-self: center;
  /*align-self: center;*/
}

#total-count {
  grid-area: total-obras;
  font-size: 6vh;
  margin-top: 2vh;
  font-family: fantasy;
  justify-self: center;
  align-self: center;
  z-index: 2;
  color: #00adfe;
}

#obras-mensaje {
  display: flex;
  justify-content: space-between;
}
.mapa-instruccion {
  font-style: italic;
  color: #333;
}

/*Estilos obras-mapa-grid */
#obras-mapa-grid {
  margin: 10px auto;
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  grid-template-rows: auto;
  grid-template-areas:
    "mapa-obras"
    "lista-obras"
    "single-obra"
    "contenedor-canvas";
  overflow: hidden;
}

#mapa-obras {
  grid-area: mapa-obras;
  position: relative;
  width: 100%;
  height: 870px;
  background-color: #fff;
  color: transparent;
  box-shadow: 10px 10px 14px -16px rgba(4, 4, 4, 0.75);
}

#lista-obras-container {
  grid-area: lista-obras;
  position: absolute;
  /*top: 10px;*/
  left: 68px;
  max-width: 20%;
  min-width: 300px;
  max-height: 700px;
  /*  border: solid  rgb( 211,211, 211);
  background: rgba(215, 213, 213, 0.8);*/
  padding: 10px;
  /*  box-shadow: 9px 8px 17px rgba(0, 0, 0, 0.5);*/

  /*  margin-top: 10px;*/
  z-index: 1100;
  pointer-events: none;
}

#titulo-lista-obras {
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  color: white;
  background: black;
  width: 300px;
  height: 30px;
  padding: 0;
  pointer-events: auto;
}
#titulo-lista-arrow {
  margin-left: 88px; /* Espacio entre la flecha y el texto */
}
#titulo-lista-cuenta {
  margin-left: 45px;
  padding: 5px 10px;
  color: black;
  background-color: white;
  min-width: 33px;
}

#cuerpo-lista {
  position: relative;
  /*left: 60px;
   max-width: 20%;*/
  width: 300px;
  max-height: 670px;
  border: 1px rgb(0, 0, 0);
  overflow-y: auto;
  pointer-events: auto;
  margin-top: 5px;
}
#lista-obras {
  margin: 0px;
}

#lista-obras li {
  font-size: 14px;
  line-height: 1.5;
  font-weight: 700;
  font-family: sans-serif;
  color: black;
}

#lista-obras li:hover {
  color: gray;
  background-color: transparent;
}

.collapsed {
  display: none;
}

.totales-control div {
  font-size: 12px;
  line-height: 1.5;
}
.totales-control h4 {
  margin: 0 0 10px 0 !important;
  font-size: 12px;
}

.totales-control p {
  margin: 5px 0;
  font-size: 12px;
}
/* Estilos para la Lista de Obras */

/* Single obra */
/* Alexis  */
#single-obra {
  grid-area: single-obra;
  position: absolute;
  /* top: 210px;*/
  right: 20px;
  max-width: 25%;
  min-width: 300px;
  height: 700px;
  border: solid rgb(211, 211, 211);
  background: rgba(215, 213, 213, 0.8);
  padding: 10px;
  box-shadow: 9px 8px 17px rgba(0, 0, 0, 0.5);
  overflow-y: auto;
  overflow-x: hidden;
  margin-top: 10px;
  z-index: 1100;
  display: none;
}
#single-obra .article-obras {
  display: grid;
  height: 100%;
  max-height: 100%;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  /*  grid-template-rows: 15% 26% 44% 3%;*/
  grid-template-rows: 15% 34% 40% 6%;
  grid-template-areas:
    "titulo titulo titulo titulo"
    " imag imag imag imag"
    "estado estado ul ul"
    "masInfo masInfo masInfo masInfo";
  font-weight: 500;
  row-gap: 2%;
  max-width: 100%;
  color: black;
  /* align-items: center;*/
  /*justify-items: end */
}

#single-obra #titulo {
  grid-area: titulo;
  /*margin: 5px 5px;*/
  padding: 3px 3px;
  max-width: 100%;
  overflow-y: auto;
  box-shadow:
    inset 2px 2px 3px rgb(159, 159, 159),
    inset -2px -2px 3px rgb(255, 255, 255);
}
#titulo > h2 {
  font-size: 17px;
  line-height: 120%;
  margin: 5px 0 0 5px;
  /* padding: 0px;*/
  font-family: sans-serif;
}

#single-obra #estado {
  grid-area: estado;
  margin-top: 20px;
}

.monto-total {
  /*text-decoration: underline;*/
  background: powderblue;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
  padding-left: 8px;
  padding-right: 8px;
}

#single-obra #imag {
  grid-area: imag;
  font-size: 12px;
  line-height: 120%;
  max-width: 100%;
  margin: 0px 7px;
}

#single-obra #imagen {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-left: 1px ridge white;
  border-top: 1px ridge white;
  border-right: 1px ridge black;
  border-bottom: 1px ridge black;
}

/* #imagen:hover {
  transform: scale(1.05);
} */

#single-obra #masInfo {
  font-size: 11px;
  margin-top: 10px;
  grid-area: masInfo;
  /*display:flex ;*/
}

#single-obra .article-obras ul {
  font-size: 12px;
  line-height: 120%;
  grid-area: ul;
  /*font-weight: 700;*/
  margin-top: 20px;
}

/* Estilos para los clústeres */
.marker-cluster-small {
  background-color: rgba(181, 226, 140, 0.6);
}
.marker-cluster-small div {
  background-color: rgba(110, 204, 57, 0.6);
}
.marker-cluster-medium {
  background-color: rgba(241, 211, 87, 0.6);
}
.marker-cluster-medium div {
  background-color: rgba(240, 194, 12, 0.6);
}
.marker-cluster-large {
  background-color: rgba(253, 156, 115, 0.6);
}
.marker-cluster-large div {
  background-color: rgba(241, 128, 23, 0.6);
}
.marker-cluster-small span {
  color: white; /* Color del número */
  font-weight: bold;
}

.marker-cluster-medium span {
  color: yellow;
  font-weight: bold;
}

.marker-cluster-large span {
  color: red;
  font-weight: bold;
}
/* Estilos para leaflet */
.obra-tooltip {
  background-color: #909090d4;
  border: 1px solid #fff;
  color: #020202;
  max-width: 480px !important;
  /* white-space: pre-wrap;*/
  word-wrap: break-word !important;
  text-align: left;
  /* word-break: keep-all !important; */
}

/* Estilo para el botón de centrar */
.centrar-control .toggle-clustering-control a {
  display: block;
  width: 26px;
  height: 26px;
  line-height: 26px;
  text-align: center;
  background-color: #fff;
  color: #000;
  font-size: 18px;
  text-decoration: none;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  cursor: pointer;
}

.centrar-control .toggle-clustering-control a:hover {
  background-color: #f4f4f4;
}

.centrar-control .toggle-clustering-control a:active,
.centrar-control .toggle-clustering-control a:focus {
  background-color: #fff; /* Forzar blanco después de clic */
}

/* Estilos chartjs */

#contenedor-canvas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 40px;
  justify-content: center;
}

.grafico {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

canvas {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 / 1; /* Mantiene proporción 1:1 */
}

@media screen and (max-width: 42em) {
  .custom-container {
    max-width: 100%;
    margin: 0 auto;
  }

  #single-obra {
    position: relative;
    width: auto;
    top: 0px;
    right: 0px;
    max-width: 100%;
  }

  #lista-obras-container {
    display: none;
  }

  /* .content-table table {
    max-width: 2000px;
    width: 2000px;
  }*/
}

@media (max-width: 520px) {
  #contenedor-canvas {
    grid-template-columns: 1fr;
  }

  .grafico {
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .filtros-control div {
    display: block;
  }
  .filtros-control select {
    width: 100%;
  }
}
