.review-stars {
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.review-form-card,
.page-card.review-form-card {
    /* inherits .page-card from app-functional.css */
}

.review-form-card .card-body,
.page-card .card-body {
    padding: 2rem;
}

@media (min-width: 992px) {
    .review-form-card .card-body,
    .page-card .card-body {
        padding: 2.5rem 3rem;
    }
}

.review-form .form-control,
.review-form .form-select,
.page-form.review-form .form-control,
.page-form.review-form .form-select {
    border-radius: 0.65rem;
    border-color: #dbe1ea;
    padding: 0.75rem 1rem;
}

.review-form .form-control:focus,
.page-form.review-form .form-control:focus {
    border-color: rgba(var(--bs-primary-rgb), 0.55);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.12);
}

.review-form .form-label,
.page-form.review-form .form-label {
    font-weight: 600;
    color: #334155;
}

.review-prefill {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
    padding: 1rem 1.25rem;
}

.review-prefill-row {
    display: grid;
    grid-template-columns: minmax(7rem, 9rem) 1fr;
    gap: 0.75rem;
    padding: 0.35rem 0;
}

.review-prefill-row dt {
    margin: 0;
    color: #64748b;
    font-size: 0.875rem;
}

.review-prefill-row dd {
    margin: 0;
    font-weight: 600;
    color: #0f172a;
}

/* Star rating widget */
.star-rating-widget {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.star-rating-stars {
    display: inline-flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0;
}

.star-rating-stars input.star-rating-radio {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.star-rating-stars label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    margin: 0;
    cursor: pointer;
    border-radius: 999px;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.star-rating-stars label:hover {
    transform: scale(1.06);
    background: rgba(255, 193, 7, 0.12);
}

.star-rating-icon {
    position: relative;
    width: 2rem;
    height: 2rem;
    display: block;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23cbd5e1'%3E%3Cpath d='M12 2.5l2.76 5.59 6.17.9-4.47 4.35 1.06 6.15L12 16.9l-5.52 2.9 1.06-6.15-4.47-4.35 6.17-.9L12 2.5z'/%3E%3C/svg%3E");
    transition: transform 0.15s ease, filter 0.15s ease;
}

.star-rating-stars label:hover .star-rating-icon,
.star-rating-stars label:hover ~ label .star-rating-icon,
.star-rating-stars input:checked ~ label .star-rating-icon,
.star-rating-stars input:focus-visible + label .star-rating-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23f59e0b'%3E%3Cpath d='M12 2.5l2.76 5.59 6.17.9-4.47 4.35 1.06 6.15L12 16.9l-5.52 2.9 1.06-6.15-4.47-4.35 6.17-.9L12 2.5z'/%3E%3C/svg%3E");
    filter: drop-shadow(0 2px 4px rgba(245, 158, 11, 0.25));
}

.star-rating-stars input:focus-visible + label {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

.star-rating-hint {
    min-height: 1.25rem;
    font-size: 0.95rem;
    font-weight: 500;
}

.star-rating-hint.is-active {
    color: #b45309 !important;
}

.review-card .card-body {
    min-height: 100%;
}

.review-summary-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}
