/* Product Reviews Styles */

.rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 0.2rem;
}

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

.rating-input label {
    cursor: pointer;
    font-size: 1.5rem;
    color: #ddd;
    transition: color 0.2s ease;
    user-select: none;
}

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

.rating-input input[type="radio"]:checked ~ label {
    color: #ff8c00;
}

.review-item {
    border-bottom: 1px solid #eee;
    padding: 1.5rem 0;
    transition: background-color 0.2s ease;
}

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

.review-item:hover {
    background-color: #f8f9fa;
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    border-radius: 0.375rem;
}

.rating-bar {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

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

.review-stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.review-stats-card .card-body {
    padding: 2rem;
}

.average-rating-display {
    font-size: 3rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stars-display {
    font-size: 1.5rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.rating-breakdown-item {
    margin-bottom: 0.5rem;
}

.rating-breakdown-item:last-child {
    margin-bottom: 0;
}

.rating-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6c757d;
}

.rating-count {
    font-size: 0.875rem;
    font-weight: 600;
    color: #495057;
}

/* Review Modal Styles */
.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: none;
}

.modal-header .btn-close {
    filter: invert(1);
}

.form-label {
    font-weight: 600;
    color: #495057;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Review Display Styles */
.review-author {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.25rem;
}

.review-date {
    font-size: 0.875rem;
    color: #6c757d;
}

.review-rating {
    color: #ffc107;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.review-comment {
    color: #495057;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Loading States */
.reviews-loading {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Empty State */
.reviews-empty {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.reviews-empty i {
    opacity: 0.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .review-stats-card .row {
        text-align: center;
    }
    
    .review-stats-card .col-md-8 {
        margin-top: 1rem;
    }
    
    .rating-breakdown-item {
        justify-content: space-between;
    }
    
    .rating-label {
        min-width: 60px;
    }
    
    .rating-count {
        min-width: 30px;
        text-align: right;
    }
}

/* Admin Review Management Styles */
.comment-preview {
    max-height: 4rem;
    overflow: hidden;
    position: relative;
}

.comment-preview.expanded {
    max-height: none;
}

.comment-toggle {
    background: none;
    border: none;
    color: #007bff;
    text-decoration: underline;
    padding: 0;
    font-size: 0.875rem;
}

.comment-toggle:hover {
    color: #0056b3;
}

.table-hover tbody tr:hover {
    background-color: rgba(0,0,0,.02);
}

.review-status-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* Bulk Action Styles */
.bulk-actions {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
}

.bulk-actions.show {
    display: block !important;
}

/* Animation for new reviews */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.review-item.new {
    animation: slideInUp 0.3s ease-out;
}

/* Star rating hover effects */
.rating-input label:hover {
    transform: scale(1.1);
}

.rating-input input[type="radio"]:checked ~ label {
    transform: scale(1.05);
}

/* Success/Error message styles */
.alert-floating {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    min-width: 300px;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Review form validation styles */
.was-validated .form-control:invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.was-validated .form-control:valid {
    border-color: #198754;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='m2.3 6.73.94-.94 1.96 1.96 2.1-2.1.94.94L4.26 9.67z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}