/**
 * Отзывы: карусель pmReviewsCarousel вне .pmMissionProtoPage (WoT/Dota/WoW legacy).
 * Секция визуально как pmPageBlock в pm-mission-prototype-lk.css.
 */

/* Обёртка в catalog_boost/section.php: без legacy bg_3 и «рваного» ::before (main.css) */
.pageCatalogService__section_3.pageCatalogService__section_3--reviewsPm {
    background: none;
    background-color: transparent;
    background-image: none;
    padding: 24px 24px 22px;
}

.pageCatalogService__section_3.pageCatalogService__section_3--reviewsPm::before {
    display: none;
    content: none;
}

@media screen and (max-width: 768px) {
    .pageCatalogService__section_3.pageCatalogService__section_3--reviewsPm {
        padding: 24px 24px 22px;
    }
}

.bhPmReviewsHost.pmPageBlock {
    margin-top: 28px;
    margin-bottom: 8px;
    padding: 24px 24px 22px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(180deg, #152238 0%, #0f1828 100%);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
    box-sizing: border-box;
}

.bhPmReviewsHost .pmPageBlock__lead {
    margin: 0 auto 22px;
    max-width: 48rem;
    padding: 0 8px;
    font-size: clamp(1.55rem, 2.8vw, 2.05rem);
    font-weight: 700;
    line-height: 1.28;
    letter-spacing: -0.02em;
    text-align: center;
    text-wrap: balance;
    color: rgba(255, 255, 255, 0.88);
}

.bhPmReviewsHost__head {
    margin: 0 auto 22px;
    max-width: 48rem;
    padding: 0 8px;
    text-align: center;
}

.bhPmReviewsHost__head .pmPageBlock__title {
    margin: 0;
    font-size: clamp(1.55rem, 2.8vw, 2.05rem);
    font-weight: 800;
    line-height: 1.28;
    letter-spacing: -0.02em;
    text-wrap: balance;
    color: rgba(255, 255, 255, 0.96);
}

.bhPmReviewsHost__head .pmPageBlock__lead {
    margin: 8px auto 0;
    font-size: 1.3rem;
    font-weight: 400;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.55);
}

.bhPmReviewsHost .pmReviewsCarousel {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.bhPmReviewsHost .pmReviewsCarousel__viewport {
    display: flex;
    align-items: flex-start;
    gap: 0;
    width: 100%;
    overflow-x: auto;
    /* только горизонтальный скролл: hidden по вертикали обрезал нижнюю границу карточек */
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.22);
    scrollbar-width: none;
    -ms-overflow-style: none;
    outline: none;
}

.bhPmReviewsHost .pmReviewsCarousel__viewport::-webkit-scrollbar {
    display: none;
}

.bhPmReviewsHost .pmReviewsCarousel__viewport:focus-visible {
    box-shadow: 0 0 0 2px rgba(254, 153, 0, 0.45);
}

.bhPmReviewsHost .pmReviewsCarousel__page {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    flex: 0 0 100%;
    width: 100%;
    min-width: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    padding: 12px 12px 14px;
    box-sizing: border-box;
    align-items: start;
    align-content: start;
}

.bhPmReviewsHost .pmReviewsCarousel__card {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
    min-height: 0;
    align-self: start;
    height: auto;
    padding: 12px 12px 16px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    box-sizing: border-box;
}

/* Шапка карточки: две колонки как на /reviews/ — слева автор+дата, справа звёзды+игра */
.bhPmReviewsHost .review__header,
.bhPmReviewsHost .pmReviewsCarousel__head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 12px;
    align-items: start;
    min-width: 0;
    /* Сброс legacy main.css / reviews-shared (на live в united bundle) */
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    flex-flow: unset;
    justify-content: unset;
}

.bhPmReviewsHost .review__info {
    min-width: 0;
    max-width: none;
    width: auto;
    padding: 0;
    margin: 0;
    flex: unset;
    box-sizing: border-box;
}

.bhPmReviewsHost .review__author {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.95);
}

.bhPmReviewsHost .review__date {
    display: inline-block;
    margin-top: 4px;
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.25;
    color: rgba(255, 255, 255, 0.45);
}

.bhPmReviewsHost .review__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
}

.bhPmReviewsHost .review__meta .pmReviewsCarousel__rating {
    flex: none;
    margin: 0;
}

.bhPmReviewsHost .review__metaGame {
    flex: 0 0 auto;
    max-width: min(100%, 200px);
}

.bhPmReviewsHost .review__metaGame .review__gameChip {
    max-width: 100%;
    min-width: 0;
}

.bhPmReviewsHost .pmReviewsCarousel__rating {
    display: flex;
    flex-wrap: nowrap;
    gap: 1px;
    margin: 0;
    font-size: 1.2rem;
    line-height: 1;
    letter-spacing: -0.12em;
}

.bhPmReviewsHost .pmReviewsCarousel__star {
    color: rgba(255, 255, 255, 0.2);
}

.bhPmReviewsHost .pmReviewsCarousel__star.is-active {
    color: #fe9900;
    text-shadow: 0 0 10px rgba(254, 153, 0, 0.35);
}

/* Game chip: same atoms as /reviews/ (review__gameChip + imgGame) */
.bhPmReviewsHost .review__gameChip,
.bhPmReviewsHost .review__gameChip:visited {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.15rem;
    font-weight: 600;
    text-decoration: none;
    box-sizing: border-box;
}

.bhPmReviewsHost .review__gameChip:hover,
.bhPmReviewsHost .review__gameChip:focus {
    color: #fff;
    border-color: rgba(254, 153, 0, 0.24);
    background: rgba(254, 153, 0, 0.08);
}

.bhPmReviewsHost .review__gameChip:focus-visible {
    outline: 2px solid rgba(127, 222, 252, 0.95);
    outline-offset: 2px;
}

.bhPmReviewsHost .review__gameChip .imgGame {
    position: static;
    display: block;
    flex: 0 0 auto;
    float: none;
    width: 16px;
    height: 16px;
    margin: 0;
    border-radius: 50%;
    object-fit: cover;
}

.bhPmReviewsHost .review__gameChip span {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.bhPmReviewsHost .pmReviewsCarousel__text {
    margin: 10px 0 0;
    font-size: 1.2rem;
    line-height: 1.42;
    color: rgba(255, 255, 255, 0.7);
    white-space: pre-line;
}

.bhPmReviewsHost .pmReviewsCarousel__toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.bhPmReviewsHost .pmReviewsCarousel__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.bhPmReviewsHost .pmReviewsCarousel__arrow:hover {
    border-color: rgba(254, 153, 0, 0.45);
    background: rgba(254, 153, 0, 0.12);
    color: #fff;
}

.bhPmReviewsHost .pmReviewsCarousel__arrow:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(254, 153, 0, 0.55);
}

.bhPmReviewsHost .pmReviewsCarousel__arrowIcon {
    display: block;
    width: 10px;
    height: 10px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
}

.bhPmReviewsHost .pmReviewsCarousel__arrow--prev .pmReviewsCarousel__arrowIcon {
    margin-left: 3px;
    transform: rotate(45deg);
}

.bhPmReviewsHost .pmReviewsCarousel__arrow--next .pmReviewsCarousel__arrowIcon {
    margin-right: 3px;
    transform: rotate(-135deg);
}

.bhPmReviewsHost .pmReviewsCarousel__dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.bhPmReviewsHost .pmReviewsCarousel__dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease;
}

.bhPmReviewsHost .pmReviewsCarousel__dot:hover {
    background: rgba(255, 255, 255, 0.4);
}

.bhPmReviewsHost .pmReviewsCarousel__dot:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(254, 153, 0, 0.55);
}

.bhPmReviewsHost .pmReviewsCarousel__dot.is-active {
    background: #fe9900;
    transform: scale(1.25);
}

.bhPmReviewsHost .pmReviewsCarousel__footer {
    display: flex;
    justify-content: center;
    margin-top: 18px;
    padding: 0 4px;
}

/*
 * Кнопка «Show all»: те же классы, что у премиальной CTA в каталоге
 * (.btnToCart.bhPremiumCartBtn + bh-premium-cart-btn.css), без иконки корзины.
 * У <a> по умолчанию display: inline — min-height и flex-внутренность не центрируют; задаём flex на ссылке.
 */
.bhPmReviewsHost .pmReviewsCarousel__footer a.pmReviewsCarousel__allLink.btnToCart.bhPremiumCartBtn,
.bhPmReviewsHost .pmReviewsCarousel__footer a.pmReviewsCarousel__allLink.btnToCart.bhPremiumCartBtn:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    text-decoration: none;
    box-sizing: border-box;
}

.bhPmReviewsHost .pmReviewsCarousel__footer a.pmReviewsCarousel__allLink.btnToCart.bhPremiumCartBtn .bhPremiumCartBtn-inner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: inherit;
}

.bhPmReviewsHost .pmReviewsCarousel__footer a.pmReviewsCarousel__allLink.btnToCart.bhPremiumCartBtn .bhPremiumCartBtn-label {
    text-align: center;
}

.bhPmReviewsHost .pmReviewsCarousel__footer a.pmReviewsCarousel__allLink.btnToCart.bhPremiumCartBtn:hover,
.bhPmReviewsHost .pmReviewsCarousel__footer a.pmReviewsCarousel__allLink.btnToCart.bhPremiumCartBtn:focus-visible {
    text-decoration: none;
}

@media (max-width: 1024px) {
    .bhPmReviewsHost .pmReviewsCarousel__page {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .bhPmReviewsHost .pmReviewsCarousel__page {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .bhPmReviewsHost.pmPageBlock {
        padding: 18px 16px 16px;
    }

    .bhPmReviewsHost .pmReviewsCarousel__page {
        grid-template-columns: 1fr;
    }

    .bhPmReviewsHost .review__header,
    .bhPmReviewsHost .pmReviewsCarousel__head {
        grid-template-columns: 1fr;
    }

    .bhPmReviewsHost .review__meta {
        align-items: flex-start;
    }
}

/* Home: горизонтальная лента (как каталог по 5 кол., ширина задаётся JS — см. catalog-pm-reviews-carousel.js) */
.bhPmReviewsHost--home .pmReviewsCarousel__viewport {
    display: block;
    overflow-x: hidden;
    /* snap ломает пошаговый цикл и бесшовный сброс из клонов */
    scroll-snap-type: none;
}

.bhPmReviewsHost--home .pmReviewsCarousel__page {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: var(--bh-home-review-col, minmax(0, 1fr));
    grid-template-columns: unset;
    width: max-content;
    min-width: 100%;
    flex: 0 0 auto;
    gap: var(--bh-home-review-gap, 10px);
    padding: 12px 12px 14px;
    box-sizing: border-box;
    scroll-snap-align: none;
    scroll-snap-stop: normal;
}

.bhPmReviewsHost--home .pmReviewsCarousel__card {
    width: var(--bh-home-review-col, auto);
    max-width: var(--bh-home-review-col, none);
    min-width: 0;
}
