/* =====================================================
   Kyunix Rating — Estilos
   ===================================================== */

.kyunix-rating {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin: 24px 0 8px;
    font-family: inherit;
}

/* ── Grupo de estrellas ── */
.kyunix-rating__stars {
    display: flex;
    gap: 4px;
    align-items: center;
}

/* ── Estrellas interactivas (input) ── */
.kyunix-rating__stars--input .kyunix-rating__star {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    width: 28px;
    height: 28px;
    color: #d1d5db; /* gris vacío */
    transition: color 0.15s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kyunix-rating__stars--input .kyunix-rating__star svg {
    width: 26px;
    height: 26px;
    fill: currentColor;
}

/* Estado hover: colorear hasta la estrella hovered */
.kyunix-rating__stars--input .kyunix-rating__star:hover,
.kyunix-rating__stars--input .kyunix-rating__star.is-hovered {
    color: #f59e0b;
    transform: scale(1.15);
}

/* Estrella seleccionada */
.kyunix-rating__stars--input .kyunix-rating__star.is-selected {
    color: #f59e0b;
}

/* ── Estrellas de display (resultado) ── */
.kyunix-rating__stars--display {
    gap: 2px;
}

.kyunix-rating__stars--display .kyunix-rating__star {
    display: inline-flex;
    width: 20px;
    height: 20px;
}

.kyunix-rating__stars--display .kyunix-rating__star svg {
    width: 20px;
    height: 20px;
}

/* Estrella llena */
.kyunix-rating__star--full svg {
    fill: #f59e0b;
}

/* Estrella vacía */
.kyunix-rating__star--empty svg {
    fill: #d1d5db;
}

/* Estrella mitad */
.kyunix-rating__star--half svg path.kyunix-star-bg {
    fill: #d1d5db;
}
.kyunix-rating__star--half svg path:last-child {
    fill: #f59e0b;
}

/* ── Meta (promedio y votos) ── */
.kyunix-rating__result {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.kyunix-rating__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #9ca3af;
}

.kyunix-rating__avg {
    font-weight: 600;
    color: #6b7280;
}

.kyunix-rating__separator {
    opacity: 0.5;
}

/* ── Hint y mensaje de gracias ── */
.kyunix-rating__hint,
.kyunix-rating__thanks {
    font-size: 0.8rem;
    color: #9ca3af;
    margin: 0;
}

.kyunix-rating__thanks {
    color: #10b981;
    font-weight: 500;
}

/* ── Estado: ya votó ── */
.kyunix-rating--voted .kyunix-rating__stars--input {
    pointer-events: none;
    opacity: 0.5;
}

/* ── Animación al votar ── */
@keyframes kyunix-pop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.kyunix-rating__star--pop {
    animation: kyunix-pop 0.3s ease;
}

/* ── Modo display (archives / home) ── */
.kyunix-rating--display {
    margin: 8px 0 0;
}

.kyunix-rating--display .kyunix-rating__stars--display .kyunix-rating__star {
    width: 16px;
    height: 16px;
}

.kyunix-rating--display .kyunix-rating__stars--display .kyunix-rating__star svg {
    width: 16px;
    height: 16px;
}

.kyunix-rating--display .kyunix-rating__meta {
    font-size: 0.78rem;
}
