/**
 * Estilos para el popup de valoración de productos
 */

/* Contenedor principal del popup */
.popup-main {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Fondo oscuro detrás del popup */
.backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9998;
}

/* Estilos del popup */
#popup {
    display: none;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    padding: 30px;
    max-width: 500px;
    width: 90%;
    position: relative;
    z-index: 10000;
}

/* Mostrar el popup cuando tiene la clase open-popup */
.open-popup {
    display: block !important;
}

/* Botón de cierre */
#close-popup {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    color: #999;
    text-decoration: none;
    transition: color 0.3s;
}

#close-popup:hover {
    color: #333;
}

/* Título del popup */
#popup h2 {
    margin-top: 15px;
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
}

/* Estilos para el sistema de valoración por estrellas */
.rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    margin-bottom: 20px;
}

.rating input {
    display: none;
}

.rating label {
    cursor: pointer;
    width: 40px;
    height: 40px;
    font-size: 40px;
    color: #ddd;
    transition: color 0.3s;
}

.rating label:hover,
.rating label:hover ~ label,
.rating input:checked ~ label {
    color: #ffb700;
}

/* Área de comentario */
.comment-area {
    margin-bottom: 20px;
}

.comment-area textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    resize: vertical;
}

/* Botón de envío */
#btn-submit-review {
    background-color: var(--button-background, #3BB77E);
    color: var(--button-text-color, white);
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#btn-submit-review:hover {
    background-color: var(--hover-color, #30A56E);
}

/* Logo de la tienda */
#popup img {
    max-width: 150px;
    margin-bottom: 10px;
}

/* Estilos responsivos */
@media (max-width: 576px) {
    #popup {
        padding: 20px;
        width: 95%;
    }
    
    .rating label {
        width: 30px;
        height: 30px;
        font-size: 30px;
    }
}

/* Estilos para el enlace de valoración en la tabla */
.review-customer {
    display: inline-block;
    padding: 5px 10px;
    background-color: var(--button-background, #3BB77E);
    color: var(--button-text-color, white) !important;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s;
    text-decoration: none;
}

.review-customer:hover {
    background-color: var(--hover-color, #30A56E);
}
