/* Estilos para el plugin Reviews CPT */

/* Contenedor principal de la tabla */
.reviews-table-container {
    overflow-x: auto;
    margin: 20px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    border-radius: 8px;
}

/* Tabla de reseñas */
.reviews-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-width: 600px;
}

/* Encabezados de la tabla */
.reviews-table thead th {
    background-color: #f8f9fa;
    color: #333;
    font-weight: 600;
    padding: 15px 12px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Celdas de la tabla */
.reviews-table tbody td {
    padding: 15px 12px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: top;
    line-height: 1.5;
}

/* Filas de la tabla */
.reviews-table tbody tr {
    background-color: #fff;
    transition: background-color 0.2s ease;
}

.reviews-table tbody tr:hover {
    background-color: #f8f9fa;
}

.reviews-table tbody tr:nth-child(even) {
    background-color: #fdfdfd;
}

.reviews-table tbody tr:nth-child(even):hover {
    background-color: #f0f0f0;
}

/* Columnas específicas */
.reviews-table .reviews-alias {
    min-width: 120px;
    font-weight: 500;
    color: #495057;
}

.reviews-table .reviews-texto {
    max-width: 300px;
}

.reviews-table .reviews-texto .review-content {
    line-height: 1.6;
    color: #6c757d;
}

.reviews-table .reviews-texto .review-content p {
    margin: 0 0 10px 0;
}

.reviews-table .reviews-texto .review-content p:last-child {
    margin-bottom: 0;
}

.reviews-table .reviews-valoracion {
    min-width: 150px;
    text-align: center;
}

.reviews-table .reviews-fuente {
    min-width: 120px;
    font-weight: 500;
    color: #495057;
}

.reviews-table .reviews-tipo-servicio {
    min-width: 120px;
    color: #495057;
}

/* Sistema de estrellas */
.rating-stars {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex-wrap: wrap;
}

.rating-stars .star {
    font-size: 16px;
    color: #e0e0e0;
    transition: color 0.2s ease;
}

.rating-stars .star.filled {
    color: #ffc107;
}

.rating-stars .rating-number {
    margin-left: 8px;
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
}

/* Mensaje cuando no hay resultados */
.reviews-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-style: italic;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

/* Responsive */
@media (max-width: 768px) {
    .reviews-table-container {
        margin: 15px 0;
        border-radius: 4px;
    }
    
    .reviews-table {
        font-size: 14px;
        min-width: 500px;
    }
    
    .reviews-table thead th,
    .reviews-table tbody td {
        padding: 10px 8px;
    }
    
    .reviews-table .reviews-texto {
        max-width: 200px;
    }
    
    .rating-stars .star {
        font-size: 14px;
    }
    
    .rating-stars .rating-number {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .reviews-table {
        min-width: 400px;
        font-size: 13px;
    }
    
    .reviews-table thead th,
    .reviews-table tbody td {
        padding: 8px 6px;
    }
    
    .reviews-table .reviews-texto {
        max-width: 150px;
    }
    
    .rating-stars {
        flex-direction: column;
        gap: 2px;
    }
    
    .rating-stars .rating-number {
        margin-left: 0;
        margin-top: 2px;
    }
}

/* Estilos para el widget de Elementor */
.reviews-elementor-widget {
    width: 100%;
}

.reviews-elementor-widget .reviews-table-container {
    margin: 0;
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.review-row {
    animation: fadeInUp 0.3s ease forwards;
}

.review-row:nth-child(1) { animation-delay: 0.1s; }
.review-row:nth-child(2) { animation-delay: 0.2s; }
.review-row:nth-child(3) { animation-delay: 0.3s; }
.review-row:nth-child(4) { animation-delay: 0.4s; }
.review-row:nth-child(5) { animation-delay: 0.5s; }

/* Efectos hover en estrellas */
.rating-stars:hover .star {
    transform: scale(1.1);
}

/* Estilos de carga */
.reviews-loading {
    text-align: center;
    padding: 20px;
    color: #6c757d;
}

.reviews-loading::after {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #dee2e6;
    border-radius: 50%;
    border-top-color: #007cba;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}