:root {
  --c-brand: #1b6598;
}

body {
  width: 100%;
  font-family: sans-serif;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  margin: 0px;
  padding: 0px;
}

#basic_poll {
  width: 100%;
}

.basic_poll_bg_image {
  background-color: white;
  opacity: 0.9
}

/* Header */
#grp_header {
  text-align: center;
  text-align: -webkit-center;
  padding: 10px 10px 10px 10px;
}
@media screen and (max-width: 480px) {
  #grp_header {
    padding: 5px 10px 5px 10px;
  }
}

#title {
  font-size: 22px;
  font-weight: bold;
}

#description {
  font-size: 14px;
}

/* Question and Result */
#grp_question,
#grp_result {
  padding: 0px 10px 0px 10px;
  text-align: center;
  text-align: -webkit-center;
}
.result_summary {
  color: var(--c-brand);
  border-top: solid #F0F0F0 1px;
  margin-top: 10px;
  padding-top: 10px;
}

/* Footer */
#grp_footer {
  font-size: 13px;
  text-align: center;
  text-align: -webkit-center;
  width: 100%;
  padding: 10px 10px 10px 10px;
}
@media screen and (max-width: 480px) {
  #grp_footer {
    padding: 5px 10px 5px 10px;
  }
}


/* Options */
.option {
  position: relative;
  cursor: pointer;
  padding: 0.8em 1.8em;
  margin-top: 20px;
  border: 4px solid #C0C0C0;
  overflow: hidden;
  text-align: center;
  text-align: -webkit-center;
  font-size: 16px;
  transition: 0.3s;
  z-index: 1;
  font-family: inherit;
  border-radius: 18px;
  max-width: 400px;
}

/* Extra styles for 2, 3, 4, 5, 6, possible options */
.option2 { margin-top: 60px; }
.option3 { margin-top: 50px; }
.option4 { margin-top: 40px; }
.option5 { margin-top: 30px; }
.option6 { margin-top: 20px; }


.option::before {
  content: "";
  width: 0;
  height: 1000%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  background: #C0C0C0;
  transition: 0.5s ease;
  display: block;
  z-index: -1;
}

.option:hover::before {
  width: 105%;
}

.option:hover {
  color: #111;
}

.option_title {
  font-weight: bold;
  font-size: 16px;
}

.option_description {
  font-weight: normal;
  font-size: 12px;
}

.option_gender {
  margin-top: 20px;
  margin-bottom: 20px;
  padding: 0.5em 0.5em;
}

.option_age {
  margin-top: 5px;
  padding: 0.5em 0.5em;
}

.advice_gender, .advice_age {
  max-width: 500px;
  font-size: 14px;
  padding: 5px;
}


/* Loading */
#loading {
  position: absolute;
  width: 100%;
  top: 20%;
  z-index: 1000;
  text-align: center;
  text-align: -webkit-center;
}

/* Results */
.result {
  display: none;
  padding: 8px 0;
  max-width: 600px;
}
.result_title {
  width: 100%;
  font-weight: bold;
  text-align: left;
  text-align: -webkit-left;
  margin-bottom: 4px;
  color: #323030;
  font-size: 1rem;
}
.result_bar {
  position: relative;
  width: 100%;
  height: 35px;
  background-color: #D9D9D9;
}

/* Extra styles for 2, 3, 4, 5, 6, possible responses */
.result2 { padding: 32px 0; }
.result_title2 { margin-bottom: 8px; }
.result_bar2 { height: 60px; }

.result3 { padding: 16px 0; }
.result_title3 { margin-bottom: 8px; }
.result_bar3 { height: 50px; }

.result4 { padding: 10px 0; }
.result_title4 { margin-bottom: 4px; }
.result_bar4 { height: 40px; }

.result5 { padding: 6px 0; }
.result_title5 { margin-bottom: 2px; }
.result_bar5 { height: 35px; }

.result6 { padding: 2px 0; }
.result_title6 { margin-bottom: 0px; }
.result_bar6 { height: 35px; }



.result_value {
  height: 100%;
  position: absolute;
  top: 0px;
  left: 0px;
  z-index: 1;
  border-right: 5px solid white;
  box-sizing: border-box;
}

.result_value_in {
  display: flex;
  flex-direction: column;
  width: auto;
  text-align: center;
  text-align: -webkit-center;
  font-size: 18px;
  text-shadow: -1px 0 white, 0 1px white, 1px 0 white, 0 -1px white;
}

/* Extra style (for lessor greater than 25%)  */
.result_value_in_left {
  text-align:left;
  text-align:-webkit-left;
  min-width:80px;
  padding-left:2px;
}
.result_value_in_right {
  text-align:right;
  text-align:-webkit-right;
  min-width:80px;
  padding-right:2px;
}


/* Tabs */
.tabs {
  display: -webkit-flex;
  display: -moz-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  -moz-flex-wrap: wrap;
  flex-wrap: wrap;
  margin: 0;
  overflow: hidden;
}

.tabs [class^="tab"] label,
.tabs [class*=" tab"] label {
  cursor: pointer;
  font-weight: bold;
  display: block;
  font-size: 15px;
  line-height: 1em;
  padding: 15px 0;
  text-align: center;
  text-align: -webkit-center;
  color: var(--c-brand);
}

.tabs [class^="tab"] [type="radio"],
.tabs [class*=" tab"] [type="radio"] {
  border-bottom: 1px solid rgba(239, 237, 239, 0.5);
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  -webkit-transition: all 0.3s ease-in-out;
  -moz-transition: all 0.3s ease-in-out;
  -o-transition: all 0.3s ease-in-out;
  transition: all 0.3s ease-in-out;
}

.tabs [class^="tab"] [type="radio"]:hover,
.tabs [class^="tab"] [type="radio"]:focus,
.tabs [class*=" tab"] [type="radio"]:hover,
.tabs [class*=" tab"] [type="radio"]:focus {
  border-bottom: 2px solid var(--c-brand);
}

.tabs [class^="tab"] [type="radio"]:checked,
.tabs [class*=" tab"] [type="radio"]:checked {
  border-bottom: 5px solid var(--c-brand);
}

.tabs [class^="tab"] [type="radio"]:checked+div,
.tabs [class*=" tab"] [type="radio"]:checked+div {
  opacity: 1;
}

.tabs [class^="tab"] [type="radio"]+div,
.tabs [class*=" tab"] [type="radio"]+div {
  display: block;
  opacity: 0;
  padding: 0.5rem 0;
  width: 90%;
  -webkit-transition: all 0.3s ease-in-out;
  -moz-transition: all 0.3s ease-in-out;
  -o-transition: all 0.3s ease-in-out;
  transition: all 0.3s ease-in-out;
}

.tabs .tab-2 {
  width: 33%;
}

.tabs .tab-2 [type="radio"]+div {
  width: 300%;
  margin-left: 300%;
}

.tabs .tab-2 [type="radio"]:checked+div {
  margin-left: 0;
}

.tabs .tab-2:nth-child(2) [type="radio"]+div {
  margin-left: 100%;
}

.tabs .tab-2:nth-child(2) [type="radio"]:checked+div {
  margin-left: -100%;
}

.tabs .tab-2:nth-child(3) [type="radio"]+div {
  margin-left: 200%;
}

.tabs .tab-2:nth-child(3) [type="radio"]:checked+div {
  margin-left: -200%;
}



/* Gender Chart */
.gender-chart {
  position: relative;
  display: flex;
  flex-direction: column;
  margin-top: 20px;
}

.gender-chart p {
  margin: 2px 0;
}

.gender-chart__persons {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 1.5rem;
}

.gender-chart__person {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  max-width: 70px;
}

.gender-chart__bar,
.gender-chart__progress {
  height: 300px;
  width: 70px;
}

.gender-chart__bar {
  position: relative;
  background-color: #D9D9D9;
}

.gender-chart__progress {
  box-sizing: border-box;
  position: absolute;
  bottom: 0;
  left: 0;
  height: 0%;
  border-top: 5px solid white;
  transition: height .3s ease-in;
}

.gender-chart__person--man .gender-chart__bar::after {
  position: absolute;
  content: '';
  background: url('../img/half-man.svg') top left / 80px 180px no-repeat;
  bottom: 0;
  left: -58px;
  height: 180px;
  width: 60px;
  z-index: 0;
  filter: drop-shadow(-5px 3px 7px rgba(0, 0, 0, 0.3))
}

.gender-chart__person--woman .gender-chart__bar::after {
  position: absolute;
  content: '';
  background: url('../img/half-woman.svg') top right / 60px 180px no-repeat;
  bottom: 0;
  right: -48px;
  height: 180px;
  width: 50px;
  z-index: 0;
  filter: drop-shadow(5px 3px 7px rgba(0, 0, 0, 0.3))
}

.gender-chart__person--man .gender-chart__data {
  margin-right: 70px;
}

.gender-chart__person--woman .gender-chart__data {
  margin-left: 70px;
}

.gender-chart__type {
  margin: 0;
  font-weight: bold;
}

.gender-chart__votes {
  font-size: 12px;
}

@media screen and (max-width: 480px) {
  .gender-chart__bar,
  .gender-chart__progress {
    height: 250px;
    width: 50px;
  }

  .gender-chart__person {
    max-width: 50px;
  }

  .gender-chart__data {
    min-width: 70px;
    font-size: .8rem;
  }
}




/* Age Chart */
.age-chart {
  width: min(100%, 600px);
  margin-top: 20px;
}

.age-chart p {
  margin: 8px 0;
}

.age-chart__persons {
  display: flex;
  justify-content: center;
  flex-direction: column;
  gap: 0.7rem;
}

.age-chart__person {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.age-chart__data {
  flex-basis: 60px;
}

.age-chart__bar {
  position: relative;
  min-height: 40px;
  width: 100%;
  background-color: #D9D9D9;
}

.age-chart__progress {
  position: absolute;
  height: 100%;
  width: 0%;
  left: 0;
  font-size: 1.5rem;
  background-color: #000;
  border-right: 5px solid white;
  transition: width .3s ease-in;
}

.age-chart__percentage {
  position: absolute;
  right: 5px;
  bottom: 5px;
  font-size: 1.7rem;
  color: #000;
  text-shadow: -1px 0 #D9D9D9, 0 1px #D9D9D9, 1px 0 #D9D9D9, 0 -1px #D9D9D9;
}

.age-chart__range {
  font-weight: bold;
}

.age-chart__votes {
  font-size: 12px;
}


@media screen and (max-width: 480px) {
  .age-chart__data p {
    margin: 0;
  }

  .age-chart__bar {
    min-height: 40px;
    height: 40px;
  }

  .age-chart__data {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
  }

  .age-chart__person {
    gap: 5px;
  }
  
  .age-chart__percentage {
    font-size: 1.3rem;
  }

  .age-chart__range {
    font-size: 1rem;
  }

  .age-chart__votes {
    font-size: .7rem;
  }
}