/* Global Rating System Styles - Compact & Professional */
.rating-system {
    margin-top: 1.5rem;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.rating-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rating-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.rating-stars-area {
    flex-shrink: 0;
}

.stars-wrapper {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.star {
    font-size: 1.1rem;
    cursor: pointer;
    color: #cbd5e1;
    transition: all 0.15s ease;
    user-select: none;
    display: inline-block;
}

.star:hover,
.star.hover {
    color: #fbbf24;
    transform: scale(1.05);
}

.star.active {
    color: #fbbf24;
}

.rating-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.average-stars {
    color: #fbbf24;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.rating-count {
    color: var(--text-light);
    font-size: 0.75rem;
}

.rating-comment-area {
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rating-textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.8rem;
    font-family: inherit;
    resize: vertical;
    transition: all 0.2s;
}

.rating-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.rating-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

.rating-submit-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.rating-submit-btn:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
}

.rating-cancel-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-light);
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.rating-cancel-btn:hover {
    background: var(--border);
    color: var(--text);
}

.rating-message {
    font-size: 0.7rem;
    text-align: center;
    min-height: 1.5rem;
}

.rating-message.success {
    color: #10b981;
}

.rating-message.error {
    color: #ef4444;
}

.rating-message.info {
    color: var(--primary);
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .star {
        color: #475569;
    }
}

/* Mobile responsive */
@media (max-width: 640px) {
    .rating-system {
        padding: 0.6rem 0.8rem;
    }
    
    .rating-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }
    
    .star {
        font-size: 1rem;
    }
    
    .average-stars {
        font-size: 0.75rem;
    }
}