/* Фото к отзывам: выбор при отправке, миниатюры в отзыве, просмотр на весь экран. */

.review-photo-field {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin: 4px 0 16px;
}

.review-photo-field__input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.review-photo-field__button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 16px;
    border: 1px dashed #c8c8c8;
    border-radius: 12px;
    background: #fff;
    color: #111;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.review-photo-field__button:hover,
.review-photo-field__button:focus-within {
    border-color: #111;
}

.review-photo-field__hint {
    font-size: 13px;
    color: #7a7a7a;
}

.review-photo-field__error {
    flex-basis: 100%;
    margin: 0;
    font-size: 13px;
    color: #b3261e;
}

.review-photo-field__previews {
    display: flex;
    flex-basis: 100%;
    flex-wrap: wrap;
    gap: 8px;
}

.review-photo-field__previews:empty {
    display: none;
}

.review-photo-preview {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    background: #f2f2f2;
}

.review-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.review-photo-preview__remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 14px;
    line-height: 22px;
    cursor: pointer;
}

/* Миниатюры в карточке отзыва: квадраты, фото целиком видно в просмотре. */
.review-photos {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 4px;
}

.review-photos__item {
    display: block;
    width: 84px;
    height: 84px;
    border-radius: 12px;
    overflow: hidden;
    background: #f2f2f2;
    cursor: zoom-in;
}

.review-photos__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.review-photos__item:hover img {
    transform: scale(1.04);
}

/* Просмотр на весь экран. */
.review-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 16px;
    background: rgba(0, 0, 0, 0.92);
}

.review-lightbox[hidden] {
    display: none;
}

.review-lightbox__image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    user-select: none;
}

.review-lightbox__button {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.review-lightbox__button:hover {
    background: rgba(255, 255, 255, 0.24);
}

.review-lightbox__close {
    top: max(12px, env(safe-area-inset-top));
    right: 12px;
}

.review-lightbox__prev {
    left: 12px;
}

.review-lightbox__next {
    right: 12px;
}

.review-lightbox__counter {
    position: absolute;
    bottom: max(16px, env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

body.review-lightbox-open {
    overflow: hidden;
}

/* Отзыв сразу о нескольких товарах. */
.review-products {
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: #666;
}

.review-products a {
    color: inherit;
    text-decoration: underline;
}

.reviews-picked {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.reviews-picked:empty {
    display: none;
}

.reviews-picked__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 6px 6px 6px 12px;
    border-radius: 999px;
    background: #111;
    color: #fff;
    font-size: 13px;
    line-height: 1.3;
}

.reviews-picked__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reviews-picked__remove {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 14px;
    line-height: 22px;
    cursor: pointer;
}

.reviews-picked-hint {
    margin: 8px 0 0;
    font-size: 13px;
    color: #7a7a7a;
}
