html.review-popup-open {
    overflow: hidden;
}

.js-review-popup {
    cursor: pointer;
}

.review-popup {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    box-sizing: border-box;
}

.review-popup[hidden] {
    display: none !important;
}

.review-popup__dim {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.review-popup__wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
}

.review-popup__panel {
    display: flex;
    flex-direction: column;
    max-height: min(72vh, 640px);
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 18px 48px rgba(26, 29, 74, 0.22);
    overflow: hidden;
}

.review-popup__close {
    position: absolute;
    top: 0;
    right: -44px;
    z-index: 2;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    cursor: pointer;
}

.review-popup__close:hover {
    background: rgba(0, 0, 0, 0.55);
}

.review-popup__scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.review-popup__thumb {
    width: 100%;
    flex-shrink: 0;
    background: #eef1f6;
}

.review-popup__thumb img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center;
}

.review-popup__body {
    padding: 22px 22px 8px;
}

.review-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    min-width: 0;
}

.review-type-tag {
    flex-shrink: 0;
    padding: 3px 8px;
    border-radius: 6px;
    background: #f0f3fb;
    color: #56658a;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
}

.review-title-row .car-title,
.review-popup__title {
    margin: 0;
    min-width: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--primary, #1A1D4A);
}

.review-title-row .car-title {
    font-size: 16px;
}

.review-popup__rating {
    display: flex;
    align-items: center;
    gap: 2px;
    margin: 0 0 8px;
}

.review-popup__rating .star {
    display: inline-flex;
    width: 18px;
    height: 18px;
    color: #e5e7eb;
}

.review-popup__rating .star.is-on {
    color: #C75B4A;
}

.review-popup__rating .star svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.review-popup__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.review-popup__meta .profile {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.review-popup__meta .avatar {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background: #eef2f7;
}

.review-popup__meta .avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.review-popup__meta .profile-txt {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.review-popup__meta .name {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    color: #111;
}

.review-popup__meta .sub {
    font-size: 12px;
    line-height: 1.2;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.review-popup__meta .date {
    flex-shrink: 0;
    font-size: 12px;
    line-height: 1.2;
    color: #999;
}

.review-popup__content {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: #444;
    white-space: pre-wrap;
    word-break: break-word;
}

.review-popup__footer {
    flex-shrink: 0;
    padding: 12px 22px 20px;
    background: #fff;
    border-top: 1px solid #eee;
}

.review-popup__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 48px;
    border-radius: 999px;
    background: var(--primary, #1A1D4A);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

.review-popup__cta:hover {
    opacity: 0.92;
}

@media (max-width: 768px) {
    .review-popup {
        padding: 12px;
        align-items: flex-end;
    }

    .review-popup__panel {
        max-height: 78vh;
        border-radius: 16px;
    }

    .review-popup__close {
        top: -44px;
        right: 0;
    }

    .review-popup__body {
        padding: 18px 16px 8px;
    }

    .review-popup__footer {
        padding: 10px 16px 16px;
    }

    .review-popup__title {
        font-size: 16px;
    }

    .review-popup__content {
        font-size: 14px;
    }
}
