/* Product Reviews Styles */

/* General Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* Reviews Modal */
.review-modal .modal-content {
    max-width: 500px;
    padding: 0;
}

.review-modal .modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.review-modal .modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.review-modal .modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.review-modal .modal-close:hover {
    color: #333;
}

.review-modal .modal-body {
    padding: 25px;
}

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

.review-modal .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.review-modal .form-group input,
.review-modal .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.review-modal .form-group input:focus,
.review-modal .form-group textarea:focus {
    outline: none;
    border-color: #c5a059;
}

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

.review-modal .star-rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 5px;
}

.review-modal .star-rating-input input[type="radio"] {
    display: none;
}

.review-modal .star-rating-input label {
    font-size: 28px;
    color: #ccc;
    cursor: pointer;
    transition: color 0.2s ease;
}

.review-modal .star-rating-input label:hover,
.review-modal .star-rating-input label:hover ~ label,
.review-modal .star-rating-input input[type="radio"]:checked ~ label {
    color: #c5a059;
}

.review-modal .btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
}

/* Reviews Summary */
.reviews-summary {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.reviews-overview {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.average-rating {
    text-align: center;
    min-width: 120px;
}

.rating-number {
    font-size: 48px;
    font-weight: 700;
    color: #333;
    display: block;
    line-height: 1;
}

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

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

.rating-bars {
    flex: 1;
    max-width: 300px;
}

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

.rating-label {
    font-size: 13px;
    color: #666;
    width: 55px;
}

.rating-bar {
    flex: 1;
    height: 8px;
    background-color: #eee;
    border-radius: 4px;
    overflow: hidden;
}

.rating-bar-fill {
    height: 100%;
    background-color: #c5a059;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.rating-count {
    font-size: 13px;
    color: #666;
    width: 25px;
    text-align: right;
}

/* Write Review Section */
.write-review-section {
    margin-bottom: 40px;
    text-align: center;
}

.write-review-section .btn {
    padding: 14px 32px;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.success-message {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    text-align: center;
}

/* Reviews List */
.reviews-list h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 20px;
}

.reviews-container {
    margin-bottom: 30px;
}

.loading-reviews {
    text-align: center;
    padding: 40px;
    color: #666;
}

.loading-reviews i {
    margin-right: 10px;
    color: #c5a059;
}

.no-reviews {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

.review-item {
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.review-item:last-child {
    border-bottom: none;
}

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

.review-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 45px;
    height: 45px;
    background-color: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.review-date {
    font-size: 13px;
    color: #999;
}

.review-rating {
    color: #c5a059;
    font-size: 14px;
}

.review-title {
    font-size: 16px;
    color: #333;
    margin-bottom: 8px;
    font-weight: 600;
}

.review-comment {
    color: #555;
    line-height: 1.6;
    font-size: 14px;
    margin-bottom: 10px;
}

.verified-purchase {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #28a745;
    background-color: #e8f5e9;
    padding: 4px 10px;
    border-radius: 12px;
}

.verified-purchase i {
    font-size: 11px;
}

/* Reviews Pagination */
.reviews-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
}

.page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #ddd;
    background-color: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-btn:hover {
    border-color: #c5a059;
    background-color: #faf6f0;
}

.page-btn.active {
    background-color: #c5a059;
    border-color: #c5a059;
    color: #fff;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-ellipsis {
    color: #999;
    padding: 0 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .reviews-overview {
        flex-direction: column;
        align-items: center;
    }

    .rating-bars {
        max-width: 100%;
        width: 100%;
    }

    .review-header {
        flex-direction: column;
        gap: 10px;
    }
}
