/* Rating Container */
.rating-container {
    background: #ffffff;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
    font-family: 'Tahoma', sans-serif;
    direction: rtl;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Rating Display */
.rating-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f5f5f5;
}

.rating-stars-display {
    display: flex;
    gap: 4px;
}

.star-display {
    font-size: 28px;
    color: #e0e0e0;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.star-display.filled {
    color: #FFB800;
    filter: drop-shadow(0 0 3px rgba(255, 184, 0, 0.3));
}

.rating-info {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 15px;
    color: #666;
}

.rating-average {
    font-weight: bold;
    font-size: 22px;
    color: #333;
}

.rating-separator {
    color: #bbb;
    margin: 0 3px;
}

/* Rating Form */
.rating-form {
    text-align: center;
}

.rating-label {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #444;
}

.rating-stars {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.rating-stars .star {
    font-size: 40px;
    color: #e0e0e0;
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.rating-stars .star:hover,
.rating-stars .star.hover {
    color: #FFB800;
    transform: scale(1.15);
    filter: drop-shadow(0 0 8px rgba(255, 184, 0, 0.4));
}

.rating-stars .star:active {
    transform: scale(1.05);
}

.rating-stars.disabled .star {
    cursor: not-allowed;
    opacity: 0.4;
    transform: scale(1);
}

/* Messages */
.rating-message {
    min-height: 30px;
    margin-top: 15px;
    font-size: 14px;
}

.rating-message .success {
    color: #4caf50;
    font-weight: 600;
    animation: fadeIn 0.3s ease;
}

.rating-message .error {
    color: #f44336;
    font-weight: 600;
    animation: shake 0.3s ease;
}

.rating-message .loading {
    color: #2196f3;
    font-weight: 500;
}

.rating-already-voted {
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    border-radius: 8px;
    margin-top: 15px;
    border: 1px solid #c8e6c9;
}

.rating-already-voted p {
    margin: 0;
    color: #2e7d32;
    font-weight: 600;
    font-size: 14px;
}

/* Display Only (for archives) */
.rating-display-only {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.rating-display-only .rating-stars-display {
    gap: 3px;
}

.rating-display-only .star-display {
    font-size: 18px;
}

.rating-info-compact {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #666;
}

.rating-info-compact .rating-average {
    font-weight: 700;
    font-size: 16px;
    color: #333;
}

.rating-info-compact .rating-total {
    color: #999;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Responsive */
@media (max-width: 768px) {
    .rating-container {
        padding: 20px;
    }
    
    .rating-display {
        flex-direction: column;
        gap: 12px;
    }
    
    .star-display {
        font-size: 24px;
    }
    
    .rating-stars .star {
        font-size: 36px;
        gap: 8px;
    }
    
    .rating-average {
        font-size: 20px;
    }
}
