/* Review Form */
.review-form-container {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

/* Star Rating Input */
.star-rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 0.25rem;
}

.star-rating-input input {
    display: none;
}

.star-rating-input label {
    font-size: 2rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
}

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

/* Reviews Container */
.reviews-container {
    margin-top: 3rem;
}

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

.overall-rating {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.rating-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #2C5F2D;
}

/* Review Cards */
.review-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: box-shadow 0.3s;
}

.review-card:hover {
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

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

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.review-meta {
    text-align: right;
}

.stars {
    display: inline-flex;
    gap: 0.125rem;
}

.star {
    font-size: 1.25rem;
    color: #ddd;
}

.star.filled {
    color: #ffc107;
}

.star.half::after {
    content: '★';
    position: absolute;
    color: #ffc107;
    width: 50%;
    overflow: hidden;
}

.review-body {
    margin: 1rem 0;
    line-height: 1.6;
}

.modifications-badge {
    margin: 1rem 0;
    padding: 0.5rem;
    background: #e7f3ff;
    border-left: 3px solid #0d6efd;
}

.review-image {
    margin: 1rem 0;
}

.review-image img {
    max-width: 100%;
    border-radius: 8px;
    max-height: 400px;
    object-fit: cover;
}

.review-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

/* Subtle button styling for review actions */
.review-actions .btn {
    font-size: 0.8125rem;
    padding: 0.25rem 0.75rem;
    border: none;
    background: transparent;
    color: #6c757d;
    transition: color 0.2s, background-color 0.2s;
}

.review-actions .btn:hover {
    background: #f8f9fa;
    color: #495057;
}

.review-actions .btn-outline-secondary {
    border: none;
}

.review-actions .btn-outline-danger {
    border: none;
}

.review-actions .btn-outline-danger:hover {
    background: #fff5f5;
    color: #dc3545;
}

/* Rating Widget (Compact) */
.rating-widget {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

.rating-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2C5F2D;
}

.stars-display {
    display: flex;
    gap: 0.125rem;
}

.review-count-small {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Responsive */
@media (max-width: 768px) {
    .reviews-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .overall-rating {
        margin-top: 1rem;
    }

    .review-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .review-meta {
        text-align: left;
        margin-top: 0.5rem;
    }
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.review-card {
    animation: slideIn 0.3s ease-out;
}

/* HTMX Loading States */
.htmx-request .htmx-indicator {
    display: inline-block;
}

.htmx-indicator {
    display: none;
}

/* Alert Styling */
.alert {
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}
