﻿/* --- CONTAINER CHÍNH --- */
.product-reviews-container {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    color: #333;
}

/* Header & Nút Viết Review */
.reviews-header .title {
    font-size: 1.25rem;
    font-weight: bold;
    margin: 0;
}

.reviews-header .sub-info {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

.reviews-header .stars {
    color: #ee4d2d;
    margin-right: 5px;
}

.btn-write-review {
    background-color: #ee4d2d;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 2px;
    cursor: pointer;
    font-size: 14px;
}

    .btn-write-review:hover {
        background-color: #d73211;
    }

/* Filter Box */
.reviews-filter {
    background-color: #fffbf8;
    border: 1px solid #f9ede5;
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-btn {
    height: 32px;
    line-height: 30px;
    padding: 0 15px;
    border: 1px solid rgba(0,0,0,.09);
    background: #fff;
    font-size: 14px;
    cursor: pointer;
    border-radius: 2px;
    user-select: none;
}

    .filter-btn.active {
        border-color: #ee4d2d;
        color: #ee4d2d;
        font-weight: 500;
    }

/* Review List Item */
.review-item {
    display: flex;
    padding: 15px 0;
}

.review-divider {
    border: 0;
    border-top: 1px solid rgba(0,0,0,.05);
    margin: 0;
}

.user-avatar {
    width: 40px;
    margin-right: 15px;
    flex-shrink: 0;
}

    .user-avatar img {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        object-fit: cover;
    }

.review-content {
    flex: 1;
}

.user-name {
    font-size: 12px;
    color: #333;
    font-weight: 600;
}

.review-time {
    font-size: 12px;
    color: #888;
    margin-top: 3px;
}

.user-rating-stars {
    color: #ee4d2d;
    font-size: 12px;
    margin-top: 2px;
}

.comment-text {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}
.like-btn{
    cursor:pointer;
}
.liked-active {
    color: #007bff;
}
/* Hình ảnh trong comment */
.review-images {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.img-wrap {
    width: 72px;
    height: 72px;
    border: 1px solid #e5e5e5;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .img-wrap img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.2s;
    }

    .img-wrap:hover img {
        transform: scale(1.1);
    }
/* Custom Checkbox (Sẽ giới thiệu SP) */
.checkbox-container {
    display: block;
    position: relative;
    padding-left: 25px;
    margin-bottom: 15px;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

    .checkbox-container input {
        position: absolute;
        opacity: 0;
        cursor: pointer;
        height: 0;
        width: 0;
    }

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: #eee;
    border-radius: 3px;
    border: 1px solid #ccc;
}
.modal-rating-selection{text-align:center;}
.modal-product-info{text-align:center;}
.modal-title{text-align:center;}
.checkbox-container input:checked ~ .checkmark {
    background-color: #007bff;
    border-color: #007bff;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}
/* Load More Button */
.review-load-more {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
}

#btnLoadMore {
    display: inline-block;
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 8px 30px;
    color: #555;
    cursor: pointer;
    border-radius: 2px;
}

    #btnLoadMore:hover {
        color: #ee4d2d;
        border-color: #ee4d2d;
    }

    #btnLoadMore.hidden {
        display: none;
    }

/* --- CSS CHO MODAL (Cần thiết vì HTML modal đang ẩn) --- */
.modalrv {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .modalrv.show {
        display: flex !important;
    }

.modal-contentrv {
    background-color: #fefefe;
    padding: 20px;
    border-radius: 4px;
    width: 90%;
    max-width: 500px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close-buttonrv {
    color: #040404;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: relative;
    right: -15px;
    top: -28px;
}
.fix {
    right: 0px!important;
    top: 0px!important;
}

.star-icon {
    cursor: pointer;
    font-size: 24px;
    color: #ccc;
    margin: 0 5px;
}

    .star-icon.hovered, .star-icon.selected {
        color: #ffca00;
    }
/* --- Style mới cho phần chọn sao --- */
.modal-rating-selection {
    display: flex;
    justify-content: center; /* Căn giữa toàn bộ khối chọn sao */
    gap: 15px; /* Khoảng cách giữa các cặp sao-text */
    margin-bottom: 20px;
    flex-direction: column;
}

/* Một cặp gồm Sao và Text */
.rating-pair {
    display: flex;
    flex-direction: column; /* Sắp xếp theo chiều dọc (sao trên, chữ dưới) */
    align-items: center; /* Căn giữa sao và chữ */
    cursor: pointer; /* Con trỏ tay khi di chuột vào cả vùng */
}

/* Style cho ngôi sao */
.star-icon {
    font-size: 28px; /* Kích thước sao */
    color: #ccc; /* Màu mặc định */
    transition: color 0.2s;
}

    /* Màu sao khi hover hoặc đã chọn */
    .star-icon.hovered, .star-icon.selected {
        color: #ffca00; /* Màu vàng */
    }
.star-rating-options {
    display: flex;
    gap: 1rem;
    justify-content: center;
}
.rating-text-options {
    display: flex;
    gap: 1.4rem;
    justify-content: center;
}
/* Style cho dòng text mô tả */
.rating-text {
    font-size: 12px; /* Cỡ chữ nhỏ */
    color: #888; /* Màu chữ xám mặc định */
    margin-top: 5px; /* Khoảng cách với ngôi sao */
    font-weight: normal;
}

    /* Style cho dòng text khi được chọn */
    .rating-text.selected {
        color: #ffca00; /* Đổi màu chữ thành vàng */
        font-weight: bold; /* In đậm */
    }

/* Photo Viewer Modal Simple */
.photo-viewer-modal .viewer-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.viewer-image-container{
    text-align:center;
}
.viewer-image-container img {
    max-width: 95%;
    max-height: 90vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}
/* CSS bổ trợ cho form */
.input-field {
    width: 100%;
    padding: 8px;
    margin: 5px 0;
    border: 1px solid #ddd;
}

.review-textarea {
    width: 100%;
    height: 80px;
    margin-bottom: 10px;
    padding: 8px;
}

.btn-submit-review {
    width: 100%;
    padding: 10px;
    background: #ccc;
    color: white;
    border: none;
    margin-top: 10px;
}

    .btn-submit-review.active {
        background: #ee4d2d;
        cursor: pointer;
    }

.photo-thumbnail-wrapper {
    display: inline-block;
    width: 60px;
    height: 60px;
    margin-right: 5px;
    position: relative;
}

    .photo-thumbnail-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.delete-photo-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    background: red;
    color: white;
    border-radius: 50%;
    width: 15px;
    height: 15px;
    font-size: 10px;
    text-align: center;
    cursor: pointer;
}
