.product-review-summary {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    color: var(--store-dark);
    font-size: 14px;
    line-height: 1.35;
    text-decoration: none;
    text-underline-offset: 3px;
}

.product-review-summary:hover {
    text-decoration: underline;
}

.product-review-summary__count {
    color: var(--store-muted);
}

.catalog-product-card__review-summary {
    align-self: flex-start;
    margin-top: 6px;
    font-size: 13px;
}

.product-review-summary--purchase {
    flex-basis: 100%;
}

.product-review-summary--mobile {
    display: none;
    margin: 0 0 16px;
}

@media (max-width: 900px) {
    .product-review-summary--mobile {
        display: inline-flex;
    }

    .product-review-summary--purchase {
        display: none;
    }
}

.product-review-star {
    color: #da5e00;
}

.product-information__tabs--reviews {
    grid-template-columns: repeat(var(--product-tab-count), minmax(0, 1fr));
}

.product-review-form {
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
}

.product-review-average {
    margin: 0 0 14px;
}

.product-review-slot {
    margin-top: 18px;
}

.product-review-slot[open] > summary,
.product-review-feedback--saved + .product-review-slot {
    display: none;
}

.product-review-content {
    margin-top: 12px;
}

.product-review-form label {
    display: grid;
    gap: 5px;
}

.product-review-contacts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    max-width: 640px;
}

.product-review-form :is(input:not([type]), input[type="email"], textarea) {
    box-sizing: border-box;
    width: 100%;
    padding: 9px 10px;
    border: 1px solid var(--store-border);
    border-radius: 6px;
    color: var(--store-dark);
    background: var(--store-white);
    font: inherit;
}

.product-review-form :is(input:not([type]), input[type="email"], textarea):focus {
    border-color: var(--store-yellow);
    outline: none;
}

.product-review-form textarea {
    resize: vertical;
}

.product-review-form fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.product-review-form legend {
    padding: 0;
}

.product-review-rating {
    display: flex;
    gap: 2px;
    max-width: 380px;
}

.product-review-rating label {
    position: relative;
    display: grid;
    flex: 1;
    gap: 0;
    min-width: 0;
    padding: 4px 0;
    border-radius: 4px;
    color: #727780;
    text-align: center;
    cursor: pointer;
}

.product-review-rating input {
    position: absolute;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.product-review-rating span {
    font-size: clamp(17px, 4.6vw, 25px);
    line-height: 1.2;
}

.product-review-rating label:has(input:checked),
.product-review-rating label:has(~ label input:checked) {
    color: #a64b00;
}

.product-review-rating label:has(input:checked) span,
.product-review-rating label:has(~ label input:checked) span {
    color: #da5e00;
}

.product-review-rating label:has(input:focus-visible) {
    outline: 2px solid var(--store-dark);
    outline-offset: -2px;
}

.product-review-form button,
.product-review-slot summary,
.product-review-feedback--saved {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-self: start;
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid var(--store-border);
    border-radius: 6px;
    color: var(--store-dark);
    font: inherit;
    font-weight: 700;
}

.product-review-form button,
.product-review-slot summary {
    background: var(--store-yellow);
    cursor: pointer;
}

.product-review-hint,
.product-review-meta time {
    margin: 0;
    color: var(--store-muted);
    font-size: 13px;
}

.product-review-feedback {
    margin: 0 0 12px;
    color: var(--store-dark);
    font-weight: 650;
}

.product-review-feedback--saved {
    margin: 18px 0 0;
    background: #eef0f2;
    font-weight: 700;
}

.product-review-feedback--error {
    color: #a02623;
}

.product-review-list {
    display: grid;
    gap: 12px;
}

.product-review {
    min-width: 0;
    padding: 14px 16px;
    border: 1px solid var(--store-border);
    border-radius: 10px;
    overflow-wrap: anywhere;
    scroll-margin-top: 90px;
}

.product-review--own {
    border-color: var(--store-yellow);
    background: var(--store-yellow-light);
}

.product-review-owner {
    color: #805000;
    font-size: 13px;
    font-weight: 700;
}

.product-review-addition {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed var(--store-border);
}

.product-review-addition time {
    color: inherit;
    font-size: inherit;
}

.product-review-meta,
.product-review-pages {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 14px;
}

.product-review-body {
    margin: 8px 0 0;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

@media (max-width: 640px) {
    .product-information__tabs--reviews {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-information__tabs--reviews .product-information__tab {
        border-bottom: 0;
    }

    .product-information__tabs--reviews .product-information__tab:nth-child(n + 3) {
        border-top: 1px solid var(--store-border);
    }

    .product-information__tabs--reviews .product-information__tab:nth-child(even) {
        border-right: 0;
    }

    .product-information__tabs--reviews .product-information__tab:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .product-review-contacts {
        grid-template-columns: minmax(0, 1fr);
    }
}
