/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */


 /**
 * All of the CSS for your admin-specific functionality should be
 * included in this file.
 */

/* ====== 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 {
  padding-block: 2.5rem;
}

.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%;
  max-width: unset;
  padding: 15px 30px;
  background-color: rgb(var(--clr--red));
  border-radius: 0 0 25px 25px !important;
  -webkit-border-radius: 0 0 25px 25px !important;
  -moz-border-radius: 0 0 25px 25px !important;
  -ms-border-radius: 0 0 25px 25px !important;
  -o-border-radius: 0 0 25px 25px !important;
  border: none !important;
  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 [class*="col-"] {
  padding: 0;
} */

.trending-result [class*="col-"] {
  padding: 0;
}

/* ====== 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;
  margin: 0;
}

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

.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 {
  padding-block: 2rem;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

.trending-result__grid_poll {
  width: 100%;
}

.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% / 2);
}

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

.trending-result__grid_title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 20px !important;
}

/* Poll Heading */
.trending-result__grid_poll_wrapper {
  max-width: 50%;
  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: flex-start;
  gap: 20px;
}

.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: flex-start;
  gap: 20px;
  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;
  width: calc(100% - 150px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trending-result__grid_age-group_wrapper_legend-row {
  display: flex;
  justify-content: space-evenly;
  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;
	flex-wrap: wrap;
  gap: 15px;
}

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

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

.trending-result__grid_party_wrapper_legend-value + span {
	font-size: 16px;
	text-align: center;
	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%;
  display: flex;
  gap: 30px;
}

.mapboxgl-canvas {
  position: relative !important;
  /* width: 407px !important; */
  height: auto !important;
  aspect-ratio: 407 / 300;
}

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

.trending-result__grid_geo-location_wrapper_results-section {
  margin-top: 5px;
  width: calc(100% - 330px);
}

.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;
  position: relative;
}

.trending-result__grid_question_wrapper_pagination {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 10px;
}

.trending-result__grid_question_wrapper_pagination button {
  font-size: 15px;
  background-color: rgb(var(--clr--gray));
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trending-result__grid_question_wrapper_grid {
  padding-right: 20px;
  overflow: auto;
  align-content: flex-start;
}

.trending-result__grid_question_wrapper_grid > * {
  display: flex;
  flex-direction: column;
}

.trending-result__grid_question_wrapper_grid_q-heading {
  font-size: 15px;
}

.trending-result__grid_question_wrapper_grid_q-chart {
  height: 200px;
  width: 100%;
}

.trending-result__grid_question_wrapper_grid_q-chart canvas {
  width: 100% !important;
  height: 100% !important;
}

.trending-result__grid_question_wrapper_grid_axis-tooltip {
  position: fixed;
  background: rgb(var(--clr--black));
  color: rgb(var(--clr--white));
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 4px;
  pointer-events: none;
  opacity: 0;
  white-space: nowrap;
  z-index: 9999;
  transition: opacity .15s;
  -webkit-transition: opacity .15s;
  -moz-transition: opacity .15s;
  -ms-transition: opacity .15s;
  -o-transition: opacity .15s;
}

.recommended-results__back {
  font-size: 16px;
  line-height: 30px;
  letter-spacing: 2px;
  max-width: 250px;
  padding: 0 20px;
  margin-top: 2rem;
  margin-left: 12px;
  border-radius: 10px;
  -webkit-border-radius: 10px;
  -moz-border-radius: 10px;
  -ms-border-radius: 10px;
  -o-border-radius: 10px;
}

/* ===== Skeleton Loader Styles ===== */
.skeleton-loader {
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: 20px;
}

.skeleton-item {
	animation: skeleton-loading 1.2s linear infinite alternate;
	background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
	background-size: 200% 100%;
	border-radius: 4px;
}

@keyframes skeleton-loading {
	0% {
		background-position: 200% 0;
	}
	100% {
		background-position: -200% 0;
	}
}

/* Skeleton for poll header */
.skeleton-poll-header {
	display: flex;
	gap: 15px;
	margin-bottom: 20px;
}

.skeleton-poll-image {
	width: 120px;
	height: 120px;
	border-radius: 6px;
	flex-shrink: 0;
}

.skeleton-poll-info {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.skeleton-poll-title {
	height: 24px;
	width: 70%;
	border-radius: 4px;
}

.skeleton-poll-count {
	height: 18px;
	width: 50%;
	border-radius: 4px;
}

/* Skeleton for charts */
.skeleton-chart-container {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	margin-bottom: 20px;
}

.skeleton-chart {
	height: 300px;
	border-radius: 6px;
}

/* Skeleton for questions */
.skeleton-questions-container {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.skeleton-question-item {
	height: 180px;
	border-radius: 6px;
}

/* Skeleton for geo map */
.skeleton-geo-map {
	height: 400px;
	border-radius: 6px;
	margin-top: 20px;
}

/* Skeleton for geo results table */
.skeleton-geo-table {
	height: 200px;
	border-radius: 6px;
	margin-top: 10px;
}

/* Mobile Responsive */
@media only screen and (min-width: 1200px) and (max-width: 1399px) {
  .trending-result__grid_age-group_wrapper_chart-container {
    flex-direction: column;
  }

  .trending-result__grid_age-group_wrapper_age-donut-chart {
    width: 100%;
  }

  .trending-result__grid_age-group_wrapper_custom-legend {
    width: 100%;
  }
}

@media only screen and (max-width: 1199px) {
  .grid-four > *,
  .grid-five > *,
  .grid-six > * {
    width: calc((100% / 3) - 20px);
  }

  .trending-result__grid_geo-location {
    width: 100%;
  }

  .trending-result__grid_geo-location_wrapper_map-container {
    aspect-ratio: unset;
    display: flex;
    gap: 15px;
  }

  .trending-result__grid_geo-location_wrapper_geo-location-map {
    width: 270px;
  }

  .trending-result__grid_geo-location_wrapper_results-section {
    width: calc(100% - 285px);
  }

  .trending-result__grid_question {
    width: 100%;
  }
}

@media only screen and (min-width: 992px) and (max-width: 1199px) {
  .trending-result__grid_gender,
  .trending-result__grid_age-group,
  .trending-result__grid_party {
    width: calc(100% / 2);
  }
}

@media only screen and (max-width: 992px) {
  .grid-three > *,
  .grid-four > *,
  .grid-five > *,
  .grid-six > * {
    width: calc((100% / 2) - 15px);
  }
}

@media only screen and (max-width: 991px) {
  .trending-result__grid_gender,
  .trending-result__grid_age-group,
  .trending-result__grid_party {
    width: calc(100% / 2);
  }

	.trending-result__grid_poll_wrapper {
		max-width: 100%;
	}

  .trending-result__grid_geo-location,
  .trending-result__grid_question {
    width: 100%;
  }
}

@media only screen and (max-width: 767px) {
  .recommended-results__grid_card_header_title {
    font-size: 17px;
  }

  .trending-result__grid_poll {
    width: 100%;
  }

  .trending-result__grid_gender,
  .trending-result__grid_age-group,
  .trending-result__grid_party {
    width: calc(100% / 2);
  }

  .trending-result__grid_gender_wrapper_chart-grid,
  .trending-result__grid_age-group_wrapper_chart-container,
  .trending-result__grid_party_wrapper_chart-container {
    flex-direction: column;
  }

  .trending-result__grid_gender_wrapper_chart-bars-column,
  .trending-result__grid_gender_wrapper_chart-legends-column {
    width: 100%;
  }

  .trending-result__grid_gender_wrapper_chart-bars-column {
    justify-content: center;
  }

  .trending-result__grid_gender_wrapper_chart-percentage-label {
    text-align: center;
  }

  .trending-result__grid_party_wrapper_legend-row {
    flex-wrap: wrap;
  }

  .trending-result__grid_party_wrapper_legend-item {
    width: calc((100% / 2) - 8px);
  }

  .trending-result__grid_geo-location_wrapper_geo-location-map,
  .trending-result__grid_geo-location_wrapper_results-section {
    width: 100%;
  }

  .trending-result__grid_question_wrapper_grid > * {
    width: 100%;
  }

  .trending-result__grid_age-group_wrapper_custom-legend {
    width: 100%;
  }

  .trending-result__grid_age-group_wrapper_legend-item {
    width: calc(100% / 2);
  }

  .trending-result__grid {
    padding-block: .75rem;
  }

  .recommended-results__back {
    margin-top: .75rem;
  }
}

@media only screen and (max-width: 575px) {
  .trending-result__grid_gender,
  .trending-result__grid_age-group,
  .trending-result__grid_party,
  .trending-result__grid_geo-location {
    width: 100%;
  }

  .trending-result__grid_gender_wrapper_chart-grid,
  .trending-result__grid_age-group_wrapper_chart-container,
  .trending-result__grid_party_wrapper_chart-container,
  .trending-result__grid_geo-location_wrapper_map-container {
    flex-direction: row;
  }

  .trending-result__grid_gender_wrapper_chart-bars-column,
  .trending-result__grid_gender_wrapper_chart-legends-column {
    width: calc(100% / 2);
  }

  .trending-result__grid_gender_wrapper_chart-percentage-label {
    text-align: left;
  }

  .trending-result__grid_age-group_wrapper_age-donut-chart {
    width: 200px !important;
    height: 200px !important;
    margin: 0 auto;
  }

  .trending-result__grid_age-group_wrapper_legend-item {
    width: calc(100% / 2);
  }

  .trending-result__grid_poll_wrapper {
    flex-direction: column;
  }

  .trending-result__grid_poll_wrapper_thumbnail {
    width: 100%;
  }

  .trending-result__grid_poll_wrapper_heading {
    width: 100%;
  }
}

@media only screen and (max-width: 480px) {
  .grid-two > *,
  .grid-three > *,
  .grid-four > *,
  .grid-five > *,
  .grid-six > * {
    width: 100%;
  }

  .trending-result__grid_gender_wrapper_chart-grid,
  .trending-result__grid_age-group_wrapper_chart-container,
  .trending-result__grid_party_wrapper_chart-container,
  .trending-result__grid_geo-location_wrapper_map-container {
    flex-direction: column;
  }

  .trending-result__grid_gender_wrapper_chart-percentage-label {
    text-align: center;
  }

  .trending-result__grid_title {
    text-align: center;
  }

  .trending-result__grid_question .trending-result__grid_title {
    text-align: left;
  }
}