/* ============================================================
   v2 home — stats bar under the hero (home/v2/section/stats.html.twig).
   Source: maquette Web Desktop l.70-83 (1440) / Web Movil l.80-90 (440).
   Mobile first: two columns, the rating across the top; desktop from
   UIkit @m (960px): 1.5fr / 1fr / 1fr, the rating split off by a hairline.
   ============================================================ */

.bf-stats {
  border-bottom: 1px solid var(--bf-c-line-light);
  background: var(--bf-c-white);
}

.bf-stats p {
  margin: 0;
}

.bf-stats__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  row-gap: 22px;
  padding: 24px 0 26px;
}

/* ---- Rating ---- */

.bf-stats__rating {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--bf-c-line-light);
}

.bf-stats__rating-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.bf-stats__rating-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bf-stats p.bf-stats__note {
  font: 900 30px/1 var(--bf-font-numeric);
  color: var(--bf-c-gold);
  white-space: nowrap;
}

/* Same star metrics as css/v2/reviews.css: 0.9143em glyphs .1857em apart on a 1em row, the
   viewBox cropped to the ink. The gold row is clipped to the rating over a grey one (#D9D9D9).
   The trailing gap (padding) is part of the box the fill's % refers to, as the maquette's ★
   run carried its final letter-spacing: 98% only eats into that gap, so 4.9/5 shows five full
   stars, as in the maquette. */
.bf-stats__stars {
  position: relative;
  display: block;
  padding-right: .1857em;
  font-size: 26px;
  color: var(--bf-c-gold);
}

.bf-stats__stars-row {
  display: flex;
  gap: .1857em;
  width: max-content;
  height: 1em;
}

.bf-stats__stars > .bf-stats__stars-row {
  color: #D9D9D9;
}

.bf-stats__stars-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  overflow: hidden;
}

.bf-stats__star {
  display: block;
  flex: none;
  width: .9143em;
  height: 1em;
  fill: currentColor;
}

.bf-stats p.bf-stats__reviews {
  font: 500 15px/1.2 var(--bf-font-body);
  letter-spacing: .02em;
  text-transform: uppercase;
  text-align: center;
  color: var(--bf-c-black);
}

/* ---- Clubs, fitboxers ---- */

.bf-stats__item {
  text-align: center;
}

.bf-stats p.bf-stats__value {
  font: 900 30px/1 var(--bf-font-numeric);
  color: var(--bf-c-gold);
}

.bf-stats p.bf-stats__label {
  margin-top: 4px;
  font: 400 12px/1.3 var(--bf-font-body);
  color: var(--bf-c-black);
}

/* js/v2/home-stats.js freezes each figure's box while it counts (wide enough for every value
   on the way, its final width in the line). */
.bf-stats__count {
  display: inline-block;
  white-space: nowrap;
}

/* Set inline before the first paint, removed by home-stats.js once the figures are at 0: the
   real values stay hidden (their space kept) rather than flash. Shown after 3s whatever
   happens, should the script never run. */
.bf-stats--pending .bf-stats__count,
.bf-stats--pending .bf-stats__stars-fill {
  visibility: hidden;
  animation: bf-stats-reveal 0s 3s forwards;
}

@keyframes bf-stats-reveal {
  to {
    visibility: visible;
  }
}

@media (min-width: 960px) {
  .bf-stats__grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    row-gap: 0;
    padding: 34px 0;
  }

  .bf-stats__rating {
    grid-column: auto;
    padding-bottom: 0;
    border-bottom: 0;
    border-right: 1px solid var(--bf-c-line-light);
  }

  .bf-stats__rating-body {
    align-items: flex-start;
  }

  .bf-stats p.bf-stats__note {
    font-size: 44px;
  }

  .bf-stats__stars {
    font-size: 32px;
  }

  .bf-stats p.bf-stats__reviews {
    font-size: 17px;
    text-align: left;
  }

  .bf-stats p.bf-stats__value {
    font-size: 44px;
  }

  .bf-stats p.bf-stats__label {
    margin-top: 6px;
    font-size: 14px;
  }
}
