.title-container {
  text-align: center;
  margin-top: 24px;
  margin-bottom: 8px;
}

.viz-title {
  font-family: "IBM Plex Mono", sans-serif;
  font-weight: 700;
  font-style: italic;
  font-size: 30px;
  line-height: 1.5;
  color: #fff;
  border: 1px solid #fff;
  border-radius: 60px;
  padding: 4px 48px;
}

.fuga06 .viz-title {
  font-weight: 500;
  text-transform: uppercase;
  font-style: normal;
}

.title-container4 {
  text-align: center;
  margin-top: 24px;
  margin-bottom: 8px;
}

.viz-title4 {
  font-family: "Homemade Apple", cursive;
  font-style: italic;
  font-size: 30px;
  line-height: 1.5;
  color: #fff;
  border-bottom: 1px solid #fff;
}

.subtitle-container {
  text-align: center;
  margin-bottom: 62px;
}

.viz-subtitle {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-size: 30px;
  line-height: 1.4;
  letter-spacing: 0;
  color: #261729;
  background-color: #fff;
  padding: 8px 24px;
}

svg .tick text,
svg .annotation {
  font-family: "IBM Plex Mono", sans-serif;
  color: #fff;
  font-size: 14px;
  font-weight: 400;
}

svg .nombre-lista {
  font-size: 18px;
}

svg .tick line {
  stroke: #fff;
  stroke-width: 1.5;
}

#distrito-secciones svg .tick line {
  stroke: #2C1D30;
  stroke-width: 0.2;
}

#distrito-secciones svg .tick text,
#distrito-secciones svg .annotation {
  color: #2C1D30;
}

.fuga05 svg .tick line {
  stroke: #E3D2FF;
  stroke-width: 0.2;
}

.fuga05 svg .tick text,
.fuga05 svg .annotation {
  color: #E3D2FF;
  fill: #E3D2FF;
}

.fuga05 .nacional-label,
.fuga05 .provincial-label {
  font-family: "IBM Plex Mono", sans-serif;
  color: #04081A;
  font-size: 14px;
}

.viz-legend {
  text-align: center;
  margin-bottom: 12px;
}

.tape {
  max-width: 150px;
  margin-bottom: -15px;
  margin-left: 40px;
  position: relative;
}


.tape p {
  background-color: #ea98ff;
  font-family: "Homemade Apple", cursive;
  padding: 5px 35px;
  text-align: center;
}

.viz04-08 {
    position: absolute;
  top: calc(50% - 220px);
  align-items: center;
}

.legend-item {
  font-family: "IBM Plex Mono", sans-serif;
  color: #fff;
  font-weight: 400;
  font-style: normal;
  text-transform: uppercase;
  display: inline-block;
  text-align: left;
}

.legend-item:not(:last-child) {
  margin-right: 60px;
}

.double-item > .legend-item {
  max-width: 230px;
}

.legend-encabezadas,
.legend-competitivas {
  display: inline-block;
  position: relative;
  right: 0;
  top: 6px;
  content: "";
  width: 35px;
  height: 26px;
  border-radius: 20px;
  margin-right: 12px;
}

.legend-encabezadas {
  background-color: #a969c4;
}

.legend-competitivas {
  background-color: #e492ff;
}

.double-item > .legend-competitivas,
.double-item > .legend-encabezadas {
  line-height: 48px;
  vertical-align: top;
}

.viz-text {
  font-family: "IBM Plex Mono", sans-serif;
  color: #fff;
  font-size: 16px;
  font-weight: 400;
  align-content: flex-end;
  line-height: 1.2;
  letter-spacing: 0px;
}

.viz-text ul {
  list-style-type: disc;
  list-style-type: circle;
  color: #a969c4;
  font-size: 1.5rem;
  margin-top: 10px;
}

.viz-text ul span {
  color: white;
  font-size: 1rem;
}

.viz-text p {
  margin-top: 10px;
}

.viz-explain {
  text-align: left;
  margin: 0 auto;
  color: white;
  font-family: "IBM Plex Mono", monospace;
  margin-top: 40px;
  padding: 0 40px;
}

.viz-explain .d-u {
  background-color: #ea98ff;
  color: black;
  border-radius: 5px;
}

.viz-explain .s-e {
  background-color: #8a40ff;
  border-radius: 5px;
}

.viz-grid {
  display: grid;
  grid-auto-flow: column;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  grid-template-rows: repeat(5, minmax(0, 1fr));
  height: 90vh;
  padding: 5vh 5vw;
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.fuga05 .viz-grid {
   grid-template-rows: repeat(7, minmax(0, 1fr));
}

.fuga03 .viz-grid {
   grid-template-rows: repeat(10, minmax(0, 1fr));
}

.viz-tag {
  font-family: "Homemade Apple", serif;
  font-style: normal;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0px;
  background-color: #c271d6;
  border-radius: 20px;
  margin-bottom: 18px;
  padding: 8px 40px;
  display: inline-block;
}

.viz-tag4,
.camara-diputados,
.senadores {
  font-family: "IBM Plex Mono", monospace;
  font-style: normal;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0px;
  border-radius: 20px;
  border: 1px solid white;
  margin: 0 auto 18px auto;
  padding: 8px 40px;
  display: inline-block;
}

.camara-diputados {
  background-color: #c271d6;
  border: none;
  color: black;
}

.senadores {
  background-color: #7dea87;
  border: none;
  color: black;
}

.camara-diputados,
.senadores {
  display: table;
}

#distrito-secciones .viz-grid {
  grid-auto-flow: row;
}

#viz04-01,
#viz04-02,
#viz04-03 {
  margin: 0 auto;
}

.viz-tooltip {
  position: relative;
  width: 300px;
  height: auto;
  text-align: center;
  font-family: "IBM Plex Mono", monospace;
  background-color: #FFF;
  padding: 8px 12px;
  border-radius: 12px;
  color: #302235;
  display: none;
}

.viz-tooltip:after {
  content: '';
  position: absolute;
  left: 42%;
  top: 100%;
  width: 0;
  height: 0;
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  border-top: 20px solid #FFF;
  clear: both;
}

.tooltip-title {
  text-align: left;
  font-size: 1.2rem;
  text-transform: uppercase;
  font-weight: 700;
}

.viz-tooltip p {
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.4rem;
}

.viz-tooltip .tooltip-number {
  font-style: normal;
  font-weight: 700;
}

#close {
  cursor: pointer;
  float: right;
}

.rect-bg, .rect-mg, .rect-fg {
  cursor: pointer;
}

svg .diputados,
svg .senadores {
  cursor: pointer;
}

@media (max-width: 1200px) {
  svg .tick text,
  svg .annotation,
  svg .nombre-lista {
    font-size: 12px;
  }
}

@media (max-width: 1000px) {
  svg .tick text,
  svg .annotation,
  svg .nombre-lista {
    font-size: 10px;
  }
}

@media (max-width: 500px) {
  svg .tick text,
  svg .annotation,
  svg .nombre-lista {
    font-size: 8px;
  }
}

@media (max-width: 790px) {
  .viz-title {
    font-size: 16px;
    padding: 4px 6px;
  }

  .viz-subtitle {
    font-size: 16px;
    line-height: 1.2;
    padding: 8px 6px;
  }
   
  .viz-text {
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  .viz-grid {
    grid-auto-flow: row;
    gap: 8px;
  }

  .viz-explain {
    margin-top: 0;
    padding: 0 20px;
    font-size: 12px;
  }

  .viz-tooltip {
    width: 190px;
    padding: 4px 6px;
  }

  .tooltip-title {
    font-size: 0.9rem;
  }


  .viz-tooltip p {
    font-size: 0.8rem;
    line-height: 1rem;
  }

  .col-none {
    grid-column: none;
  }

  .viz-tag4,
  .camara-diputados,
  .senadores {
    font-size: 13px;
    line-height: 1.2;
    padding: 4px 40px;
    margin-bottom: 6px;
  }

  .viz-text ul {
    font-size: 12px;
  }

  .viz-text ul span {
    font-size: 12px;
  }

  .fuga05 .nacional-label,
  .fuga05 .provincial-label {
    font-size: 12px;
  }

  .fuga06 .title-container {
    line-height: 1.1;
    color: #fff;
    border: 1px solid #fff;
    border-radius: 60px;
    padding: 4px 48px;
  }

  .fuga06 .viz-title {
    border: none;
    padding: 0;
  }
}

@media (max-width: 625px) {

  .viz-text {
    font-size: 12px;
  }

  .viz-tag {
    margin-bottom: 8px;
  }

  .legend-item {
    font-size: 12px;
  }

  .legend-item:not(:last-child) {
    margin-right: 12px;
  }
}

@media (max-width: 540px) {

  .double-item > .legend-item {
    max-width: 150px;
    vertical-align: top;
  }
}



@media (max-width: 500px) {
  .legend-encabezadas,
  .legend-competitivas {
    top: 6px;
    width: 21px;
    height: 18px;
    margin-right: 4px;
  }

  .viz-tag {
    font-size: 14px;
    margin-bottom: 8px;
    padding: 6px 20px;
  }

  .double-item > .legend-item {
    max-width: 120px;
    vertical-align: top;
    font-size: 10px;
  }

  .viz-text p {
    margin-top: 0;
  }
}