/* Rating and Review System Styles */
.rating-section {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    margin: 2rem 0;
    width: 100%;
}

.rating-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f8f9fa;
}

.rating-stats {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.rating-big {
    text-align: center;
}

.rating-number {
    font-size: 3rem;
    font-weight: 700;
    color: #ffc107;
    line-height: 1;
}

.rating-stars-big {
    font-size: 1.5rem;
    color: #ffc107;
    margin: 0.5rem 0;
}

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

.rating-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.rating-bar-label {
    min-width: 60px;
    color: #6c757d;
}

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

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

.rating-bar-count {
    min-width: 40px;
    text-align: right;
    color: #6c757d;
    font-size: 0.8rem;
}

/* Star Rating Input - Fixed for left-to-right coloring */
.star-rating {
    display: inline-flex;
    flex-direction: row;
    gap: 0.25rem;
}

.star-rating input {
    display: none;
}

.star-rating label {
    cursor: pointer;
    font-size: 1.5rem;
    color: #e9ecef;
    transition: color 0.2s ease;
}

/* Remove ALL problematic CSS that could cause right-to-left coloring */
.star-rating label:hover ~ label {
    color: #e9ecef !important;
}

/* Make checked stars stay yellow */
.star-rating input:checked ~ label {
    color: #ffc107 !important;
}

.star-rating label:hover {
    transform: scale(1.1);
}

/* Review Form */
.review-form {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.review-form textarea {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    font-size: 1rem;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.2s ease;
}

.review-form textarea:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.review-form .btn {
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
}

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

/* Reviews List */
.reviews-list {
    margin-top: 2rem;
}

.review-item {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.review-item:hover {
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.1);
}

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

.review-author-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Profile Icon Styling */
.review-profile-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007bff, #0056b3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    border: 2px solid #e9ecef;
}

.review-profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e9ecef;
}

.review-profile-pic-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6c757d, #495057);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    border: 2px solid #e9ecef;
}

.review-author {
    font-weight: 600;
    color: #333;
}

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

.review-text {
    color: #555;
    line-height: 1.6;
    margin: 0;
}

/* Message Display */
.rating-message {
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-weight: 500;
}

.rating-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.rating-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.rating-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Login Prompt */
.login-prompt {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

.login-prompt h4 {
    color: #6c757d;
    margin-bottom: 1rem;
}

.login-prompt p {
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.login-prompt .btn {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.login-prompt .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* Loading States */
.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .rating-section {
        padding: 1.5rem;
        margin: 1.5rem 0;
    }
    
    .rating-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .rating-stats {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
    }
    
    .rating-big {
        text-align: center;
    }
    
    .rating-number {
        font-size: 2.5rem;
    }
    
    .rating-stars-big {
        font-size: 1.2rem;
    }
    
    .rating-breakdown {
        width: 100%;
    }
    
    .review-form {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .review-item {
        padding: 1rem;
    }
    
    .review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .review-author-info {
        gap: 0.5rem;
    }
    
    .review-profile-icon,
    .review-profile-pic,
    .review-profile-pic-placeholder {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
}
