/*
 Widget plugin - styling for Covid-19 Weekly Incidence Widget

 Whole widget section has class named widget_<class-name-in-lcase>.
 Class c197di is used in widget.
*/

.widget_covid19inzidenzampel .c197di {
  clear: both;
  width: 96%;
  margin: 10px 0;
  padding: 10px 2%;
  /*font: arial, sans-serif;
	font-size: 1.4rem;
	text-align: center;
	line-height: 1.8rem;*/
  background-color: #fff;
}
/* .widget_covid19inzidenzampel .c197di a:link,
.widget_covid19inzidenzampel .c197di a:visited {
	text-decoration: none;
	color: #f78a04;
}
.widget_covid19inzidenzampel .c197di a:hover, .c197di a:active {
	text-decoration: underline;
	color: #512e03;
} */

.widget_covid19inzidenzampel .c197di p.footer {
  text-align: right;
  margin-top: 30px;
}

.widget_covid19inzidenzampel .c197di p.error {
  color: red;
}

/* ul which defines hexagon grid has id #grid */
#grid {
  position: relative;
  width: 125%;
  margin: 0 auto;
  padding: 0; /* Clears unordered list default of 40px */
}

.clear:after {
  content: "";
  display: block;
  clear: both;
}

/* shapes list item to red parallelogram = parent container for hexagon shape */
#grid li {
  list-style-type: none;
  position: relative;
  float: left;
  width: 27.85714285714286%;
  padding: 0 0 32.16760145166612% 0;
  -o-transform: rotate(-60deg) skewY(30deg);
  -moz-transform: rotate(-60deg) skewY(30deg);
  -webkit-transform: rotate(-60deg) skewY(30deg);
  -ms-transform: rotate(-60deg) skewY(30deg);
  transform: rotate(-60deg) skewY(30deg);
  background: #aaaaaa;
  /* border-radius: 10px; */
  overflow: hidden; /* Clips the overflowing shape */
  visibility: hidden; /* hide the parent to only show the hexagon */
}

#grid li * {
  visibility: visible; /* prevent inheritance of the hidden visibility to the child elements */
}

#grid li .hexagon {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #54c6f3;
  -o-transform: skewY(-30deg) rotate(60deg);
  -moz-transform: skewY(-30deg) rotate(60deg);
  -webkit-transform: skewY(-30deg) rotate(60deg);
  -ms-transform: skewY(-30deg) rotate(60deg);
  transform: skewY(-30deg) rotate(60deg);
  overflow: hidden; /* Clips any child element, e.g. an image so it does not overflow */
}

#grid div.hexagon.hidden {
  visibility: hidden;
}
#grid div.hexagon.info {
  background: gray;
}
#grid div.hexagon.more-danger {
  background: purple;
}
#grid div.hexagon.danger {
  background: #ff0022;
}
#grid div.hexagon.warning {
  background: #fdbf00;
}
#grid div.hexagon.ok {
  background: darkseagreen;
}

/* Add a margin to the centered hexagons in each row; 3n+2: 3=number of hexagons in a row, n=counter, 2=second hexagon */
#grid li:nth-child(3n + 2) {
  margin: 0 1%;
}

/* shift hexagons in every second row to achive honeycomb grid */
#grid li:nth-child(6n + 4),
#grid li:nth-child(6n + 5),
#grid li:nth-child(6n + 6) {
  margin-top: -6.9285714285%;
  margin-bottom: -6.9285714285%;
  -o-transform: translateX(50%) rotate(-60deg) skewY(30deg);
  -moz-transform: translateX(50%) rotate(-60deg) skewY(30deg);
  -webkit-transform: translateX(50%) rotate(-60deg) skewY(30deg);
  -ms-transform: translateX(50%) rotate(-60deg) skewY(30deg);
  transform: translateX(50%) rotate(-60deg) skewY(30deg);
}

/* to correct the margin in  */
#grid li:nth-child(6n + 4) {
  margin-left: 0.5%;
}

/* to add some text in the middle of the hexagon */
#grid li p {
  text-align: center;
  color: white;
  margin: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  -o-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  -moz-transform: translate(-50%, -50%);
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
}

#grid li div.hexagon > p > span.value {
  font-size: 30px;
  font-weight: bold;
}

#grid li div.hexagon > p > span.subtitle {
  font-weight: bold;
}
