h1,
h2,
h3 {
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  padding: 0;
}
p {
  text-wrap: pretty;
}
fieldset {
  padding-block: 0.5rem;
  margin-bottom: 0.5rem;
}

.app {
  min-height: 100dvh;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 3fr 1fr;
  grid-template-rows: 75px auto auto;
  column-gap: 2rem;
}
#titulo {
  h1 {
    font-size: 2rem;
  }
  margin: 1rem;
}

.map {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 100%;
}

#titulo {
  text-align: center;
  grid-row: 1/2;
  grid-column: 1/4;
}

#comparison-container {
  grid-column: 2/3;
  grid-row: 2/4;
  position: relative;
  width: 100%;
  height: 100%;
}

#capa-info {
  grid-column: 1/2;
  grid-row: 3/4;
  /* grid */
  border-radius: 3px;
  bottom: 1rem;
  right: 10px;
  z-index: 1;
}

.legend {
  span {
    border: 1px solid black;
  }
  grid-column: 3/4;
  grid-row: 3/4;
  background-color: azure;
  border-radius: 3px;
  bottom: 30px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  color: black;
  font: 12px/20px "Helvetica Neue", Arial, Helvetica, sans-serif;
  padding: 10px;
  right: 10px;
  z-index: 1;
}

.legend h4 {
  margin: 0 0 10px;
}

.legend div span {
  border-radius: 50%;
  display: inline-block;
  height: 10px;
  margin-right: 5px;
  width: 10px;
}

/*datos*/
#datos {
  grid-column: 3/4;
  grid-row: 2/3;
}

#datos h2 {
  margin-bottom: 0.5rem;
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.card .icon {
  font-size: 1.5rem;
}

.card small {
  display: block;
  font-size: 0.7rem;
  color: #555;
}

.card strong {
  font-size: 1.1rem;
}

/* privacioncnvergente */
.card.highlight {
  background: #fce4ec;
  border-left: 5px solid #dd1c77;
}

/*filtros*/

/* #filtros {
  grid-column: 1/2;
  grid-row: 1/2;
  > div {
    display: flex;
  }
} */

#filtros {
  grid-column: 1/2;
  grid-row: 2/3;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.5rem;
}

/* Card de cada grupo */
#filtros fieldset {
  border: none;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  /*flex*/

  display: flex;
}

/* Título del filtro */
#filtros legend {
  font-weight: bold;
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
  color: #333;
}

#filtros fieldset:has(input[type="checkbox"]:checked) {
  border-left: 4px solid #dd1c77;
  background: #fce4ec;
}

#filtros fieldset div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/*checkbox*/
input[type="checkbox"] {
  display: none;
}

.checkbox {
  font-size: 0.7rem;

  span {
    display: inline-block;
    position: relative;
    height: 2em;
    width: 2em;
    background: azure;

    transition: all 0.7s;
  }

  input:checked ~ span {
    box-shadow: 0 0 10px 0 #09f;
  }

  input:checked ~ span:after {
    opacity: 1;
  }
  span {
    border: 1px solid black;
  }

  span:after {
    content: "";

    position: absolute;
    border: solid black;
    border-width: 0 0.3em 0.3em 0;
    transform: rotate(45deg);
    width: 0.5em;
    height: 1em;
    left: 0.6em;
    top: 0.25em;
    opacity: 0;
    transition: 0.3s ease;
  }
}

/*dialog info*/
dialog {
  max-width: 400px;
  border-radius: 8px;
  border: none;
  padding: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  p {
    padding: 1rem;
  }
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.4);
}

.info-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
}
