/* =====================================================================
   RESEÑAS SKOOL · COMANDOFRX ACADEMY
   Widget de reseñas de Skool integrado en la sección Testimonios.
   Prefijo de clases: cfx-  — no colisiona con nada de la web.
   ===================================================================== */

#cfx-resenas {
  --cfx-tinta: #0B0E10;
  --cfx-tarjeta: #13181B;
  --cfx-borde: #232B30;
  --cfx-borde-2: #2E383E;
  --cfx-blanco: #F3F7F6;
  --cfx-texto: #D6DCD8;
  --cfx-gris: #8F9B95;
  --cfx-salvia: #C9D6A0;
  --cfx-salvia-2: #96A868;
  --cfx-oro: #D6A83E;
  --cfx-oro-claro: #F3CE70;
  --cfx-oliva: #34441C;
  --cfx-oliva-2: #4A5C28;
}

#cfx-resenas {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

#cfx-resenas * {
  box-sizing: border-box;
}

.cfx-oculto {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --- cabecera: ★ 5.0 · 22 reseñas ----------------------------------- */
.cfx-kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: Anton, Impact, sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .32em;
  color: var(--cfx-oro);
  margin: 0 0 14px;
}

.cfx-skool-mini {
  height: 20px;
  width: 61px;
  display: block;
  position: relative;
  top: -1px;
}

.cfx-cabecera {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0 0 22px;
}

.cfx-nota {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: Anton, Impact, sans-serif;
  font-size: clamp(36px, 4vw, 48px);
  line-height: 1;
  color: var(--cfx-blanco);
  letter-spacing: .01em;
  /* Es un h3: sin esto hereda los márgenes del navegador y separa demasiado la cabecera */
  margin: 0;
}

.cfx-nota svg {
  width: 40px;
  height: 40px;
  flex: none;
  position: relative;
  top: -2px;
}

.cfx-total {
  font-family: Anton, Impact, sans-serif;
  font-weight: 500;
  font-size: 26px;
  color: var(--cfx-salvia);
  letter-spacing: .04em;
}

.cfx-total b {
  font-weight: 700;
  color: var(--cfx-blanco);
}

/* --- banner Skool (sustituye a «Escribe una reseña…») ----------------- */
.cfx-skool {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  background: #15191C;
  border: 1px solid var(--cfx-borde-2);
  border-radius: 14px;
  padding: 12px 16px;
  margin: 0 0 12px;
  color: var(--cfx-blanco);
}

.cfx-skool-izq {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

/* Banner compacto: rótulo y logo en una sola línea */
.cfx-skool-txt {
  font-family: Anton, Impact, sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .12em;
  white-space: nowrap;
  color: var(--cfx-blanco);
}

/* A) Logotipo de Skool (SVG en línea, colores originales sobre fondo oscuro) */
.cfx-skool-logo {
  display: inline-flex;
  align-items: center;
  height: 28px;
}

.cfx-skool-logo svg {
  height: 21px;
  width: 64px;
  display: block;
}

/* --- tarjetas --------------------------------------------------------- */
.cfx-lista {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--cfx-salvia-2) transparent;
  padding-right: 4px;
  padding-bottom: 12px;
}

.cfx-lista::-webkit-scrollbar {
  width: 6px;
}

.cfx-lista::-webkit-scrollbar-track {
  background: transparent;
}

.cfx-lista::-webkit-scrollbar-thumb {
  background: var(--cfx-salvia-2);
  border-radius: 3px;
}

.cfx-tarjeta {
  display: grid;
  /* Avatar y rellenos más chicos para dar más ancho al texto */
  grid-template-columns: 36px 1fr;
  gap: 12px;
  background: var(--cfx-tarjeta);
  border: 1px solid var(--cfx-borde);
  border-radius: 12px;
  padding: 14px 16px 14px 14px;
  flex-shrink: 0;
}

.cfx-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Anton, Impact, sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .04em;
  color: #EEF2EC;
  background: #2E3A40;
  overflow: hidden;
  flex-shrink: 0;
}

.cfx-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cfx-avatar.t1 {
  background: #34441C;
}

.cfx-avatar.t2 {
  background: #1F3A3E;
}

.cfx-avatar.t3 {
  background: #5A4615;
}

.cfx-avatar.t4 {
  background: #2E3A40;
}

.cfx-cab {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 2px 0 8px;
}

.cfx-nombre {
  font-weight: 700;
  font-size: 16px;
  color: var(--cfx-blanco);
}

.cfx-estrellas {
  display: inline-flex;
  gap: 2px;
}

.cfx-estrellas svg {
  width: 15px;
  height: 15px;
}

.cfx-texto {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--cfx-texto);
  overflow-wrap: anywhere;
  font-family: Inter, sans-serif;
}

.cfx-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--cfx-gris);
  white-space: nowrap;
  font-family: Inter, sans-serif;
}

.cfx-meta .cfx-sep {
  opacity: .5;
}

.cfx-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--cfx-salvia-2);
}

.cfx-badge svg {
  width: 13px;
  height: 13px;
}

/* --- valoraciones sin comentario -------------------------------------- */
.cfx-solo {
  background: transparent;
  border: 1px dashed var(--cfx-borde-2);
  border-radius: 14px;
  padding: 16px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}

.cfx-solo-tit {
  font-size: 14px;
  color: var(--cfx-gris);
  margin: 0;
  font-family: Inter, sans-serif;
}

.cfx-solo-tit b {
  color: var(--cfx-texto);
  font-weight: 700;
}

/* --- aviso si el JSON de reseñas no carga ------------------------------ */
.cfx-aviso {
  border: 1px dashed var(--cfx-borde-2);
  border-radius: 14px;
  padding: 16px 22px;
  font-family: Inter, sans-serif;
  font-size: 14px;
  color: var(--cfx-gris);
  flex-shrink: 0;
  align-self: start;
}

.cfx-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cfx-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--cfx-tarjeta);
  border: 1px solid var(--cfx-borde);
  border-radius: 999px;
  padding: 5px 12px 5px 5px;
  font-size: 13.5px;
  color: var(--cfx-blanco);
  font-family: Inter, sans-serif;
}

.cfx-chip .cfx-avatar {
  width: 26px;
  height: 26px;
  font-size: 11px;
}

.cfx-chip .cfx-estrellas svg {
  width: 11px;
  height: 11px;
}

/* --- botón estándar de la marca --------------------------------------- */
.cfx-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cfx-oliva);
  color: #FFFFFF;
  text-decoration: none;
  font-family: Anton, Impact, sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .18em;
  padding: 14px 26px;
  border-radius: 8px;
  transition: background .2s;
  border: 0;
  cursor: pointer;
  flex-shrink: 0;
}

.cfx-cta:hover {
  background: var(--cfx-oliva-2);
}

.cfx-cta:focus-visible {
  outline: 2px solid var(--cfx-oro);
  outline-offset: 3px;
}

/* Widget layout: flex column with fixed header, scrolling list, fixed footer */
#cfx-resenas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 16px;
  background: var(--cfx-tinta);
  border-radius: 16px;
  overflow: hidden;
}

.cfx-kicker + .cfx-cabecera {
  flex-shrink: 0;
  margin-bottom: 8px;
}

.cfx-skool {
  flex-shrink: 0;
  margin-bottom: 12px;
}

.cfx-lista {
  margin-bottom: 12px;
}

.cfx-pie {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--cfx-borde);
}

.cfx-pie .cfx-cta {
  width: 100%;
}

/* Light theme: dark panel on light background */
[data-theme="light"] #cfx-resenas {
  background: var(--cfx-tinta);
  color: var(--cfx-texto);
}

@media (max-width: 560px) {
  /* En pantallas angostas el rótulo y el logo pueden ir en dos líneas */
  .cfx-skool-izq {
    flex-wrap: wrap;
  }

  #cfx-resenas {
    padding: 14px;
  }

  .cfx-nota {
    font-size: 34px;
  }

  .cfx-nota svg {
    width: 32px;
    height: 32px;
  }

  .cfx-total {
    font-size: 18px;
  }

  .cfx-skool {
    padding: 14px 16px;
  }

  .cfx-skool-txt {
    font-size: 15px;
    letter-spacing: .14em;
  }

  .cfx-tarjeta {
    grid-template-columns: 36px 1fr;
    gap: 12px;
    padding: 16px 16px 14px 14px;
  }

  .cfx-avatar {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .cfx-pie {
    justify-content: center;
  }

  .cfx-pie .cfx-cta {
    width: 100%;
  }
}
