:root {
  --eb-colortext1: #45320A;
  --eb-colortext2: #000;
  --eb-livebg: #C32121;
  --eb-bg1: #F3AA0D;
  --eb-bg2: #FFC917;
  --eb-border: #D89D1E;
}

@keyframes ebFadeInOut {
  0%, 100% {
      background-color: rgba(255, 201, 23, 0);
  }
  50% {
      background-color: rgba(255, 201, 23, 0.5);
  }
}

@property --percent {
  syntax: "<number>";
  initial-value: 0;
  inherits: false;
}
@property --temp {
  syntax: "<number>";
  initial-value: 0;
  inherits: false;
}
@property --v1 {
  syntax: "<integer>";
  initial-value: 0;
  inherits: false;
}
@property --v2 {
  syntax: "<integer>";
  initial-value: 0;
  inherits: false;
}

.percentage .eb-value {
  transition: --percent 1.5s ease-in-out;
  --temp: calc(var(--percent) * 100);
  --v1: max(var(--temp) - 0.5, 0);
  --v2: max((var(--temp) - var(--v1)) * 100 - 0.5, 0);
  counter-reset: v1 var(--v1) v2 var(--v2);
}
.percentage .eb-value::before {
  content: counter(v1) "." counter(v2, decimal-leading-zero) "%";
}

.eb-container {
  transition: 0.2s;
}

body.page .eb-container,
body.single .eb-container {
  margin-bottom: 20px;
}

body.page-template-page-ultima-ora .eb-container {
  margin-bottom: 40px;
}

@media (min-width: 974px) {
  body.single .eb-container {
    margin-left: 20px;
    margin-right: 20px;
  }
}

@media (min-width: 1494px) {
  body.single .eb-container {
    margin-left: 32px;
    margin-right: 32px;
  }
}

.election-box {
  position: relative;
  display: block;
  color: var(--eb-colortext1);
  background-color: var(--eb-bg1);
  border: 1px solid var(--eb-border);
  overflow: hidden;
  border-radius: 6px;
  padding: 18px 20px;
  user-select: none;
  cursor: pointer;
  margin-bottom: 19px;
}
.eb-container:hover {
  transform: translate(0px, -2px);
}
.eb-percentage-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background-color: var(--eb-bg2);
  transition: width 1.5s ease-in-out;
  width: 0%;
  min-width: 3%;
}
.eb-percentage-fill:after {
  content: '';
  position: absolute;
  top: 0;
  right: -20px;
  width: 20px;
  height: 100%;
  background-color: rgba(255, 201, 23, 0.5);
  animation: ebFadeInOut 1.2s infinite;
}
.eb-box-content {
  position: relative;
  z-index: 1;
  display: flex;
}
.eb-stats-box-container {
  display: flex;
  flex-direction: row;
  flex-grow: 1;
}
.eb-stats-box {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 10px;
}
.eb-label {
  font-weight: 300;
  font-size: 20px;
  line-height: 18px;
}
.eb-value {
  font-weight: 900;
  font-size: 32px;
  line-height: 26px;
}
.eb-value.highlight {
  color: var(--eb-colortext2);
}
.stat1 .eb-value {
  width: 192px;
}
.eb-election-cta {
  text-align: right;
}
.eb-text-line-1 {
  font-weight: 700;
  font-size: 22px;
  color: var(--eb-colortext2);
}
.eb-live-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--eb-livebg);
  color: #fff;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 11px;
  border-radius: 3px;
  gap: 3px;
  padding: 0px 5px;
  position: relative;
  top: -1px;
}
.eb-live-marker svg {
  width: 11px;
  height: 11px;
}
.eb-text-line-2 {
  font-size: 16px;
  font-weight: 300;
}
.eb-icon-container {
  align-content: center;
}
.eb-icon-container svg {
  width: 48px;
  height: 48px;
  margin: 2px 0px 0px 8px;
  position: relative;
  top: 4px;
}
.eb-election-cta {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
}
.eb-text-line-1 {
  grid-column: 1;
  grid-row: 1;
}
.eb-text-line-2 {
  grid-column: 1;
  grid-row: 2;
}
.eb-text-line-2 .underline {
  text-decoration: underline;
  color: var(--eb-colortext2);
}
.eb-icon-container {
  grid-column: 2;
  grid-row: 1 / span 2;
}
.percentage .eb-value {
  width: 160px;
}

.eb-mobile-act {
  background: #f3aa0e;
  text-transform: uppercase;
  padding: 4px 9px;
  font-weight: 700;
  letter-spacing: -0.2px;
  text-align: center;
  border-radius: 6px;
  border: 1px solid #d89406;
  margin-top: 0px;
  display: none;
  align-items: center;
  justify-content: center;
  color: #000;
  margin-bottom: 19px;
}

.eb-mobile-act svg {
  width: 19px;
  height: 19px;
  margin-right: 4px;
}

@media (max-width: 1494px) {
  .election-box {
      padding: 14px 20px;
  }
  .eb-stats-box {
      gap: 6px;
  }
  .eb-label {
      font-size: 14px;
      line-height: 16px;
  }
  .eb-value {
      font-size: 20px;
      line-height: 20px;
  }
  .percentage .eb-value {
      width: 96px;
  }
  .stat1 .eb-value {
    width: 112px;
  }
  .eb-text-line-1 {
      font-size: 16px;
  }
  .eb-text-line-2 {
      font-size: 12px;
  }
  .eb-icon-container svg {
      width: 36px;
      height: 36px;
  }
  .eb-live-marker {
      font-size: 9px;
      padding: 0 3px;
  }
  .eb-live-marker svg {
      width: 10px; height: 10px;
  }
}

@media (max-width: 656px) {
  .election-box {
      padding: 12px;
  }
  .eb-stats-box-container {
      flex-direction: column;
      justify-content: space-around;
  }
  .eb-stats-box {
      flex-grow: 0;
      justify-content: center;
  }
  .eb-value {
      font-size: 22px;
      line-height: 18px;
  }
  .percentage .eb-value {
      font-size: 36px;
      line-height: 34px;
      width: auto;
  }
  .stat1 .eb-value {
    width: auto;
  }
  .eb-text-line-1 {
      grid-column: 1 / span 2;
      grid-row: 1;
      text-transform: uppercase;
  }
  .eb-w1, .eb-w2 {
      display: block;
  }
  .eb-w3 {
      font-size: 36px;
      line-height: 38px;
  }
  .eb-tl2-l1 {
      display: block;
  }
  .eb-icon-container {
      grid-column: 2;
      grid-row: 2 / span 1;
  }
  .eb-icon-container svg {
      width: 28px;
      height: 28px;
  }
  .eb-mobile-act {
    display: flex;
  }
}
@media (max-width: 385px) {
  .eb-icon-container {
      display: none;
  }
  .eb-text-line-2 {
      grid-column: 1 / span 2;
      grid-row: 2;
  }
  .eb-stats-box-container,
  .eb-election-cta {
      min-width: content;
      flex-shrink: 0;
  }
}

@media (max-width: 360px) {
  .percentage .eb-value {
    font-size: 28px;
    line-height: 24px;
  }
}

@media (max-width: 329px) {
  .eb-box-content {
    flex-direction: column-reverse;
  }
  .eb-stats-box-container {
    align-items: center;
  }
  .eb-label {
    text-align: center;
  }
  .eb-stats-box {
    margin-bottom: 10px;
  }
  .eb-election-cta {
    align-content: center;
    margin-bottom: 20px;
  }
  .eb-text-line-1,
  .eb-text-line-2 {
    text-align: center;
  }
  .eb-w1, .eb-w2 {
    display: inline;
  }
  .eb-w3 {
    display: block;
  }
  .eb-tl2-l1 {
    display: inline;
  }
  .percentage .eb-value {
    position: relative;
    right: -8%;
  }
  .stat1 .eb-value {
    text-align: center;
  }
}
