/*
	Abstracts are helpers, variables and functions
	for scss compliation.
*/
/*
	@TODO: Add to theme: new division fix for updated sass package.
*/
/**==================================================================================================================================
BREAKPOINT
@TODO: remove? What is use case?? either use simple global points or write custom line. why does first breakpoint have to be 0?
 ==================================================================================================================================*/
/**==================================================================================================================================
BREAKPOINT ENDS
==================================================================================================================================*/
span.edit-link {
  display: inline-block;
  background-color: yellow;
  font-weight: 500;
  position: fixed;
  left: 0;
  bottom: 3.125rem;
  transform: translateX(-45px);
  transition: all 0.2s;
}

span.edit-link a {
  display: block;
  padding: 0.9375rem;
}

span.edit-link:hover {
  transform: translateX(0);
}

.grid-container {
  max-width: 70.625rem;
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-column-gap: 1.875rem;
}

@media screen and (max-width: 1280px) {
  .grid-container {
    padding: 0 0.9375rem;
  }
}
/*
	Variables for compliation
	NB! Colors should be added to base/config file as css root variable.
*/
/**
 * $size: font-size in number
 * $line-height: line-height in percentage
 * $weight: font-weight
 * $family: font-family
 * $color: font-color
 */
/**
 * Block section background colors.
 * Include the background options ACF fields group to use these.
 */
/*
 * makes ul/ol as a dropdown select (normaly in mobile)
 * Structure: div > title > list > li > a
*/
section.poll {
  --poll-icon-size: 65px;
}

@media screen and (max-width: 849px) {
  section.poll {
    --poll-icon-size: 45px;
  }
}
section.poll .poll_wrapper {
  margin: 0 auto;
  padding: var(--poll-icon-size, 65px);
  max-width: calc(790px + var(--poll-icon-size, 65px) * 2);
}

section.poll .poll__title, section.poll .poll__slide-title {
  margin: 0 auto 1rem;
  text-align: center;
  max-width: 600px;
}

section.poll .poll__slide-title {
  margin-bottom: var(--element-box-padding-big);
}

section.poll .poll__slide-title h3 {
  font-weight: 400;
}

section.poll .poll__option {
  margin: 1rem 0;
}

section.poll .poll__option label {
  cursor: pointer;
}

section.poll .poll__option label p {
  margin: 2rem 0 0.5rem;
}

section.poll .poll__form .poll_indicator_percent {
  opacity: 0;
}

section.poll .poll__form .poll__vote {
  position: absolute;
  right: 0;
  margin: 16px;
  transition: all 0.4s ease-in-out;
}

section.poll .poll__form.used .poll_indicator_percent {
  opacity: 1;
}

section.poll .poll__form.used .poll__vote {
  opacity: 0;
  pointer-events: none;
}

section.poll .poll__form.used .poll__option label {
  cursor: default;
}

section.poll .poll__indicator {
  border-radius: var(--element-border-radius-small);
  background-color: var(--color__white);
  height: 80px;
  width: 100%;
  padding: 16px;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

section.poll .poll__indicator .poll__option-icon {
  position: absolute;
  left: -1rem;
  transform: translateX(0%);
  opacity: 0;
  transition: all 0.4s ease-in-out;
  width: var(--poll-icon-size, 65px);
  height: var(--poll-icon-size, 65px);
}

section.poll .poll__indicator .poll__option-icon svg {
  width: 30px;
  height: 30px;
}

section.poll .poll__indicator .poll_indicator_bar {
  height: 100%;
  width: 100%;
}

section.poll .poll__indicator .poll_indicator_bar span {
  border-radius: 11px;
  width: 0%;
  height: 100%;
  display: block;
  background-color: var(--color__greige);
  transition: all 0.4s ease-in-out;
  min-width: 2%;
}

section.poll .poll__indicator .poll_indicator_percent {
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  border-left: 3px solid var(--color__pink);
  padding-left: 25px;
  margin-left: 16px;
  margin-top: -16px;
  margin-bottom: -16px;
  height: calc(100% + 32px);
  flex: 0 0 110px;
  transition: all 0.4s ease-in-out;
}

@media screen and (max-width: 1209px) {
  section.poll .poll__indicator .poll_indicator_percent {
    flex: 0 0 103px;
  }
}
@media screen and (max-width: 999px) {
  section.poll .poll__indicator .poll_indicator_percent {
    flex: 0 0 100px;
  }
}
@media screen and (max-width: 849px) {
  section.poll .poll__indicator .poll_indicator_percent {
    flex: 0 0 90px;
  }
}
@media screen and (max-width: 479px) {
  section.poll .poll__indicator .poll_indicator_percent {
    flex: 0 0 79px;
  }
}
section.poll .poll__info {
  margin-top: 3.125rem;
  text-align: center;
}

section.poll input[type=radio] {
  visibility: hidden;
  position: absolute;
  top: -999999px;
  left: -999999px;
  opacity: 0;
  pointer-events: none;
}

section.poll input[type=radio]:checked + label .poll__option-icon {
  transform: translateX(-100%);
  opacity: 1;
}

section.poll input[type=radio]:checked + label .poll_indicator_bar span {
  background-color: var(--color__orange);
}

@media screen and (max-width: 479px) {
  section.poll .poll_wrapper {
    padding: 0;
  }
  section.poll .poll__indicator {
    height: 60px;
    padding: 10px;
  }
  section.poll .poll__indicator .poll__option-icon {
    left: initial;
    right: -3%;
    top: 0;
  }
  section.poll input[type=radio]:checked + label .poll__option-icon {
    transform: translateY(-60%);
  }
  section.poll .poll__total_votes {
    font-size: 14px;
  }
}
