/* ====== Common ====== */
:root {
  --clr--blue: 82, 118, 238; /* #5276EE */
  --clr--green: 66, 198, 172; /* #42C6AC */
  --clr--orange: 246, 156, 7; /* #F69C07 */
  --clr--red: 214, 69, 80; /* #D64550 */
  --clr--gray: 232, 232, 232; /* #E8E8E8 */
  --clr--black: 0, 0, 0; /* #000000 */
  --clr--white: 255, 255, 255; /* #ffffff */

  --fnt--niveau: "niveau-grotesk", sans-serif;
}

img {
  image-rendering: -moz-crisp-edges;
  image-rendering: -o-crisp-edges;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  max-width: 100%;
  position: relative;
  display: block;
}

img::before {
  content: "We failed to load the image of \A'" attr(alt) "'\A 😞"/"";
  font-size: 14px;
  color: rgb(129, 0, 0);
  text-align: center;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 15px;
  background-color: rgb(224, 224, 224);
  border: 2px dashed rgb(176, 176, 176);
}

.fnt--niveau {
  font-family: var(--fnt--niveau);
}

/* ====== Colors ====== */
.clr--blue {
  color: rgb(var(--clr--blue)) !important;
}

.clr--green {
  color: rgb(var(--clr--green)) !important;
}

.clr--orange {
  color: rgb(var(--clr--orange)) !important;
}

.clr--red {
  color: rgb(var(--clr--red)) !important;
}

.clr--gray {
  color: rgb(var(--clr--gray)) !important;
}

.clr--black {
  color: rgb(var(--clr--black)) !important;
}

.clr--white {
  color: rgb(var(--clr--white)) !important;
}

.bgclr--blue {
  color: rgb(var(--clr--white));
  background-color: rgb(var(--clr--blue));
}

.bgclr--green {
  color: rgb(var(--clr--white));
  background-color: rgb(var(--clr--green));
}

.bgclr--orange {
  color: rgb(var(--clr--white));
  background-color: rgb(var(--clr--orange));
}

.bgclr--red {
  color: rgb(var(--clr--white));
  background-color: rgb(var(--clr--red));
}

.bgclr--gray {
  color: rgb(var(--clr--white));
  background-color: rgb(var(--clr--gray));
}

.bgclr--black {
  color: rgb(var(--clr--white));
  background-color: rgb(var(--clr--black));
}

.bgclr--white {
  color: rgb(var(--clr--black));
  background-color: rgb(var(--clr--white));
}

/* ====== Buttons ====== */
.recommended-results__grid_card_footer_view-full-button {
  font-size: 20px;
  font-weight: 600;
  color: rgb(var(--clr--white));
  line-height: 1.1;
  transition: ease-in .4s;
  -webkit-transition: ease-in .4s;
  -moz-transition: ease-in .4s;
  -ms-transition: ease-in .4s;
  -o-transition: ease-in .4s;
  width: 100%;
  padding: 15px 30px;
  background-color: rgb(var(--clr--red));
  border-radius: 0 0 25px 25px;
  -webkit-border-radius: 0 0 25px 25px;
  -moz-border-radius: 0 0 25px 25px;
  -ms-border-radius: 0 0 25px 25px;
  -o-border-radius: 0 0 25px 25px;
  border: none;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.recommended-results__grid_card_footer_view-full-button:hover,
.recommended-results__grid_card_footer_view-full-button:active,
.recommended-results__grid_card_footer_view-full-button:focus-visible {
  color: rgb(var(--clr--white));
  background-color: rgb(var(--clr--blue));
}

.recommended-results__grid_card_footer_view-full-button.disabled {
  color: rgb(var(--clr--white));
  background-color: rgba(var(--clr--red), 0.6);
  border-color: rgba(var(--clr--red), 0.6);
  cursor: not-allowed;
}

/* Grid laout */
.grid-two,
.grid-three,
.grid-four,
.grid-five,
.grid-six {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}

.grid-two > * {
  width: calc((100% / 2) - 15px);
}

.grid-three > * {
  width: calc((100% / 3) - 20px);
}

.grid-four > * {
  width: calc((100% / 4) - 23px);
}

.grid-five > * {
  width: calc((100% / 5) - 24px);
}

.grid-six > * {
  width: calc((100% / 6) - 25px);
}

/* ====== Recommended Results ====== */
.recommended-results__grid_card {
  background-color: rgb(var(--clr--gray));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 25px;
  -webkit-border-radius: 25px;
  -moz-border-radius: 25px;
  -ms-border-radius: 25px;
  -o-border-radius: 25px;
}

.recommended-results__grid_card_header {
  padding: 15px;
  flex-grow: 1;
}

.recommended-results__grid_card_header_title {
  font-size: 20px;
  text-align: center;
}

.recommended-results__grid_card_body_thumbnail {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.recommended-results__grid_card_body {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: url("https://d12p4h0v22wwai.cloudfront.net/wp-content/uploads/placeholder.png") no-repeat 50% 50% / cover;
  position: relative;
  overflow: hidden;
  box-shadow: 0 -3px 10px rgba(var(--clr--black), 0.2);
  border-radius: 25px 25px 0 0;
  -webkit-border-radius: 25px 25px 0 0;
  -moz-border-radius: 25px 25px 0 0;
  -ms-border-radius: 25px 25px 0 0;
  -o-border-radius: 25px 25px 0 0;
}

.recommended-results__grid_card_body_badge {
  background: url("https://nationalpoll.com.au/wp-content/uploads/2024/02/badge-red.svg") no-repeat 50% 50% / 100% 100%;
  width: 115px;
  padding: 10px;
  aspect-ratio: 1 / 1;
  position: absolute;
  bottom: 10px;
  left: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.recommended-results__grid_card_body_badge > * {
  color: rgb(var(--clr--white));
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  rotate: 350deg;
}

.recommended-results__grid_card_body_badge > * span {
  font-size: 32px;
  font-weight: 600;
  display: block;
}

/* ====== Trending Results ====== */
/* Grid Structure */
.trending-result__grid {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

.trending-result__grid_poll {
  width: calc(100% / 4)
}

.trending-result__grid_gender {
  width: calc(100% / 4)
}

.trending-result__grid_age-group {
  width: calc(100% / 4)
}

.trending-result__grid_party {
  width: calc(100% / 4)
}

.trending-result__grid_geo-location {
  width: calc(100% / 4)
}

.trending-result__grid_question {
  width: calc((100% / 4) * 3)
}

.trending-result__grid_title {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 15px;
}

/* Poll Heading */
.trending-result__grid_poll_wrapper {
  padding: 10px;
  display: flex;
  gap: 15px;
}

.trending-result__grid_poll_wrapper_thumbnail {
  width: 50%;
}

.trending-result__grid_poll_wrapper_thumbnail_image {
  border-radius: 15px;
  -webkit-border-radius: 15px;
  -moz-border-radius: 15px;
  -ms-border-radius: 15px;
  -o-border-radius: 15px;
}

.trending-result__grid_poll_wrapper_thumbnail_poll-count,
.trending-result__grid_poll_wrapper_heading_poll-subheading {
  font-size: 15px;
  color: rgb(var(--clr--white));
  display: block;
  width: fit-content;
  padding: 3px 10px;
  border-radius: 15px;
  -webkit-border-radius: 15px;
  -moz-border-radius: 15px;
  -ms-border-radius: 15px;
  -o-border-radius: 15px;
}

.trending-result__grid_poll_wrapper_thumbnail_poll-count {
  background-color: rgb(var(--clr--red));
  margin-top: 10px;
}

.trending-result__grid_poll_wrapper_heading_poll-subheading {
  background-color: rgb(var(--clr--green));
  margin-bottom: 10px;
}

.trending-result__grid_poll_wrapper_heading {
  width: 50%;
}

.trending-result__grid_poll_wrapper_heading_title {
  font-size: 18px;
}

/* By gender */
.trending-result__grid_gender_wrapper {
  padding: 10px;
}

.trending-result__grid_gender_wrapper_chart-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.trending-result__grid_gender_wrapper_chart-bars-column {
  display: flex;
  flex-direction: row;
  gap: 10px;
}

.trending-result__grid_gender_wrapper_chart-legends-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: flex-start;
}

.trending-result__grid_gender_wrapper_chart-human-wrapper {
  width: 50px;
  height: 130px;
  position: relative;
  background-color: #CCCCCC;
  -webkit-mask-image: url('human.svg');
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: bottom;
  -webkit-mask-size: contain;
  mask-image: url('human.svg');
  mask-repeat: no-repeat;
  mask-position: bottom;
  mask-size: contain;
  overflow: hidden;
}

.trending-result__grid_gender_wrapper_chart-human-fill-inner {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 0;
  transition: height 800ms ease-in-out;
  -webkit-transition: height 800ms ease-in-out;
  -moz-transition: height 800ms ease-in-out;
  -ms-transition: height 800ms ease-in-out;
  -o-transition: height 800ms ease-in-out;
}

.trending-result__grid_gender_wrapper_chart-percentage-label {
  font-size: 15px;
}

.trending-result__grid_gender_wrapper_chart-percentage-label span {
  font-size: 27px;
  text-align: right;
  display: inline-block;
  width: 55px;
  margin-right: 3px;
}

/* By age group */
.trending-result__grid_age-group_wrapper {
  padding: 10px;
}

.trending-result__grid_age-group_wrapper_chart-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.trending-result__grid_age-group_wrapper_age-donut-chart {
  width: 130px !important;
  height: 130px !important;
}

.trending-result__grid_age-group_wrapper_custom-legend {
  font-size: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trending-result__grid_age-group_wrapper_legend-row {
  display: flex;
  gap: 5px;
}

.trending-result__grid_age-group_wrapper_legend-item {
  width: 75px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.trending-result__grid_age-group_wrapper_legend-value {
  font-size: 27px;
  display: inline-block;
}

/* By party */
.trending-result__grid_party_wrapper {
  padding: 10px;
}

.trending-result__grid_party_wrapper_chart-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  width: 100%;
}

.trending-result__grid_party_wrapper_age-donut-chart {
  width: 250px !important;
  height: 100px !important;
}

.trending-result__grid_party_wrapper_custom-legend {
  font-size: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trending-result__grid_party_wrapper_legend-row {
  display: flex;
  gap: 15px;
}

.trending-result__grid_party_wrapper_legend-item {
  width: 75px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.trending-result__grid_party_wrapper_legend-value {
  font-size: 27px;
  display: inline-block;
}

/* By geo location */
.trending-result__grid_geo-location_wrapper {
  padding: 10px;
}

.trending-result__grid_geo-location_wrapper_map-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
}

.mapboxgl-canvas {
  position: relative;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 / 1;
}

.mapboxgl-ctrl-bottom-left,
.mapboxgl-ctrl-bottom-right {
  display: none;
}

.trending-result__grid_geo-location_wrapper_results-section {
  margin-top: 5px;
}

.trending-result__grid_geo-location_wrapper_results-table {
  width: 100%;
  border-collapse: collapse;
  font-size:14px;
}

.trending-result__grid_geo-location_wrapper_results-table tr {
  border-bottom: 1px solid rgba(var(--clr--black), .1);
}

.trending-result__grid_geo-location_wrapper_results-state {
  padding: 6px;
  width: 200px;
}

.trending-result__grid_geo-location_wrapper_results-state-color {
  width: 14px;
  height: 14px;
  background: var(--state--color);
  display: inline-block;
  margin-right: 5px;
  vertical-align: text-top;
  border-radius: 50%;
  -webkit-border-radius: 50%;
  -moz-border-radius: 50%;
  -ms-border-radius: 50%;
  -o-border-radius: 50%;
}

.trending-result__grid_geo-location_wrapper_results-count {
  text-align: right;
  padding: 6px;
  width: 80px;
}

.trending-result__grid_geo-location_wrapper_results-percentage {
  text-align: right;
  padding: 6px;
  width: 55px;
}

/* By question */
.trending-result__grid_question_wrapper {
  padding: 10px;
}