/* Отображение отзывов --------- */
a.button,
#add_review .button {
    border-radius: 20px;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 700;
    padding: 14px 40px;
    color: #fff;
    background-color: #605566;
    display: inline-block;
}
a.button:hover,
#add_review .button:hover,
a.button:focus,
#add_review .button:focus {
    background-color: #4B4350;
    opacity: 1 !important;
}
.review-list {
    margin: 40px 0 80px;
}
.review-item {
    background-color: #fff;
    padding: 25px 20px;
    border-radius: 20px;
    box-shadow: 1px 3px 10px 5px rgb(31 31 31 / 9%);
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: 65px auto auto;
    row-gap: 15px;
    align-items: center;
}
.review-item__name,
.comment-author {
    font-size: 16px;
    font-weight: 700;
}
.review-item__comment {
    background-color: #C9CFDA;
    padding: 25px 20px;
    border-radius: 20px;
}
.rating {
    grid-column: 3/4;
    justify-self: end;
}
.review-item__text {
    grid-column: 1/4;
    font-size: 16px;
}
.review-item__comment {
    grid-column: 1/4;
}
time.review-item__date,
time.comment-date {
    grid-column: 1/3;
}
.review-item__comment {
    display: grid;
    grid-template-columns: 65px auto;
    align-items: center;
    row-gap: 15px;
}
.comment-text {
    grid-column: 1/3;
    font-size: 16px;
}
img.avatar {
    border-radius: 50%;
}

/* --------- Отображение отзывов */
/* Звёздный рейтинг для отзывов */
:root {
    --star_width: 22px;
    --star_bg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' %3E%3Cpath style='fill:%23DADADA' d='M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z'/%3E%3C/svg%3E");
    --star_bg_fill: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' %3E%3Cpath style='fill:%23CD0040' d='M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z'/%3E%3C/svg%3E");
}
.rating__group {
    position: relative;
    width: calc(var(--star_width) * 5);
    height: var(--star_width);
    background-image: var(--star_bg);
    background-size: var(--star_width) auto;
    background-repeat: repeat-x;
    background-color: transparent;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
.rating__star {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    position: absolute;
    top: 0;
    left: 0;
    height: var(--star_width);
    margin: 0;
    font-size: inherit;
    background-size: var(--star_width) auto;
    background-repeat: repeat-x;
    background-color: transparent;
    cursor: pointer;
    opacity: 1;
    border: none;
    border-radius: 0;
    transition: 0.2s;
}
.rating__star:focus {
    outline: none;
}
.rating__star:checked,
.rating__star:hover {
    background-image: var(--star_bg_fill);
    width: var(--star_width);
    height: var(--star_width);
    background-size: var(--star_width);
}
.rating__star:hover~.rating__star {
    background-image: var(--star_bg);
}
.rating__star:nth-child(1) {
    width: var(--star_width);
    z-index: 5;
}
.rating__star:nth-child(2) {
    width: calc(var(--star_width)* 2);
    z-index: 4;
}
.rating__star:nth-child(3) {
    width: calc(var(--star_width)* 3);
    z-index: 3;
}
.rating__star:nth-child(4) {
    width: calc(var(--star_width)* 4);
    z-index: 2;
}
.rating__star:nth-child(5) {
    width: calc(var(--star_width)* 5);
    z-index: 1;
}

@media (max-width: 720px){
    .rating {
        grid-row: 2/3;
        grid-column: 2/4;
    }
    time.review-item__date, time.comment-date {
        grid-column: 1/2;
    }
    .rating svg {
        width: 16px;
        margin-top: 10px;
    }
}