/* =====================================================
   MÓDULO: Reseñas y Calificaciones — Estilos Públicos
   Archivo: assets/css/reviews.css
   ===================================================== */

/* ===== SECCIÓN DE RESEÑAS ===== */
.reviews-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}
.reviews-section__title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: #333;
}

/* ===== RESUMEN / PROMEDIO ===== */
.reviews-resumen {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem;
    background: #fafafa;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.reviews-resumen__promedio {
    text-align: center;
    min-width: 80px;
}
.reviews-resumen__num {
    font-size: 2.5rem;
    font-weight: 800;
    color: #333;
    line-height: 1;
}
.reviews-resumen__total {
    font-size: 0.8rem;
    color: #999;
    margin-top: 0.25rem;
}
.reviews-resumen__bars {
    flex: 1;
    min-width: 200px;
}
.rating-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}
.rating-bar__label {
    font-size: 0.8rem;
    color: #666;
    min-width: 12px;
    text-align: right;
}
.rating-bar__star {
    color: #ffc107;
    font-size: 0.8rem;
}
.rating-bar__track {
    flex: 1;
    height: 8px;
    background: #e8e8e8;
    border-radius: 4px;
    overflow: hidden;
}
.rating-bar__fill {
    height: 100%;
    background: #ffc107;
    border-radius: 4px;
    transition: width 0.5s ease;
}
.rating-bar__count {
    font-size: 0.75rem;
    color: #999;
    min-width: 20px;
}

/* ===== ESTRELLAS ===== */
.stars-display {
    display: inline-flex;
    gap: 2px;
}
.star {
    font-size: 1.2rem;
    color: #ddd;
    cursor: default;
    transition: color 0.15s;
}
.star--filled { color: #ffc107; }
.star--half {
    color: #ffc107;
    position: relative;
}
.star--empty { color: #ddd; }

/* Estrellas interactivas */
.stars-interactive .star {
    cursor: pointer;
    font-size: 1.8rem;
    transition: color 0.1s, transform 0.1s;
}
.stars-interactive .star:hover,
.stars-interactive .star.active {
    color: #ffc107;
    transform: scale(1.1);
}

/* ===== FORMULARIO DE RESEÑA ===== */
.review-form {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}
.review-form__title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
}
.review-form__row {
    margin-bottom: 1rem;
}
.review-form__label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 0.3rem;
}
.review-form__input {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.review-form__input:focus {
    border-color: #ffc107;
    outline: none;
    box-shadow: 0 0 0 3px rgba(255,193,7,0.15);
}
.review-form__textarea {
    min-height: 100px;
    resize: vertical;
}
.review-form__charcount {
    font-size: 0.75rem;
    color: #999;
    text-align: right;
    margin-top: 0.2rem;
}
.review-form__charcount.warn { color: #e65100; }
.review-form__charcount.error { color: #c62828; }
.review-form__select {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    background: #fff;
    font-family: inherit;
}
.review-form__submit {
    background: #ffc107;
    color: #333;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
}
.review-form__submit:hover {
    background: #ffb300;
}
.review-form__submit:disabled {
    background: #e0e0e0;
    color: #999;
    cursor: not-allowed;
}
.review-form__legal {
    font-size: 0.7rem;
    color: #999;
    margin-top: 0.75rem;
    line-height: 1.5;
}
.review-form__error {
    background: #ffebee;
    color: #c62828;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    display: none;
}
.review-form__success {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
    display: none;
}

/* ===== LISTA DE RESEÑAS ===== */
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.review-item {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    transition: box-shadow 0.2s;
}
.review-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.review-item__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.3rem;
}
.review-item__author {
    font-weight: 600;
    font-size: 0.95rem;
    color: #333;
}
.review-item__date {
    font-size: 0.8rem;
    color: #999;
}
.review-item__stars {
    color: #ffc107;
    font-size: 1rem;
    letter-spacing: 1px;
}
.review-item__body {
    color: #555;
    line-height: 1.7;
    font-size: 0.9rem;
    margin: 0.5rem 0;
}
.review-item__tipo {
    display: inline-block;
    background: #f5f5f5;
    color: #888;
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
}
.review-item__respuesta {
    background: #f1f8e9;
    border-left: 3px solid #8bc34a;
    padding: 0.75rem 1rem;
    margin-top: 0.75rem;
    border-radius: 0 8px 8px 0;
}
.review-item__respuesta-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #558b2f;
    margin-bottom: 0.25rem;
}
.review-item__respuesta p {
    margin: 0;
    color: #555;
    font-size: 0.85rem;
    line-height: 1.6;
}
.review-item__actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}
.review-item__report {
    background: none;
    border: none;
    color: #bbb;
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}
.review-item__report:hover {
    color: #e53935;
}

/* ===== SIN RESEÑAS ===== */
.reviews-empty {
    text-align: center;
    padding: 2rem;
    color: #999;
}
.reviews-empty__icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

/* ===== PAGINACIÓN ===== */
.reviews-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}
.reviews-pagination__btn {
    padding: 0.4rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 0.85rem;
    color: #666;
    transition: all 0.2s;
}
.reviews-pagination__btn:hover {
    background: #f5f5f5;
    border-color: #ffc107;
}
.reviews-pagination__btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ===== COOLDOWN ===== */
.review-cooldown {
    background: #fff3e0;
    border: 1px solid #ffcc80;
    color: #e65100;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

/* ===== MODAL REPORTE ===== */
.review-report-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}
.review-report-modal.show {
    display: flex;
}
.review-report-modal__inner {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 400px;
    width: 90%;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
    .reviews-resumen {
        flex-direction: column;
        text-align: center;
    }
    .reviews-resumen__bars {
        width: 100%;
    }
    .stars-interactive .star {
        font-size: 2rem;
    }
}
