/* Reviews & Rating Styles */

/* Star Rating Component */
.star-rating {
    display: inline-flex;
    gap: 5px;
    font-size: 1.5em;
    cursor: pointer;
}

.star-rating .star {
    color: #64748b;
    transition: color 0.2s;
    cursor: pointer;
}

.star-rating .star.filled {
    color: #fbbf24;
}

.star-rating .star:hover,
.star-rating .star.hover {
    color: #fbbf24;
}

.star-rating.readonly {
    cursor: default;
}

.star-rating.readonly .star {
    cursor: default;
}

/* Star Rating Display (Small) */
.rating-display {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9em;
}

.rating-display .stars {
    color: #fbbf24;
}

.rating-display .count {
    color: var(--text-secondary);
    font-size: 0.9em;
}

/* Review Form */
.review-form {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.review-form h3 {
    margin: 0 0 15px 0;
    color: var(--text-primary);
}

.review-form-group {
    margin-bottom: 15px;
}

.review-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.review-form textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    resize: vertical;
}

.review-form textarea:focus {
    outline: none;
    border-color: var(--success);
}

.review-form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Reviews List */
.reviews-section {
    margin: 30px 0;
}

.reviews-section h3 {
    margin: 0 0 20px 0;
    color: var(--text-primary);
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.review-item {
    background: var(--bg-secondary);
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid var(--success);
}

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

.review-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.review-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--success), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.2em;
}

.review-user-info {
    display: flex;
    flex-direction: column;
}

.review-user-name {
    font-weight: 600;
    color: var(--text-primary);
}

.review-date {
    font-size: 0.85em;
    color: var(--text-secondary);
}

.review-rating {
    display: flex;
    gap: 3px;
    font-size: 1.2em;
    color: #fbbf24;
}

.review-comment {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-top: 10px;
}

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

.review-actions button {
    padding: 5px 12px;
    font-size: 0.85em;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.review-edit-btn {
    background: var(--primary);
    color: white;
}

.review-delete-btn {
    background: var(--danger);
    color: white;
}

.review-edit-btn:hover {
    opacity: 0.8;
}

.review-delete-btn:hover {
    opacity: 0.8;
}

/* Empty State */
.reviews-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.reviews-empty-icon {
    font-size: 3em;
    margin-bottom: 10px;
}

/* Review Modal */
.review-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.review-modal-content {
    background: rgba(30, 41, 59, 0.95);
    /* Solid dark background */
    padding: 30px;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.review-modal-header {
    margin-bottom: 20px;
}

.review-modal-header h2 {
    margin: 0;
    color: var(--text-primary);
}

/* Rating Summary */
.rating-summary {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(251, 191, 36, 0.1);
    border-radius: 8px;
    margin-bottom: 20px;
}

.rating-summary-score {
    font-size: 2.5em;
    font-weight: 700;
    color: #fbbf24;
}

.rating-summary-details {
    flex: 1;
}

.rating-summary-stars {
    color: #fbbf24;
    font-size: 1.3em;
    margin-bottom: 5px;
}

.rating-summary-count {
    color: var(--text-secondary);
    font-size: 0.9em;
}

/* Responsive */
@media (max-width: 768px) {
    .review-header {
        flex-direction: column;
        gap: 10px;
    }

    .review-modal-content {
        width: 95%;
        padding: 20px;
    }

    .star-rating {
        font-size: 1.3em;
    }
}