/* Rating System Styles */
.rating-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.rating-overview {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

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

.rating-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    line-height: 1;
}

.rating-stars {
    color: #ffc107;
    font-size: 1.2rem;
    margin: 5px 0;
}

.rating-count {
    color: var(--gray);
    font-size: 0.9rem;
}

.rating-details {
    flex: 1;
    min-width: 250px;
}

.rating-bar {
    display: flex;
    align-items: center;
    margin: 8px 0;
}

.rating-label {
    width: 120px;
    font-size: 0.9rem;
    color: var(--gray-dark);
}

.rating-bar-container {
    flex: 1;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin: 0 10px;
}

.rating-bar-fill {
    height: 100%;
    background-color: #ffc107;
    border-radius: 4px;
}

.rating-value {
    width: 30px;
    text-align: right;
    font-weight: 600;
}

/* Rating Form */
.rating-form-container {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    margin-top: 30px;
}

.rating-form-title {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.rating-aspects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.rating-aspect {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.aspect-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--gray-dark);
}

.star-rating {
    direction: rtl;
    text-align: center;
}

.star-rating input {
    display: none;
}

.star-rating label {
    color: #dee2e6;
    font-size: 1.5rem;
    padding: 0 2px;
    cursor: pointer;
    transition: color 0.2s;
}

.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
    color: #ffc107;
}

.comment-box textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    resize: vertical;
    font-family: inherit;
}

.anonymous-option {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
}

/* Reviews List */
.reviews-container {
    margin-top: 40px;
}

.review-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

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

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reviewer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.reviewer-name {
    font-weight: 600;
}

.review-date {
    color: var(--gray);
    font-size: 0.9rem;
}

.review-rating {
    color: #ffc107;
}

.review-comment {
    line-height: 1.6;
    color: var(--gray-dark);
}

.review-aspects {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.review-aspect {
    background: #f8f9fa;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
}

.aspect-name {
    color: var(--gray);
}

.aspect-score {
    font-weight: 600;
    color: var(--primary-color);
}

/* Rating Stats */
.rating-stats {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.stat-box {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-width: 120px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    display: block;
}

.stat-label {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Admin Rating Panel */
.admin-rating-panel {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
}

.pending-count {
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.9rem;
    margin-left: 5px;
}

.rating-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .rating-overview {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .rating-details {
        width: 100%;
    }
    
    .rating-aspects {
        grid-template-columns: 1fr;
    }
    
    .rating-stats {
        justify-content: center;
    }
}
/* Rating System Styles */
.staff-rating {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.rating-stars {
    color: #ffc107;
    font-size: 1.2rem;
    white-space: nowrap;
}

.rating-info {
    display: flex;
    align-items: center;
    gap: 5px;
}

.rating-value {
    font-weight: bold;
    color: #333;
}

.rating-count {
    color: #666;
    font-size: 0.9rem;
}

.rate-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
    margin-left: auto;
}

.rate-btn:hover {
    background: #0056b3;
}

/* Star Rating Input */
.star-rating {
    direction: rtl;
    display: inline-block;
    unicode-bidi: bidi-override;
}

.star-rating input {
    display: none;
}

.star-rating label {
    color: #ccc;
    font-size: 1.5rem;
    padding: 0 2px;
    cursor: pointer;
    transition: color 0.2s;
}

.star-rating.large label {
    font-size: 2rem;
}

.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
    color: #ffc107;
}

/* Rating Form */
.rating-form-container {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin: 15px 0;
}

.rating-aspects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.rating-aspect {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.aspect-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.anonymous-option {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
}

/* Half-star display */
.half-star {
    position: relative;
    display: inline-block;
    color: #ffc107;
}

.half-star:before {
    content: '★';
    position: absolute;
    left: 0;
    width: 50%;
    overflow: hidden;
}