.cv-counter,
.cv-counter *,
.cv-counter *::before,
.cv-counter *::after {
  box-sizing: border-box !important;
}

.cv-counter {
  /* =========================
     COLORES PRINCIPALES
  ========================= */

  --cv-title-color: #000000;
  --cv-text-color: #ffffff;
  --cv-bg-image: none;

  /* Verde de la barra superior */
  --cv-header-bg: #B2E914;

  --cv-button-bg: rgba(255,255,255,0.14);
  --cv-button-text: #ffffff;

  /* Degradado verde */
  --cv-bar-start: #B2E914;
  --cv-bar-end: #1B5E20;

  --cv-bubble-bg: #16243d;
  --cv-bubble-icon: #ffffff;

  display: block !important;
  visibility: visible !important;
  opacity: 1;
  position: relative;
  width: 260px;
  max-width: calc(100vw - 24px);
  min-width: 220px;
  font-family: Arial, Helvetica, sans-serif !important;
  color: var(--cv-text-color) !important;
  border: 0 !important;
  border-radius: 16px !important;
  overflow: hidden !important;

  background: linear-gradient(
    180deg,
    rgba(8, 14, 27, 0.96),
    rgba(15, 22, 39, 0.94)
  ) !important;

  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28) !important;

  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  z-index: 2147483000 !important;

  transition:
    width .2s ease,
    border-radius .2s ease,
    background-color .2s ease !important;
}

/* =========================
   POSICIÓN
========================= */

.cv-counter-fixed {
  position: fixed !important;
  left: 18px !important;
  right: auto !important;
  bottom: 18px !important;
  top: auto !important;
  margin: 0 !important;
  animation: cvFadeLeft 0.5s ease both !important;
}

.cv-left-bottom {
  left: 18px !important;
  right: auto !important;
  bottom: 18px !important;
}

.cv-right-bottom {
  right: 18px !important;
  left: auto !important;
  bottom: 18px !important;
  animation-name: cvFadeRight !important;
}

/* =========================
   FONDO
========================= */

.cv-counter__bg {
  position: absolute !important;
  inset: 0 !important;

  background-image: var(--cv-bg-image) !important;
  background-size: cover !important;
  background-position: center !important;

  opacity: 0.14 !important;
  pointer-events: none !important;
}

.cv-counter__inner {
  position: relative !important;
  z-index: 1 !important;
  padding: 0 !important;
}

/* =========================
   HEADER VERDE
========================= */

.cv-counter__header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;

  padding: 14px 14px 12px !important;

  background: #B2E914 !important;

  border-bottom: 1px solid rgba(0, 0, 0, 0.15) !important;
}

/* LETRAS NEGRAS */

.cv-counter__title {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;

  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;

  color: #000000 !important;

  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;

  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* =========================
   BODY
========================= */

.cv-counter__body {
  display: block;
  margin: 0 !important;
  padding: 14px !important;
}

.cv-counter__stats {
  display: grid !important;
  gap: 10px !important;
}

.cv-counter__stats p {
  margin: 0 !important;
  padding: 0 !important;

  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;

  gap: 12px !important;

  font-size: 14px !important;
  line-height: 1.3 !important;

  color: var(--cv-text-color) !important;
}

.cv-counter__stats span {
  margin: 0 !important;
  padding: 0 !important;

  color: var(--cv-text-color) !important;
  opacity: 0.92 !important;
}

.cv-counter__stats strong {
  margin: 0 !important;
  padding: 0 !important;

  color: var(--cv-text-color) !important;

  font-size: 18px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}

/* =========================
   GRÁFICO
========================= */

.cv-counter__chart {
  display: block !important;

  margin-top: 12px !important;
  padding-top: 12px !important;

  border-top: 1px solid rgba(255, 255, 255, 0.10) !important;
}

.cv-counter__bars {
  display: grid !important;

  grid-template-columns: repeat(7, minmax(0, 1fr)) !important;

  align-items: end !important;

  gap: 6px !important;

  height: 84px !important;
}

.cv-counter__bar-col {
  display: flex !important;
  flex-direction: column !important;

  align-items: center !important;
  justify-content: flex-end !important;

  gap: 5px !important;

  min-width: 0 !important;
  height: 100% !important;
}

/* =========================
   BARRAS VERDES
========================= */

.cv-counter__bar {
  display: block !important;

  width: 100% !important;
  min-height: 10px !important;

  border-radius: 999px !important;

  background: linear-gradient(
    180deg,
    #B2E914 0%,
    #68A820 50%,
    #1B5E20 100%
  ) !important;

  box-shadow:
    inset 0 -1px 0 rgba(255, 255, 255, 0.18) !important;
}

.cv-counter__bar-label {
  display: block !important;

  margin: 0 !important;
  padding: 0 !important;

  color: var(--cv-text-color) !important;

  font-size: 10px !important;
  line-height: 1 !important;

  opacity: 0.85 !important;
}

/* =========================
   BURBUJA
========================= */

.cv-counter__bubble {
  appearance: none !important;
  -webkit-appearance: none !important;

  display: flex !important;

  align-items: center !important;
  justify-content: center !important;

  border: 1px solid rgba(255, 255, 255, 0.18) !important;

  outline: none !important;
  cursor: pointer !important;

  padding: 0 !important;
  margin: 0 !important;

  flex: 0 0 auto !important;

  width: 32px !important;
  height: 32px !important;

  border-radius: 50% !important;

  background: var(--cv-bubble-bg) !important;
  color: var(--cv-bubble-icon) !important;

  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28) !important;

  transition:
    transform .2s ease,
    background-color .2s ease !important;
}

.cv-counter__bubble:hover,
.cv-counter__bubble:focus {
  filter: brightness(1.12) !important;
  transform: scale(1.06) !important;
}

.cv-counter__bubble-icon {
  display: block !important;

  width: 18px !important;
  height: 18px !important;

  pointer-events: none !important;
}

/* =========================
   ANIMACIÓN BURBUJA
========================= */

.cv-counter:not(.is-bubble-expanded)
.cv-counter__bubble.cv-bubble-bounce {
  animation: cvBubbleBounce 0.6s ease !important;
}

@keyframes cvBubbleBounce {
  0% {
    transform: scale(1);
  }

  30% {
    transform: scale(1.22) translateY(-3px);
  }

  55% {
    transform: scale(0.92) translateY(1px);
  }

  75% {
    transform: scale(1.06) translateY(-1px);
  }

  100% {
    transform: scale(1);
  }
}

/* =========================
   ESTADO COLAPSADO
========================= */

.cv-counter:not(.is-bubble-expanded) {
  width: 48px !important;
  min-width: 0 !important;

  background: transparent !important;

  box-shadow: none !important;

  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;

  border: 0 !important;

  border-radius: 50% !important;

  overflow: visible !important;
}

.cv-counter:not(.is-bubble-expanded) .cv-counter__bg,
.cv-counter:not(.is-bubble-expanded) .cv-counter__inner {
  display: none !important;
}

.cv-counter:not(.is-bubble-expanded) .cv-counter__bubble {
  width: 48px !important;
  height: 48px !important;
}

.cv-counter:not(.is-bubble-expanded) .cv-counter__bubble-icon {
  width: 22px !important;
  height: 22px !important;
}

/* =========================
   ESTADO EXPANDIDO
========================= */

.cv-counter.is-bubble-expanded {
  width: 260px;

  animation: cvBubblePop 0.18s ease both !important;
}

.cv-counter.is-bubble-expanded .cv-counter__bubble {
  position: absolute !important;

  top: 12px !important;
  right: 12px !important;

  z-index: 3 !important;
}

.cv-counter.is-bubble-expanded .cv-counter__header {
  padding-right: 48px !important;
}

/* =========================
   ANIMACIONES
========================= */

@keyframes cvFadeLeft {
  from {
    opacity: 0;
    transform: translate3d(-16px, 0, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes cvFadeRight {
  from {
    opacity: 0;
    transform: translate3d(16px, 0, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes cvBubblePop {
  from {
    opacity: 0;
    transform: scale(0.92);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* =========================
   MÓVIL
========================= */

@media (max-width: 767px) {

  .cv-counter.is-bubble-expanded {
    width: 148px !important;

    min-width: 0 !important;
    max-width: calc(100vw - 24px) !important;

    border-radius: 14px !important;

    background: linear-gradient(
      180deg,
      rgba(8, 14, 27, 0.62),
      rgba(15, 22, 39, 0.58)
    ) !important;

    box-shadow:
      0 12px 34px rgba(0, 0, 0, 0.28) !important;

    -webkit-backdrop-filter: blur(14px) !important;
    backdrop-filter: blur(14px) !important;
  }

  .cv-counter-fixed,
  .cv-left-bottom {
    left: 12px !important;
    bottom: 12px !important;
  }

  .cv-right-bottom {
    right: 12px !important;
    bottom: 12px !important;
  }

  /* HEADER VERDE TAMBIÉN EN MÓVIL */

  .cv-counter.is-bubble-expanded .cv-counter__header {
    padding: 7px 34px 7px 10px !important;

    background: #B2E914 !important;
  }

  /* TEXTO NEGRO TAMBIÉN EN MÓVIL */

  .cv-counter.is-bubble-expanded .cv-counter__title {
    font-size: 10.5px !important;

    letter-spacing: 0.02em !important;

    color: #000000 !important;
  }

  .cv-counter.is-bubble-expanded .cv-counter__bubble {
    top: 6px !important;
    right: 6px !important;

    width: 22px !important;
    height: 22px !important;
  }

  .cv-counter.is-bubble-expanded .cv-counter__bubble-icon {
    width: 12px !important;
    height: 12px !important;
  }

  .cv-counter.is-bubble-expanded .cv-counter__body {
    padding: 7px 10px 8px !important;
  }

  .cv-counter.is-bubble-expanded .cv-counter__stats {
    gap: 2px !important;
  }

  .cv-counter.is-bubble-expanded .cv-counter__stats p {
    font-size: 11.5px !important;
    gap: 8px !important;
  }

  .cv-counter.is-bubble-expanded .cv-counter__stats strong {
    font-size: 13px !important;
  }

  .cv-counter.is-bubble-expanded .cv-counter__chart {
    margin-top: 5px !important;
    padding-top: 5px !important;
  }

  /* =========================
     BARRAS HORIZONTALES
  ========================= */

  .cv-counter__bars--horizontal {
    display: flex !important;

    flex-direction: column !important;

    gap: 3px !important;

    height: auto !important;
    width: 100% !important;
  }

  .cv-counter__hbar-row {
    display: grid !important;

    grid-template-columns: 22px 1fr 20px !important;

    align-items: center !important;

    gap: 6px !important;

    width: 100% !important;
  }

  .cv-counter__hbar-label {
    font-size: 9.5px !important;

    line-height: 1 !important;

    color: var(--cv-text-color) !important;

    opacity: 0.85 !important;

    text-align: right !important;
  }

  .cv-counter__hbar-track {
    display: block !important;

    width: 100% !important;
    height: 6px !important;

    border-radius: 999px !important;

    background: rgba(255, 255, 255, 0.12) !important;

    overflow: hidden !important;
  }

  /* DEGRADADO VERDE EN MÓVIL */

  .cv-counter__hbar-fill {
    display: block !important;

    height: 100% !important;

    border-radius: 999px !important;

    background: linear-gradient(
      90deg,
      #B2E914 0%,
      #68A820 50%,
      #1B5E20 100%
    ) !important;
  }

  .cv-counter__hbar-value {
    font-size: 10.5px !important;

    font-weight: 700 !important;

    line-height: 1 !important;

    color: var(--cv-text-color) !important;

    text-align: right !important;
  }
}
