/**
 * Ratings & Review — Vue 3 booking form styles (staff step).
 *
 * Port of the relevant `bookingpress_review_front_form.css` rules onto the
 * new `bp-ui-staff-review*` class family. Every rule is scoped under the Vue 3
 * form root (`.bpa-frontend-vue3-root`) so the legacy form is unaffected.
 * Layered over the `bookingpress-form-v3-legacy-front` sheet (style dep).
 */

/* ---- Rating summary (collapsed card body + hover/expanded inner body) ---- */

.bpa-frontend-vue3-root .bp-ui-staff-review {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    font-size: 13px;
    line-height: 18px;
    color: inherit;
}

.bpa-frontend-vue3-root .bp-ui-staff-review__stars {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.bpa-frontend-vue3-root .bp-ui-staff-review__star-icon {
    display: inline-flex;
    align-items: center;
}

.bpa-frontend-vue3-root .bp-ui-staff-review__value {
    font-weight: 500;
    font-size: 14px;
}

.bpa-frontend-vue3-root .bp-ui-staff-review__count {
    font-size: 13px;
}

/* Legacy parity: the collapsed-card rating fades out together with the staff
   name when the card is hovered/focused/selected (the always-present inner
   rating takes over) — mirrors the Pro `__body--name` opacity rule. */
.bpa-frontend-vue3-root .bp-ui-staff-review--card {
    opacity: 1;
    transition: all .5s ease-in-out;
}

.bpa-frontend-vue3-root .bpa-front-sm--col:not(.--bpa-sm-any-staff-col):not(.bpa-front-sm--col-only-name) .bpa-front-sm-card:hover .bp-ui-staff-review--card,
.bpa-frontend-vue3-root .bpa-front-sm--col:not(.--bpa-sm-any-staff-col):not(.bpa-front-sm--col-only-name) .bpa-front-sm-card:focus-within .bp-ui-staff-review--card,
.bpa-frontend-vue3-root .bpa-front-sm--col:not(.--bpa-sm-any-staff-col):not(.bpa-front-sm--col-only-name) .bpa-front-sm-card.__bpa-is-active .bp-ui-staff-review--card {
    opacity: 0;
}

/* The interactive variant is a real <button>: strip the UA chrome so it reads
   like the legacy inline rating row, keep a visible focus ring. */
.bpa-frontend-vue3-root button.bp-ui-staff-review--button {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-align: left;
}

.bpa-frontend-vue3-root button.bp-ui-staff-review--button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---- Review-list overlay (legacy .bpa-front-sm-card__rating-popover) ---- */

/* The panel is positioned over its staff card. */
.bpa-frontend-vue3-root .bpa-front-sm-card {
    position: relative;
}

.bpa-frontend-vue3-root .bp-ui-staff-review-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #fff;
    z-index: 999;
    cursor: default;
    overflow: hidden;
    animation: bp-ui-staff-review-panel-in 0.25s ease-out;
}

@keyframes bp-ui-staff-review-panel-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .bpa-frontend-vue3-root .bp-ui-staff-review-panel {
        animation: none;
    }
}

.bpa-frontend-vue3-root .bp-ui-staff-review-panel:focus {
    outline: none;
}

.bpa-frontend-vue3-root .bp-ui-staff-review-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 14px 16px;
    border-bottom: 1px solid #CFD6E5;
    flex: 0 0 auto;
}

.bpa-frontend-vue3-root .bp-ui-staff-review-panel__heading {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
}

.bpa-frontend-vue3-root .bp-ui-staff-review-panel__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: none;
    border: 0;
    padding: 0;
    color: #535D71;
    cursor: pointer;
    flex: 0 0 auto;
}

.bpa-frontend-vue3-root .bp-ui-staff-review-panel__close:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
    border-radius: 4px;
}

.bpa-frontend-vue3-root .bp-ui-staff-review-panel__list {
    list-style: none;
    margin: 0;
    padding: 16px;
    overflow: auto;
    flex: 1 1 auto;
}

.bpa-frontend-vue3-root .bp-ui-staff-review-panel__item {
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid #CFD6E5;
}

.bpa-frontend-vue3-root .bp-ui-staff-review-panel__item:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.bpa-frontend-vue3-root .bp-ui-staff-review-panel__item-head {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.bpa-frontend-vue3-root .bp-ui-staff-review-panel__item-name {
    font-weight: 600;
    font-size: 14px;
}

.bpa-frontend-vue3-root .bp-ui-staff-review-panel__item-rating {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.bpa-frontend-vue3-root .bp-ui-staff-review-panel__item-title {
    font-size: 14px;
    font-weight: 500;
    margin-top: 6px;
}

.bpa-frontend-vue3-root .bp-ui-staff-review-panel__item-comment {
    margin: 4px 0 0;
    font-weight: 400;
    font-size: 13px;
    line-height: 20px;
    color: #535D71;
}

