/* ===========================
   Product Reviews CSS
=========================== */

/* Rating Stars Display */
.rating-stars-display {
    margin: 15px 0;
    font-size: 24px;
    color: #ffc107;
}

.rating-stars-display i {
    margin-right: 5px;
}

.rating-stars-display .lni-star-filled.half {
    position: relative;
    color: #e0e0e0;
}

.rating-stars-display .lni-star-filled.half::before {
    content: "\ea3d";
    position: absolute;
    left: 0;
    width: 50%;
    overflow: hidden;
    color: #ffc107;
}

.based-on-reviews {
    color: #666;
    margin: 10px 0 20px;
}

/* Rating Distribution Bars */
.rating-bars {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.rating-bars li {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
    transition: all 0.3s ease;
    padding: 5px;
    border-radius: 6px;
}

.rating-bars li.rating-bar-item {
    cursor: pointer;
}

.rating-bars li.rating-bar-item:hover {
    background: #f8f9fa;
    transform: translateX(5px);
}

.rating-bars li.rating-bar-item.active {
    background: #fff3e0;
    border-left: 3px solid #ffc107;
    padding-left: 7px;
}

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

.rating-bars .rating-bar {
    flex: 1;
    height: 8px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.rating-bars .rating-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffc107 0%, #ff9800 100%);
    transition: width 0.3s ease;
}

.rating-bars .rating-count {
    min-width: 30px;
    text-align: right;
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

/* Review Button */
.review-btn {
    width: 100%;
    padding: 12px 20px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.review-btn i {
    margin-right: 8px;
}

.review-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Reviews List */
.reviews {
    padding: 20px 0;
}

.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 15px;
}

.reviews .title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.star-filter {
    display: flex;
    align-items: center;
    gap: 10px;
}

.star-filter label {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin: 0;
    white-space: nowrap;
}

.star-filter .form-select {
    min-width: 150px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.star-filter .form-select:focus {
    border-color: #ff4757;
    box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.1);
    outline: none;
}

.star-filter .form-select:hover {
    border-color: #ff4757;
}

.single-review {
    display: flex;
    gap: 20px;
    padding: 25px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.single-review img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.single-review .review-info {
    flex: 1;
}

.single-review .review-info h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.single-review .review-info h4 .badge {
    font-size: 11px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 4px;
}

.single-review .review-info h4 .badge-verified {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.single-review .review-info h4 .badge-verified i {
    font-size: 13px;
}

.single-review .review-info h4 .review-date {
    font-size: 13px;
    color: #999;
    font-weight: 400;
}

.single-review .review-info .stars {
    list-style: none;
    padding: 0;
    margin: 8px 0 12px;
    display: flex;
    gap: 3px;
}

.single-review .review-info .stars li {
    font-size: 16px;
    color: #ffc107;
}

.single-review .review-info .stars li .lni-star {
    color: #e0e0e0;
}

.single-review .review-info p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* Admin Reply */
.admin-reply {
    background: #f8f9fa;
    border-left: 3px solid #ff4757;
    padding: 15px;
    border-radius: 4px;
    margin-top: 15px;
}

.admin-reply-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ff4757;
    font-size: 14px;
    margin-bottom: 8px;
}

.admin-reply-header i {
    font-size: 18px;
}

.admin-reply p {
    margin: 0;
    color: #555;
    font-size: 14px;
}

/* Review Form */
#review-form-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    margin-top: 30px;
}

#review-form-section h4 {
    font-size: 22px;
    font-weight: 700;
    color: #333;
}

.star-rating {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

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

.stars-input .star {
    color: #e0e0e0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    user-select: none;
    display: inline-block;
}

.stars-input .star.active {
    color: #ffc107;
    transform: scale(1.05);
}

.stars-input .star.hover {
    color: #ffc107;
    transform: scale(1.15);
    filter: drop-shadow(0 0 8px rgba(255, 193, 7, 0.6));
}

.stars-input .star:active {
    transform: scale(0.95);
}

/* Form Controls */
#review-form .form-control {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 15px;
    transition: all 0.3s ease;
}

#review-form .form-control:focus {
    border-color: #ff4757;
    box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.1);
}

#review-form .form-control.is-invalid {
    border-color: #dc3545;
}

#review-form .form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

#review-form .invalid-feedback {
    display: block;
    font-size: 13px;
    color: #dc3545;
    margin-top: 5px;
}

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

#review-form .text-danger {
    color: #dc3545;
}

#review-form .text-muted {
    color: #6c757d;
    font-size: 13px;
}

#review-form .button {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

#review-form .button .btn {
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

#review-form .button .btn i {
    margin-right: 6px;
}

#review-form .button .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#review-form .button .btn-secondary {
    background: #6c757d;
    border-color: #6c757d;
    color: #fff;
}

#review-form .button .btn-secondary:hover {
    background: #5a6268;
    border-color: #545b62;
}

/* Load More Button */
#load-more-container {
    margin-top: 30px;
}

#load-more-reviews {
    padding: 12px 40px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

#load-more-reviews:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Empty State */
#reviews-list .text-center i.lni-comment {
    display: block;
    margin: 0 auto 15px;
}

/* Spinner */
.spinner-border {
    width: 40px;
    height: 40px;
}

/* Responsive */
@media (max-width: 991px) {
    .single-review {
        gap: 15px;
    }
    
    .single-review img {
        width: 50px;
        height: 50px;
    }
    
    #review-form-section {
        padding: 25px 20px;
    }
}

@media (max-width: 767px) {
    .single-review {
        flex-direction: column;
        gap: 15px;
    }
    
    .single-review img {
        margin: 0 auto;
    }
    
    /* .single-review .review-info h4 {
        justify-content: center;
        text-align: center;
    }
    
    .single-review .review-info .stars {
        justify-content: center;
    } */
    
    .rating-bars li {
        font-size: 12px;
    }
    
    .rating-bars .rating-label {
        min-width: 50px;
    }
    
    .stars-input {
        font-size: 28px;
        justify-content: center;
    }
    
    #review-form .button {
        flex-direction: column;
    }
    
    #review-form .button .btn {
        width: 100%;
    }
    
    #review-form-section {
        padding: 20px 15px;
    }
    
    .reviews-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .star-filter {
        width: 100%;
        justify-content: space-between;
    }
    
    .star-filter .form-select {
        flex: 1;
        min-width: auto;
    }
}

@media (max-width: 575px) {
    .reviews .title {
        font-size: 20px;
    }
    
    .single-review .review-info h4 {
        font-size: 15px;
    }
    
    .rating-stars-display {
        font-size: 20px;
    }
    
    #review-form-section h4 {
        font-size: 18px;
    }
}

