/* Estilos para el sistema de reseñas */

.resenas-section {
    margin-top: 40px;
    padding: 30px 0;
    border-top: 1px solid #eee;
}

.resenas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.resenas-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.btn-nueva-resena {
    background: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-nueva-resena:hover {
    background: #0056b3;
    color: white;
    text-decoration: none;
}

/* Estadísticas de reseñas */
.resenas-estadisticas {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.estadisticas-promedio {
    text-align: center;
}

.promedio-numero {
    font-size: 48px;
    font-weight: 700;
    color: #333;
    line-height: 1;
}

.promedio-estrellas {
    margin: 10px 0;
}

.total-resenas {
    color: #666;
    font-size: 14px;
}

.estadisticas-barras {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.barra-calificacion {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.barra-numero {
    width: 15px;
    text-align: center;
    color: #666;
}

.barra-progreso {
    flex: 1;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.barra-relleno {
    height: 100%;
    background: #ffc107;
    transition: width 0.3s ease;
}

.barra-cantidad {
    width: 30px;
    text-align: right;
    color: #666;
    font-size: 12px;
}

/* Estrellas */
.estrellas {
    display: inline-flex;
    gap: 2px;
}

.estrella {
    color: #ddd;
    font-size: 16px;
    transition: color 0.2s ease;
}

.estrella.activa {
    color: #ffc107;
}

.estrellas-grandes .estrella {
    font-size: 20px;
}

.estrellas-pequenas .estrella {
    font-size: 14px;
}

/* Lista de reseñas */
.resenas-lista {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.resena-item {
    padding: 20px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: white;
}

.resena-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 10px;
}

.resena-autor {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.autor-nombre {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.resena-fecha {
    color: #666;
    font-size: 12px;
}

.resena-verificada {
    background: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.resena-calificacion {
    display: flex;
    align-items: center;
    gap: 5px;
}

.resena-titulo {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 10px 0 8px 0;
}

.resena-comentario {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

.resena-acciones {
    display: flex;
    gap: 15px;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.btn-util {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    transition: color 0.2s ease;
}

.btn-util:hover {
    color: #007bff;
}

.btn-util.activo {
    color: #007bff;
    font-weight: 500;
}

/* Formulario de nueva reseña */
.formulario-resena {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin-top: 20px;
    display: none;
}

.formulario-resena.activo {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Selector de estrellas para calificación */
.calificacion-selector {
    display: flex;
    gap: 5px;
    margin: 10px 0;
}

.calificacion-selector .estrella {
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.calificacion-selector .estrella:hover,
.calificacion-selector .estrella.hover {
    color: #ffc107;
    transform: scale(1.1);
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-enviar {
    background: #28a745;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease;
}

.btn-enviar:hover {
    background: #218838;
}

.btn-cancelar {
    background: #6c757d;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s ease;
}

.btn-cancelar:hover {
    background: #545b62;
}

/* Responsive */
@media (max-width: 768px) {
    .resenas-estadisticas {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
    }
    
    .resenas-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .resena-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

/* Estados de carga */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.loading::after {
    content: "...";
    animation: loading-dots 1.5s infinite;
}

@keyframes loading-dots {
    0% { content: ""; }
    25% { content: "."; }
    50% { content: ".."; }
    75% { content: "..."; }
}

/* Alertas */
.alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin: 15px 0;
}

.alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

/* Estilos para resumen de reseñas */
.reviews-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.average-rating h2 {
    font-size: 48px;
    font-weight: bold;
    color: #f0932b;
    margin: 0;
}

.average-rating .stars {
    font-size: 24px;
    color: #f0932b;
    margin: 10px 0;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rating-label {
    min-width: 50px;
    font-size: 14px;
    color: #666;
}

.rating-bar .progress {
    flex: 1;
}

.rating-bar .progress-bar {
    background-color: #f0932b !important;
}

.review-title {
    font-weight: 600;
    color: #333;
    margin-top: 10px;
    margin-bottom: 5px;
}

.review-helpful {
    display: flex;
    align-items: center;
    gap: 8px;
}

.review-helpful .btn {
    font-size: 12px;
    padding: 4px 12px;
}

.stars-input {
    display: flex;
    gap: 8px;
}

.stars-input i {
    font-size: 28px;
    color: #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
}

.stars-input i:hover,
.stars-input i.active {
    color: #f0932b;
    transform: scale(1.1);
}

.btn-submit-review {
    background: linear-gradient(135deg, #f9ca24, #f0932b);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit-review:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(240, 147, 43, 0.3);
}