.sp-lk-state-card--reviews {
    padding: 14px;
    border-radius: 16px;
    overflow: hidden;
    container-type: inline-size;
}

.sp-lk-state-card--reviews .sp-lk-state-card__title {
    margin-bottom: 20px;
    color: #1e1e1e;
    font-size: 24px;
    line-height: 34px;
    font-weight: 700;
}

.sp-lk-reviews-cta__slider {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 2px 0;
    margin: 0 -2px 20px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
    user-select: none;
}

.sp-lk-reviews-cta__slider::-webkit-scrollbar {
    display: none;
}

.sp-lk-reviews-cta__slider.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
    scroll-behavior: auto;
}

.sp-lk-reviews-cta__slide {
    flex: 0 0 134px;
    width: 134px;
    scroll-snap-align: start;
}

.sp-lk-reviews-cta__product {
    display: grid;
    gap: 12px;
}

.sp-lk-reviews-cta__product-media {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 124px;
}

.sp-lk-reviews-cta__product-image {
    display: block;
    max-width: 100%;
    max-height: 124px;
    width: auto;
    height: auto;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.sp-lk-reviews-cta__product-name {
    color: #1e1e1e;
    font-size: 16px;
    line-height: 22px;
    text-align: center;
    font-weight: 400;
    word-break: break-word;
}

.sp-lk-reviews-cta__text {
    color: #6B6B6B;
    font-size: 16px;
    line-height: 22px;
}

.sp-lk-state-card--reviews .sp-lk-state-card__cta {
    margin-top: 20px;
    width: 100%;
    min-height: 48px;
    padding: 0 20px;
    font-size: 16px;
    line-height: 22px;
    font-weight: 600;
}

@container (min-width: 671px) {
    .sp-lk-state-card--reviews {
        display: grid;
        grid-template-columns: minmax(0, 465px) minmax(0, 1fr);
        grid-template-areas:
            "title slider"
            "text slider"
            "cta slider";
        column-gap: 24px;
        row-gap: 0;
        align-items: start;
    }

    .sp-lk-state-card--reviews .sp-lk-state-card__title {
        grid-area: title;
        max-width: 465px;
        margin-bottom: 16px;
    }

    .sp-lk-reviews-cta__slider {
        grid-area: slider;
        align-self: stretch;
        align-self: start;
        min-width: 0;
        margin: 0 -2px 0 0;
        padding-left: 0;
    }

    .sp-lk-state-card--reviews .sp-lk-state-card__text {
        grid-area: text;
        max-width: 465px;
    }

    .sp-lk-state-card--reviews .sp-lk-state-card__cta {
        grid-area: cta;
        width: auto;
        min-width: 188px;
        margin-top: 20px;
        justify-self: start;
    }
}

@media (min-width: 768px) {
    .sp-lk-state-card--reviews {
        display: grid;
        grid-template-columns: minmax(0, 465px) minmax(0, 1fr);
        grid-template-areas:
            "title slider"
            "text slider"
            "cta slider";
        column-gap: 24px;
        row-gap: 0;
        align-items: start;
    }

    .sp-lk-state-card--reviews .sp-lk-state-card__title {
        grid-area: title;
        max-width: 465px;
        margin-bottom: 16px;
    }

    .sp-lk-state-card--reviews .sp-lk-state-card__text {
        grid-area: text;
        max-width: 465px;
    }

    .sp-lk-reviews-cta__slider {
        grid-area: slider;
        align-self: start;
        min-width: 0;
        margin: 0 -2px 0 0;
        padding-left: 0;
    }

    .sp-lk-state-card--reviews .sp-lk-state-card__cta {
        grid-area: cta;
        width: auto;
        min-width: 188px;
        margin-top: 20px;
        justify-self: start;
    }
}

.sp-lk-reviews-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.sp-lk-reviews-modal.is-open {
    display: flex;
}

.sp-lk-reviews-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(19, 20, 25, 0.54);
}

.sp-lk-reviews-modal__dialog {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 600px;
    max-width: calc(100vw - 32px);
    height: 800px;
    max-height: calc(90vh - 140px);
    margin: 0;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 18px 70px rgba(15, 20, 36, .2);
}

.sp-lk-reviews-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 52px;
    padding: 0 16px 0 32px;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
    flex: 0 0 auto;
}

.sp-lk-reviews-modal__title {
    margin: 0;
    font-size: 20px;
    line-height: 28px;
    font-weight: 700;
    color: #1e1e1e;
}

.sp-lk-reviews-modal__close {
    width: 24px;
    height: 24px;
    border: 0;
    background: transparent center / 24px 24px no-repeat url("vector/close_times.svg");
    background-color: transparent !important;
    cursor: pointer;
    flex: 0 0 24px;
    padding: 0 !important;
}

.sp-lk-reviews-form {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    flex-direction: column;
    padding: 0;
}

.sp-lk-reviews-form.is-submitting {
    opacity: 0.75;
}

.sp-lk-reviews-form__items {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    flex-direction: column;
    gap: 0;
    padding: 16px 32px;
    overflow: auto;
}

.sp-lk-review-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 0 24px;
    border: 0;
    border-bottom: 1px solid #f0f0f0;
    border-radius: 0;
}

.sp-lk-review-item + .sp-lk-review-item {
    padding-top: 20px;
}

.sp-lk-review-item.has-error {
    border-bottom-color: var(--e-global-color-primary, #f70780);
}

.sp-lk-review-item.has-text-error .sp-lk-review-item__textarea {
    border-color: #ff0a2b;
}

.sp-lk-review-item__top {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.sp-lk-review-item__image {
    width: 80px;
    height: 80px;
    flex: 0 0 80px;
    object-fit: cover;
    border-radius: 0;
    background: #f4f5f8;
}

.sp-lk-review-item__meta {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    flex-direction: column;
    gap: 8px;
}

.sp-lk-review-item__name {
    font-size: 16px;
    line-height: 22px;
    font-weight: 500;
    color: #1e1e1e;
}

.sp-lk-review-stars {
    display: inline-flex;
    align-items: center;
    gap: 0;
    flex-direction: row-reverse;
    justify-content: flex-end;
    width: max-content;
}

.sp-lk-review-stars__star {
    -webkit-appearance: none !important;
    appearance: none !important;
    display: inline-block;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border: 0;
    margin: 0;
    padding: 0 !important;
    min-width: 0;
    min-height: 0;
    background: center / 20px 19px no-repeat url("vector/grey_star.svg");
    background-color: transparent !important;
    box-shadow: none;
    outline: 0;
    text-indent: -9999px;
    overflow: hidden;
    vertical-align: middle;
    cursor: pointer;
}

.sp-lk-review-stars__star:hover,
.sp-lk-review-stars__star:hover ~ .sp-lk-review-stars__star,
.sp-lk-review-stars__star:focus-visible,
.sp-lk-review-stars__star:focus-visible ~ .sp-lk-review-stars__star,
.sp-lk-review-stars__star.is-selected {
    background-image: url("vector/gold_star.svg");
}

.sp-lk-review-item__textarea {
    width: 100%;
    height: 128px;
    border: 1px solid #d7d8df;
    border-radius: 8px;
    padding: 10px 12px;
    resize: none;
    min-height: 128px;
    font-size: 16px;
    line-height: 22px;
    color: #1e1e1e;
    box-shadow: none;
}

.sp-lk-review-item__textarea::placeholder {
    color: #6b6b6b;
}

.sp-lk-review-item__upload {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    color: #3666cb;
    cursor: pointer;
    font-size: 16px;
    line-height: 22px;
    font-weight: 500;
}

.sp-lk-review-item__upload input {
    display: none;
}

.sp-lk-review-item__upload-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    background: center / 24px 24px no-repeat url("vector/attach_clip.svg");
}

.sp-lk-review-item__media-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sp-lk-review-item__media-preview[hidden] {
    display: none;
}

.sp-lk-review-item__media-thumb {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: #f4f5f8;
}

.sp-lk-review-item__media-thumb img,
.sp-lk-review-item__media-thumb video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sp-lk-review-item__media-delete {
    position: absolute;
    top: 0;
    right: 0;
    width: 22px;
    height: 22px;
    border: 0;
    margin: 3px 3px 0px 0px;
    padding: 0 !important;
    border-radius: 999px !important;
    background: transparent center / 22px 22px no-repeat url("vector/del.svg");
    background-color: transparent !important;
    cursor: pointer;
}

.sp-lk-review-item__rating-error,
.sp-lk-review-item__text-error {
    margin: 0;
    color: #ff0a2b;
    font-size: 14px;
    line-height: 20px;
}

.sp-lk-review-item__rating-error {
    max-width: 220px;
}

.sp-lk-review-item__text-error {
    margin-top: -4px;
}

.sp-lk-reviews-form__error {
    margin: 12px 32px 0;
    color: #ff0a2b;
    font-size: 14px;
    line-height: 20px;
}

.sp-lk-reviews-form__actions {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    flex: 0 0 auto;
    padding: 16px 32px;
    border-top: 1px solid #dcdcdc;
    background: #fff;
}

.sp-lk-reviews-form__actions .sp-lk-state-card__cta {
    margin-top: 0px;
    height: 48px;
    flex: 1 1 auto;
    justify-content: center;
    border-radius: 8px;
    padding: 0 16px;
    font-size: 16px;
    line-height: 22px;
    font-weight: 600;
}

.sp-lk-reviews-form__cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    border: 1px solid #dcdcdc;
    border-radius: 8px !important;
    padding: 0 16px !important;
    background: #fff !important;
    color: #1e1e1e !important;
    cursor: pointer;
    font-size: 16px !important;
    line-height: 22px;
    font-weight: 600 !important;
}

.sp-lk-reviews-form__success {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    padding: 32px;
    text-align: center;
}

.sp-lk-reviews-form__success[hidden] {
    display: none;
}

.sp-lk-reviews-form__success-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    background: center / 40px 40px no-repeat url("vector/order_completed.svg");
}

.sp-lk-reviews-form__success-text {
    margin: 0;
    color: #1e1e1e;
    font-size: 16px;
    line-height: 25px;
}

.sp-lk-reviews-form__success .sp-lk-reviews-form__cancel {
    min-width: 111px;
}

body.sp-lk-modal-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .sp-lk-state-card--reviews {
        padding: 20px;
        border-radius: 20px;
    }

    .sp-lk-state-card--reviews .sp-lk-state-card__title {
        margin-bottom: 16px;
    }

    .sp-lk-reviews-cta__slider {
        gap: 12px;
        margin-bottom: 16px;
    }

    .sp-lk-reviews-cta__slide {
        flex-basis: 138px;
        width: 138px;
    }

    .sp-lk-reviews-cta__product-media {
        height: 120px;
    }

    .sp-lk-reviews-cta__product-image {
        max-height: 120px;
    }

    .sp-lk-state-card--reviews .sp-lk-state-card__cta {
        margin-top: 16px;
    }

    .sp-lk-reviews-modal__dialog {
        width: 100%;
        max-width: none;
        height: 100vh;
        max-height: none;
        border-radius: 0;
    }

    .sp-lk-reviews-modal {
        align-items: stretch;
        justify-content: stretch;
        padding: 0;
    }

    .sp-lk-reviews-modal__header {
        min-height: 40px;
        padding: 0 16px 0 20px;
    }

    .sp-lk-reviews-modal__title {
        font-size: 18px;
        line-height: 25px;
    }

    .sp-lk-reviews-form__items {
        padding: 16px;
    }

    .sp-lk-review-item__top {
        gap: 12px;
    }

    .sp-lk-review-item__image {
        width: 80px;
        height: 80px;
        flex-basis: 80px;
    }

    .sp-lk-reviews-form__actions {
        padding: 8px 16px;
    }

    .sp-lk-reviews-form__error {
        margin: 8px 16px 0;
    }
}
