/* === Rest Rating Block (ACF) — style.css completo === */

/* Contenedor principal */
.rrb-rating{
  display:inline-flex;
  align-items:center;
  gap:.15rem;
  line-height:1;
}

/* tamaño */
.rrb-star{
  width:1.1em;
  height:1.1em;
  display:block;
}

/* llena: rellena */
.rrb-star--full{
  fill: currentColor;
}

/* vacía: solo borde */
.rrb-star--empty{
  fill: none;
  stroke: currentColor;
  opacity: .45; /* ajústalo a gusto (0.35–0.6) */
}

/* --- FIX: algunos temas aplican CSS global a svg (position/top/left) --- */
/* Reseteamos SOLO los svg del rating para que no “salten” a la esquina */
.rrb-rating svg.rrb-star{
  position: static !important;
  top:auto !important;
  right:auto !important;
  bottom:auto !important;
  left:auto !important;
  inset:auto !important;
  transform:none !important;
  float:none !important;
}

/* Media estrella (necesita position para superponer capas) */
.rrb-half{
  position:relative;
  display:inline-block;
  width:1.1em;
  height:1.1em;
}

/* Capa de estrella vacía (debajo) */
.rrb-star--empty{
  position:absolute;
  inset:0;
  opacity:.25;
}

/* Capa de relleno al 50% (encima) */
.rrb-half__fill{
  position:absolute;
  inset:0;
  width:50%;
  overflow:hidden;
  display:block;
}

.rrb-half__fill .rrb-star--full{
  position:absolute;
  inset:0;
  opacity:1;
}

/* Número opcional */
.rrb-num{
  margin-left:.35rem;
  font-size:.9em;
  opacity:.8;
}

/* Seguridad: si alguien mete el bloque dentro de una imagen/cover, lo ocultamos */
.wp-block-post-featured-image .rrb-rating,
.wp-block-cover .rrb-rating{
  display:none !important;
}

/* Toogle button frontendd */

.rrb-switch{
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  opacity:.9;
  user-select:none;
}

.rrb-switch[aria-disabled="true"]{
  pointer-events:none; /* no editable */
}

.rrb-switch__track{
  width:44px;
  height:24px;
  border-radius:999px;
  background: #777;
  position:relative;
  flex:0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.25);
}

.rrb-switch__thumb{
  width:20px;
  height:20px;
  border-radius:999px;
  background:#fff;
  position:relative;
  left:-42px;           /* se ajusta con estado */
  box-shadow:0 2px 6px rgba(0,0,0,.25);
  transition:transform .15s ease, left .15s ease;
}

.rrb-switch--on .rrb-switch__track{
  background: var(--wp--preset--color--secondary, #2ecc71);
}

.rrb-switch--on .rrb-switch__thumb{
  left:-22px;
}

.rrb-switch__label{
  font-size: .95em;
}

