/* Отзывы: сводка с распределением, фильтры, список, форма, лента, лайтбокс.
   Цвета берутся из токенов магазина (--dc-*, --dag-*), запасные значения
   держат блок самостоятельным вне страницы товара. Ховеры без сдвигов:
   только цвет, рамка и тень. */

.dc-reviews,
.dc-rfeed,
.dc-rv-invite,
.dc-rv-lb {
	--rv-tx: var(--dc-tx, var(--dag-tx, #15181d));
	--rv-soft: var(--dc-tx-soft, var(--dag-tx-faint, #6b7280));
	--rv-line: var(--dc-line, var(--dag-line, #e2e5ea));
	--rv-card: var(--dc-card, transparent);
	--rv-radius: var(--dc-radius, var(--dag-radius, 12px));
	--rv-mono: var(--dc-mono, var(--dag-mono, ui-monospace, Menlo, Consolas, monospace));
	--rv-acc: var(--dc-acc, var(--dag-acc, #3b6ea5));
	--rv-ok: var(--dc-ok, #2f8a57);
	--rv-bad: var(--dc-danger, #d93a3a);
	--rv-star: var(--dc-star, var(--rv-tx));
	--rv-ctl: var(--ctl, 44px);
}

.dc-reviews {
	margin-top: 40px;
}

.dc-reviews .dc-stars,
.dc-rfeed .dc-stars {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	line-height: 0;
}

.dc-reviews .dc-star,
.dc-rfeed .dc-star {
	flex: none;
}

.dc-reviews .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.dc-reviews__head {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin-bottom: 18px;
}

.dc-reviews__head .dc-product__section-title {
	margin: 0;
}

.dc-reviews__total {
	font-family: var(--rv-mono);
	font-size: 13px;
	color: var(--rv-soft);
}

/* --- Сводка --- */

.dc-reviews__top {
	display: grid;
	grid-template-columns: minmax(220px, auto) minmax(0, 1fr);
	gap: 18px 44px;
	align-items: center;
	padding: 22px 24px;
	border: 1px solid var(--rv-line);
	border-radius: var(--rv-radius);
	background: var(--rv-card);
}

.dc-reviews__summary,
.dc-rfeed__sum {
	display: flex;
	align-items: center;
	gap: 14px;
}

.dc-reviews__average {
	font-family: var(--rv-mono);
	font-size: 44px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: -.04em;
}

.dc-reviews__summary .dc-stars,
.dc-rfeed__sum .dc-stars {
	color: var(--rv-star);
}

.dc-reviews__count {
	display: block;
	margin-top: 6px;
	font-size: 13.5px;
	color: var(--rv-soft);
}

.dc-reviews__buyers {
	display: block;
	margin-top: 2px;
	font-size: 12.5px;
	color: var(--rv-ok);
}

.dc-reviews__dist {
	display: grid;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.dc-reviews__bar-i {
	display: grid;
	grid-template-columns: 14px minmax(0, 1fr) 32px;
	align-items: center;
	gap: 12px;
	width: 100%;
	padding: 4px 8px;
	border: 1px solid transparent;
	border-radius: 8px;
	background: none;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
	transition: background-color .2s ease, border-color .2s ease;
}

.dc-reviews__bar-i:hover:not(:disabled) {
	background: color-mix(in srgb, var(--rv-tx) 5%, transparent);
}

.dc-reviews__bar-i.is-on {
	border-color: var(--rv-tx);
	background: color-mix(in srgb, var(--rv-tx) 5%, transparent);
}

.dc-reviews__bar-i:disabled {
	cursor: default;
	opacity: .45;
}

.dc-reviews__bar-n,
.dc-reviews__bar-i em {
	font-family: var(--rv-mono);
	font-size: 12.5px;
	font-style: normal;
	color: var(--rv-soft);
}

.dc-reviews__bar-i em {
	text-align: right;
}

.dc-reviews__bar-i i {
	display: block;
	height: 6px;
	overflow: hidden;
	border-radius: 3px;
	background: color-mix(in srgb, var(--rv-tx) 10%, transparent);
}

.dc-reviews__bar-i s {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: var(--rv-star);
	transform-origin: 0 50%;
	transition: transform 1.1s cubic-bezier(.16, 1, .3, 1);
}

.dc-reviews__dist li:nth-child(1) s { transition-delay: .05s; }
.dc-reviews__dist li:nth-child(2) s { transition-delay: .12s; }
.dc-reviews__dist li:nth-child(3) s { transition-delay: .19s; }
.dc-reviews__dist li:nth-child(4) s { transition-delay: .26s; }
.dc-reviews__dist li:nth-child(5) s { transition-delay: .33s; }

.dc-rv-js .dc-reviews__top:not(.is-in) .dc-reviews__bar-i s {
	transform: scaleX(0);
}

/* --- Фильтры и сортировка --- */

.dc-reviews__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: 20px 0 4px;
}

.dc-reviews__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.dc-reviews__chip {
	height: 36px;
	padding: 0 14px;
	border: 1px solid var(--rv-line);
	border-radius: 999px;
	background: none;
	color: inherit;
	font: inherit;
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
	transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}

.dc-reviews__chip span {
	margin-left: 2px;
	font-family: var(--rv-mono);
	font-weight: 500;
	color: var(--rv-soft);
}

.dc-reviews__chip:hover {
	border-color: var(--rv-tx);
}

.dc-reviews__chip.is-on {
	border-color: var(--rv-tx);
	background: var(--rv-tx);
	color: var(--dc-bg, #fff);
}

.dc-reviews__chip.is-on span {
	color: inherit;
	opacity: .7;
}

.dc-reviews__sort select {
	height: 36px;
	padding: 0 32px 0 14px;
	border: 1px solid var(--rv-line);
	border-radius: 999px;
	background-color: transparent;
	color: inherit;
	font: inherit;
	font-size: 13.5px;
	cursor: pointer;
}

/* --- Список --- */

.dc-reviews__list {
	margin: 0;
	padding: 0;
	list-style: none;
	transition: opacity .2s ease;
}

.dc-reviews__list.is-busy {
	opacity: .45;
}

.dc-reviews__empty,
.dc-reviews__none {
	margin: 0;
	padding: 16px 0;
	color: var(--rv-soft);
}

.dc-review {
	padding: 22px 0;
	border-bottom: 1px solid var(--rv-line);
}

.dc-review.is-new {
	animation: dc-rv-in .6s cubic-bezier(.16, 1, .3, 1) both;
}

@keyframes dc-rv-in {
	from { opacity: 0; transform: translate3d(0, 12px, 0); }
	to { opacity: 1; transform: none; }
}

.dc-review__head {
	display: flex;
	gap: 12px;
	align-items: center;
	margin-bottom: 8px;
}

.dc-review__avatar {
	display: grid;
	flex: none;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: color-mix(in srgb, var(--rv-tx) 8%, transparent);
	font-size: 15px;
	font-weight: 700;
}

.dc-review__who {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 2px 10px;
}

.dc-review__author {
	font-weight: 700;
}

.dc-review__author a {
	color: inherit;
}

.dc-review__badge {
	display: inline-flex;
	align-items: center;
	padding: 2px 9px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--rv-ok) 12%, transparent);
	color: var(--rv-ok);
	font-size: 11.5px;
	font-weight: 700;
	line-height: 1.5;
}

.dc-review__meta {
	display: flex;
	flex-basis: 100%;
	align-items: center;
	gap: 10px;
}

.dc-review__meta .dc-stars {
	color: var(--rv-star);
}

.dc-review__date {
	font-family: var(--rv-mono);
	font-size: 12px;
	color: var(--rv-soft);
}

.dc-review__part {
	margin-top: 10px;
	font-size: 15px;
	line-height: 1.6;
}

.dc-review__part b {
	display: block;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--rv-soft);
}

.dc-review__part p {
	margin: 2px 0 0;
}

.dc-review__photos {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;
}

.dc-review__photo {
	display: block;
	width: 88px;
	height: 88px;
	overflow: hidden;
	border: 1px solid var(--rv-line);
	border-radius: 8px;
	transition: border-color .2s ease, filter .2s ease;
}

.dc-review__photo:hover {
	border-color: var(--rv-tx);
	filter: brightness(1.06);
}

.dc-review__photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.dc-review__reply {
	margin-top: 14px;
	padding: 12px 16px;
	border: 1px solid var(--rv-line);
	border-radius: 8px;
	background: color-mix(in srgb, var(--rv-tx) 3%, transparent);
	font-size: 14.5px;
	line-height: 1.6;
}

.dc-review__reply b {
	display: block;
	margin-bottom: 2px;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--rv-soft);
}

.dc-review__reply p {
	margin: 0;
}

.dc-reviews__more {
	display: inline-flex;
	align-items: center;
	height: var(--rv-ctl);
	margin-top: 18px;
	padding: 0 20px;
	border: 1px solid var(--rv-line);
	border-radius: var(--rv-radius);
	background: none;
	color: inherit;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: border-color .2s ease, background-color .2s ease;
}

.dc-reviews__more:hover {
	border-color: var(--rv-tx);
}

.dc-reviews__more[hidden] {
	display: none;
}

/* --- Форма --- */

.dc-reviews__write {
	margin-top: 22px;
}

.dc-reviews__write > summary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: var(--rv-ctl);
	padding: 0 20px;
	border: 1px solid var(--rv-line);
	border-radius: var(--rv-radius);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	list-style: none;
	transition: border-color .2s ease, background-color .2s ease;
}

.dc-reviews__write > summary::-webkit-details-marker {
	display: none;
}

.dc-reviews__write > summary:hover {
	border-color: var(--rv-tx);
}

.dc-reviews__write[open] > summary {
	margin-bottom: 18px;
	border-color: var(--rv-tx);
}

.dc-reviews__write[open] .dc-review-form {
	animation: dc-rv-in .45s cubic-bezier(.16, 1, .3, 1) both;
}

.dc-review-form {
	display: grid;
	gap: 14px;
	max-width: 720px;
	padding: 22px 24px;
	border: 1px solid var(--rv-line);
	border-radius: var(--rv-radius);
	background: var(--rv-card);
}

.dc-review-form__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.dc-review-form__f {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0;
}

.dc-review-form__f label,
.dc-review-form__label {
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--rv-soft);
}

.dc-review-form .required {
	color: var(--rv-bad);
}

.dc-review-form input[type="text"],
.dc-review-form input[type="email"],
.dc-review-form textarea {
	width: 100%;
	min-height: var(--rv-ctl);
	padding: 10px 12px;
	border: 1px solid var(--rv-line);
	border-radius: 8px;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 15px;
	transition: border-color .2s ease;
}

.dc-review-form textarea {
	min-height: 72px;
	resize: vertical;
}

.dc-review-form .dc-review-form__text {
	min-height: 110px;
}

.dc-review-form input:focus,
.dc-review-form textarea:focus {
	border-color: var(--rv-acc);
	outline: 2px solid var(--rv-acc);
	outline-offset: 1px;
}

.dc-review-form .is-bad input,
.dc-review-form .is-bad textarea {
	border-color: var(--rv-bad);
}

.dc-review-form__err {
	font-size: 12.5px;
	color: var(--rv-bad);
}

.dc-review-form__rate {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 16px;
}

.dc-review-form__stars {
	display: inline-flex;
	flex-direction: row-reverse;
	align-items: center;
	gap: 4px;
}

.dc-review-form__stars input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

.dc-review-form__stars label {
	color: color-mix(in srgb, var(--rv-tx) 28%, transparent);
	cursor: pointer;
	line-height: 0;
	transition: color .15s ease;
}

.dc-review-form__stars input:focus-visible + label {
	outline: 2px solid var(--rv-acc);
	outline-offset: 2px;
}

.dc-reviews .submit {
	height: var(--rv-ctl);
	padding: 0 22px;
	border: 0;
	border-radius: var(--rv-radius);
	background: var(--rv-tx);
	color: var(--dc-bg, #fff);
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	transition: background-color .2s ease;
}

.dc-reviews .submit:hover {
	background: var(--rv-acc);
}

.dc-review-form__rate .dc-review-form__stars {
	margin: 0;
}

.dc-review-form__rate.is-bad .dc-review-form__stars label {
	color: color-mix(in srgb, var(--rv-bad) 55%, var(--rv-line));
}

.dc-review-form__stars label:hover,
.dc-review-form__stars label:hover ~ label,
.dc-review-form__stars input:checked ~ label,
.dc-review-form__stars input:checked + label {
	color: var(--rv-star);
}

.dc-review-form__stars input:checked + label svg path,
.dc-review-form__stars input:checked ~ label svg path {
	fill: currentColor;
}

.dc-review-form__photos {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.dc-review-form__pick {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: var(--rv-ctl);
	padding: 0 16px;
	border: 1px dashed color-mix(in srgb, var(--rv-tx) 30%, transparent);
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: border-color .2s ease;
}

.dc-review-form__pick:hover,
.dc-review-form__pick:focus-within {
	border-color: var(--rv-tx);
}

.dc-review-form__pick input {
	position: absolute;
	inset: 0;
	width: 100%;
	opacity: 0;
	cursor: pointer;
}

.dc-review-form__photos.is-bad .dc-review-form__pick {
	border-color: var(--rv-bad);
}

.dc-review-form__thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.dc-review-form__thumb {
	position: relative;
	width: 64px;
	height: 64px;
	overflow: hidden;
	border: 1px solid var(--rv-line);
	border-radius: 8px;
	animation: dc-rv-in .35s cubic-bezier(.16, 1, .3, 1) both;
}

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

.dc-review-form__thumb button {
	position: absolute;
	top: 3px;
	right: 3px;
	display: grid;
	place-items: center;
	width: 22px;
	height: 22px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(15, 17, 20, .65);
	color: #fff;
	cursor: pointer;
	transition: background-color .2s ease;
}

.dc-review-form__thumb button:hover {
	background: rgba(15, 17, 20, .9);
}

.dc-review-form__hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.dc-review-form__msg {
	min-height: 1.3em;
	margin: 0;
	font-size: 14px;
}

.dc-review-form__msg.is-err {
	color: var(--rv-bad);
}

.dc-review-form__msg.is-ok {
	color: var(--rv-ok);
}

.dc-review-form .submit {
	justify-self: start;
	min-height: var(--rv-ctl);
	padding: 0 22px;
	cursor: pointer;
}

.dc-review-form .submit:disabled {
	cursor: progress;
	opacity: .6;
}

.dc-reviews__thanks {
	padding: 18px 20px;
	border: 1px solid color-mix(in srgb, var(--rv-ok) 40%, var(--rv-line));
	border-radius: var(--rv-radius);
	background: color-mix(in srgb, var(--rv-ok) 6%, transparent);
	font-size: 15px;
	animation: dc-rv-in .45s cubic-bezier(.16, 1, .3, 1) both;
}

/* --- Ссылки «Оставить отзыв» в кабинете --- */

.dc-rv-invite {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	margin: 12px 0;
	font-size: 14px;
}

.dc-rv-invite > span {
	font-weight: 700;
}

.dc-rv-invite__a {
	display: inline-flex;
	align-items: center;
	min-height: 36px;
	padding: 0 14px;
	border: 1px solid var(--rv-line);
	border-radius: 999px;
	color: inherit;
	text-decoration: none;
	transition: border-color .2s ease;
}

.dc-rv-invite__a:hover {
	border-color: var(--rv-tx);
}

/* --- Лента отзывов магазина --- */

.dc-rfeed {
	display: grid;
	gap: 20px;
}

.dc-rfeed__list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.dc-rfeed__i {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 18px;
	border: 1px solid var(--rv-line);
	border-radius: var(--rv-radius);
	background: var(--rv-card);
	transition: border-color .2s ease, box-shadow .2s ease;
}

.dc-rfeed__i:hover {
	border-color: color-mix(in srgb, var(--rv-tx) 30%, var(--rv-line));
}

.dc-rfeed__ph {
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	margin: -6px -6px 2px;
	border-radius: 8px;
}

.dc-rfeed__ph img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.dc-rfeed__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.dc-rfeed__top .dc-stars {
	color: var(--rv-star);
}

.dc-rfeed__top time {
	font-family: var(--rv-mono);
	font-size: 12px;
	color: var(--rv-soft);
}

.dc-rfeed__text {
	margin: 0;
	font-size: 14.5px;
	line-height: 1.6;
}

.dc-rfeed__by {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 8px;
	font-size: 13.5px;
}

.dc-rfeed__product {
	align-self: flex-start;
	margin-top: auto;
	border-bottom: 1px solid transparent;
	color: var(--rv-soft);
	font-size: 13px;
	text-decoration: none;
	transition: color .2s ease, border-color .2s ease;
}

.dc-rfeed__product:hover {
	border-color: currentColor;
	color: var(--rv-tx);
}

/* --- Лайтбокс фото --- */

.dc-rv-lb {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: grid;
	place-items: center;
	padding: 24px;
	background: rgba(10, 12, 14, .88);
	animation: dc-rv-fade .25s ease both;
}

.dc-rv-lb img {
	max-width: min(1100px, 100%);
	max-height: 86vh;
	border-radius: 8px;
	animation: dc-rv-pop .4s cubic-bezier(.16, 1, .3, 1) both;
}

.dc-rv-lb button {
	position: absolute;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, .3);
	border-radius: 50%;
	background: rgba(255, 255, 255, .06);
	color: #fff;
	cursor: pointer;
	transition: background-color .2s ease, border-color .2s ease;
}

.dc-rv-lb button:hover {
	border-color: #fff;
	background: rgba(255, 255, 255, .14);
}

.dc-rv-lb__x { top: 16px; right: 16px; }
.dc-rv-lb__p { left: 16px; top: 50%; margin-top: -22px; }
.dc-rv-lb__n { right: 16px; top: 50%; margin-top: -22px; }

@keyframes dc-rv-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes dc-rv-pop {
	from { opacity: 0; transform: scale(.96); }
	to { opacity: 1; transform: none; }
}

@media (max-width: 680px) {
	.dc-reviews__top {
		grid-template-columns: 1fr;
		padding: 18px;
	}

	.dc-review-form {
		padding: 18px;
	}

	.dc-review-form__row {
		grid-template-columns: 1fr;
	}

	.dc-reviews__bar {
		align-items: stretch;
	}
}
