.modal-review .modal__window.modal-review__window {
    width: min(956px, calc(100vw - 32px));
    max-width: 956px;
    border-radius: 32px;
    padding: 0;
    overflow: visible;
    transition: max-width 0.2s ease, width 0.2s ease;
}

.modal-review.is-success .modal__window.modal-review__window {
    width: min(460px, calc(100vw - 32px));
    max-width: 460px;
}

.modal-review.is-success .modal-review__icon-close {
    display: none;
}

.modal-review .modal__content {
    padding: 48px;
    border-radius: 32px;
    overflow: hidden;
}

.modal-review.is-success .modal__content {
    padding: 48px;
}

.modal-review__layout {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 48px;
    align-items: start;
}

.modal-review__title {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.1;
    color: #262633;
}

.modal-review__lead {
    margin: 28px 0 0;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.4;
    color: #262633;
}

.modal-review__form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-review__field {
    display: block;
    width: 100%;
}

.modal-review__field input,
.modal-review__field select,
.modal-review__field textarea {
    width: 100%;
    box-sizing: border-box;
    border: 0;
    border-radius: 16px;
    background: rgba(5, 80, 130, 0.05);
    color: #262633;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.4;
    outline: none;
}

.modal-review__field input,
.modal-review__field select {
    height: 56px;
    padding: 0 16px;
}

.modal-review__field select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23898ea2' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

.modal-review__field textarea {
    min-height: 168px;
    padding: 16px;
    resize: vertical;
}

.modal-review__field input::placeholder,
.modal-review__field textarea::placeholder {
    color: #898ea2;
    font-weight: 400;
}

.modal-review__field.is-error input,
.modal-review__field.is-error select,
.modal-review__field.is-error textarea {
    box-shadow: inset 0 0 0 1.5px #e41874;
}

.modal-review__stars {
    display: flex;
    gap: 8px;
    margin: 8px 0 4px;
}

.modal-review__star {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.modal-review__star svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: #f5b942;
    stroke-width: 1.5;
}

.modal-review__star.is-active svg,
.modal-review__star.is-hover svg {
    fill: #f5b942;
}

.modal-review__consent {
    margin-top: 8px;
}

.modal-review__submit {
    margin-top: 12px;
    width: 100%;
    height: 52px;
    border-radius: 16px;
}

.modal-review__form .form__error {
    display: none;
    color: #e41874;
    font-size: 14px;
}

.modal-review__form .form__error.active {
    display: block;
}

.modal-review__success {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 48px;
    text-align: center;
    width: 100%;
}

.modal-review__success-text-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: min(364px, 100%);
}

.modal-review__success-title {
    margin: 0;
    font-size: 32px;
    font-weight: 600;
    line-height: 1.1;
    color: #262633;
    width: 100%;
}

.modal-review__success-text {
    margin: 0;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.4;
    color: #262633;
    width: 100%;
}

/* Desktop: крестик сбоку от формы (как у стандартных модалок) */
@media (min-width: 768px) {
    .modal-review .modal-review__icon-close.modal__close {
        top: 0;
        right: -60px;
        width: 48px;
        height: 48px;
        border-radius: 16px;
        backdrop-filter: blur(24px);
        background: rgba(255, 255, 255, 0.12);
        z-index: 5;
    }

    .modal-review .modal-review__icon-close.modal__close svg {
        width: 12px;
        height: 12px;
        color: #fff;
    }
}

/* Override absolute .modal__close so "Закрыть" sits under the text */
.modal-review .modal-review__success-close.modal__close {
    position: static;
    top: auto;
    right: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 250px;
    max-width: 100%;
    height: auto;
    min-height: 52px;
    margin: 0;
    padding: 14px 20px;
    border: 0;
    border-radius: 16px;
    backdrop-filter: none;
    background: #e41874;
    color: #fff;
    font-size: 17px;
    font-weight: 500;
    line-height: 24px;
    z-index: auto;
    box-shadow: none;
}

.modal-review .modal-review__success-close.modal__close:hover {
    background: #e41874;
    opacity: 0.92;
}

.modal-review .modal-review__success-close.modal__close:hover svg {
    color: inherit;
}

@media (max-width: 767px) {
    .modal-review.modal {
        justify-content: flex-end;
        align-items: stretch;
        padding: 0;
    }

    .modal-review .modal__window.modal-review__window {
        position: relative;
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        min-height: 0;
        margin: 0 !important;
        flex: 1 1 auto;
        border-radius: 24px 24px 0 0;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .modal-review.is-success .modal__window.modal-review__window {
        width: 100%;
        max-width: 100%;
        height: auto;
        flex: 0 0 auto;
        margin-top: auto !important;
    }

    .modal-review .modal__content {
        padding: 32px 20px 24px;
        border-radius: 24px 24px 0 0;
        overflow-y: auto;
        flex: 1 1 auto;
        height: auto;
        max-height: none;
        min-height: 0;
        -webkit-overflow-scrolling: touch;
    }

    .modal-review.is-success .modal__content {
        padding: 32px 20px 24px;
    }

    .modal-review__layout {
        display: flex;
        flex-direction: column;
        grid-template-columns: none;
        gap: 32px;
    }

    .modal-review__info {
        display: flex;
        flex-direction: column;
        gap: 16px;
        padding-right: 44px;
    }

    .modal-review__title {
        font-size: 32px;
        line-height: 1.1;
        padding-right: 0;
    }

    .modal-review__lead {
        margin: 0;
        font-size: 17px;
        font-weight: 400;
        line-height: 1.4;
    }

    .modal-review__form-wrap {
        width: 100%;
    }

    .modal-review__form {
        gap: 12px;
    }

    .modal-review__stars {
        margin: 0;
        height: 40px;
    }

    .modal-review__consent {
        margin-top: 0;
    }

    .modal-review__consent .checkbox__label {
        font-size: 14px;
        line-height: 1.4;
    }

    .modal-review__submit {
        margin-top: 12px;
        height: auto;
        min-height: 52px;
        padding: 14px 20px;
        border-radius: 16px;
        font-size: 17px;
        font-weight: 500;
        line-height: 24px;
    }

    .modal-review__success {
        gap: 32px;
    }

    .modal-review__success-title {
        font-size: 28px;
    }

    .modal-review .modal-review__success-close.modal__close {
        width: 100%;
    }

    /* Close button ON the white form (mobile) */
    .modal-review .modal-review__icon-close.modal__close {
        position: absolute;
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
        margin: 0;
        border: 0;
        border-radius: 99px;
        backdrop-filter: none;
        background: rgba(38, 38, 51, 0.06);
        z-index: 5;
    }

    .modal-review .modal-review__icon-close.modal__close svg {
        width: 12px;
        height: 12px;
        color: #262633;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .modal-review .modal__content {
        padding: 28px 20px;
    }

    .modal-review.is-success .modal__content {
        padding: 32px 20px;
    }

    .modal-review__layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .modal-review__title {
        font-size: 24px;
    }

    .modal-review__success-title {
        font-size: 28px;
    }

    .modal-review__success {
        gap: 32px;
    }
}
