/* Estilos generales del contenedor principal del plugin */
#tvc-social-share-feedback-plugin {
    box-sizing: border-box; /* Asegura que el padding y el borde se incluyan en el ancho/alto */
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
    font-family: Arial, sans-serif;
    color: #333;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#tvc-social-share-feedback-plugin h4 {
    margin-top: 0;
    color: inherit;
}

#tvc-social-share-feedback-plugin p {
    margin-bottom: 10px;
    color: inherit;
}

/* ------------------------------------------- */
/* Sección de Me Gusta / No Me Gusta */
.feedback-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.like-dislike-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

button.feedback-button {
    background-color: #0073aa;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s ease;
    min-width: 120px;
    justify-content: center;
}

button.feedback-button:hover {
    opacity: 0.9;
}

button.feedback-button i {
    color: inherit;
    font-size: 18px;
}

/* ------------------------------------------- */
/* Sección de Calificación por Estrellas */
.rating-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.star-rating {
    /* *** CAMBIO CRÍTICO AQUI *** */
    display: flex; /* Asegura que las estrellas se alineen de izquierda a derecha con flexbox */
    justify-content: center; /* Centra las estrellas horizontalmente */
    flex-direction: row; /* Fuerza el orden de izquierda a derecha */
    /* *** Fin del cambio crítico *** */
    font-size: 30px;
    cursor: pointer;
    margin-bottom: 10px;
    /* Asegúrate de que NO haya 'direction: rtl;' o 'unicode-bidi: bidi-override;' aquí */
}

/* Estrellas por defecto (no seleccionadas) - siempre gris claro */
.star-rating .star {
    color: #e0e0e0; /* Color gris claro */
    transition: color 0.2s ease;
}

/* Estrellas con la clase 'selected' (establecida por JS) - siempre doradas */
.star-rating .star.selected {
    color: #FFD700 !important; /* ¡Dorado y con !important para asegurar la prevalencia! */
}

/* Manejo del HOVER:
   El JavaScript ya se encarga de añadir/quitar la clase 'selected' en el hover.
   Por lo tanto, NO necesitamos reglas CSS adicionales como `~ .star` para el hover.
   Las estrellas simplemente adoptarán el color de `.star.selected` si el JS las marca.
*/

/* Reglas para el estado permanente una vez que se ha calificado (clase 'has-rated' en el contenedor) */
/* Asegura que las estrellas no seleccionadas en un estado 'has-rated' se vean grises */
.star-rating.has-rated .star {
    color: #e0e0e0; /* Las estrellas NO seleccionadas en un rating permanente se quedan grises */
}

/* Asegura que las estrellas seleccionadas en un estado 'has-rated' se vean doradas */
.star-rating.has-rated .star.selected {
    color: #FFD700 !important; /* Las estrellas seleccionadas en un rating permanente se quedan doradas */
}

/* ------------------------------------------- */
/* Sección de Compartir en Redes Sociales */
.share-section {
    margin-bottom: 0;
}

.social-icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.social-icon-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
}

.social-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #ccc;
    color: #fff;
    font-size: 24px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-decoration: none;
}

.social-icon i {
    color: inherit;
}

.social-icon:hover {
    transform: translateY(-3px);
}

.social-icon-wrapper .share-count-number {
    font-size: 14px;
    margin-top: 5px;
    color: #333;
    font-weight: bold;
}

/* ------------------------------------------- */
/* Media Queries para Responsividad */
@media (max-width: 768px) {
    #tvc-social-share-feedback-plugin {
        padding: 15px;
        margin: 15px 0;
    }
    button.feedback-button {
        padding: 8px 15px;
        font-size: 15px;
        min-width: 100px;
    }
    .social-icon {
        width: 45px;
        height: 45px;
        font-size: 22px;
    }
    .social-icons {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    #tvc-social-share-feedback-plugin {
        padding: 10px;
        margin: 10px 0;
    }
    button.feedback-button {
        padding: 7px 12px;
        font-size: 14px;
        min-width: 80px;
    }
    .star-rating {
        font-size: 25px;
    }
    .social-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    .social-icon-wrapper .share-count-number {
        font-size: 12px;
    }
}