/* ================================================================
   [product_reviews_block] styles
   ================================================================ */

.kdc-reviews {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.kdc-reviews__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}

.kdc-reviews__label {
	font-size: 14px;
	font-weight: 600;
	color: var(--global-palette3);
}

.kdc-reviews__title {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.kdc-reviews__rating-wrap {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.kdc-reviews__rating-wrap--mobile {
	display: none;
}

.kdc-reviews__rating-text {
	font-size: 14px;
	color: var(--global-palette4);
}

.kdc-stars {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	line-height: 0;
}

.kdc-stars svg {
	display: block;
}

.kdc-reviews__add-btn {
	align-self: flex-start;
	background: #FFE5E5;
	border: 0;
	border-radius: 6px;
	padding: 10px 20px;
	font-size: 14px;
	font-weight: 600;
	color: var(--global-palette3);
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
	box-shadow: none;
}

.kdc-reviews__add-btn:hover,
.kdc-reviews__add-btn:focus {
	background: var(--global-palette2);
	color: #fff;
	box-shadow: none;
}

.kdc-reviews__all-btn {
	display: none;
	background: #FFE5E5;
	border: 0;
	border-radius: 6px;
	padding: 8px 14px;
	font-size: 14px;
	font-weight: 600;
	color: var(--global-palette3);
	cursor: pointer;
	box-shadow: none;
}

.kdc-reviews__all-btn:hover,
.kdc-reviews__all-btn:focus {
	background: var(--global-palette2);
	color: #fff;
	box-shadow: none;
}

/* ── Empty state ────────────────────────────────────────────────── */

.kdc-reviews__empty {
	border: 1px solid #CDCDCD;
	border-radius: 8px;
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.kdc-reviews__empty-title {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	color: var(--global-palette3);
}

.kdc-reviews__empty-sub {
	margin: 0;
	font-size: 14px;
	color: #6D7482;
}

/* ── Review grid ────────────────────────────────────────────────── */

.kdc-reviews__grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
}

@media (max-width: 640px) {
	.kdc-reviews__head {
		align-items: flex-start;
		flex-wrap: nowrap;
	}

	.kdc-reviews__head > .kdc-reviews__rating-wrap {
		display: none;
	}

	.kdc-reviews__rating-wrap--mobile {
		display: inline-flex;
	}

	.kdc-reviews__all-btn {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		margin-left: auto;
		flex-shrink: 0;
	}

	.kdc-reviews__grid {
		display: flex;
		flex-wrap: nowrap;
		gap: 12px;
		overflow-x: auto;
		overflow-y: hidden;
		padding: 0 16px 2px;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
		scroll-snap-type: x proximity;
	}

	.kdc-reviews__grid::-webkit-scrollbar {
		display: none;
	}

	.kdc-reviews__grid .kdc-review {
		flex: 0 0 min(84vw, 320px);
		scroll-snap-align: start;
	}

	.kdc-reviews > .kdc-reviews__add-btn {
		align-self: stretch;
		justify-content: center;
		order: 4;
	}

	.kdc-reviews__load-more {
		display: none;
	}
}

.kdc-reviews__load-more {
	align-self: center;
	background: transparent;
	border: 1px solid var(--global-palette2);
	color: var(--global-palette2);
	border-radius: 6px;
	padding: 10px 20px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: none;
	transition: background 0.15s ease, color 0.15s ease;
}

.kdc-reviews__load-more:hover,
.kdc-reviews__load-more:focus {
	background: var(--global-palette2);
	color: #fff;
	box-shadow: none;
}

/* ── Single review card ─────────────────────────────────────────── */

.kdc-review {
	border: 1px solid #CDCDCD;
	border-radius: 8px;
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.kdc-review__head {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.kdc-review__name {
	margin: 0;
}

.kdc-review__body {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.kdc-review__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.kdc-review__field-label {
	font-size: 14px;
	font-weight: 600;
	color: var(--global-palette3);
}

.kdc-review__field-value {
	color: #6D7482;
	font-weight: 500;
}

/* ================================================================
   Review modal
   ================================================================ */

.kdc-review-modal[hidden] { display: none !important; }

.kdc-review-modal {
	position: fixed;
	inset: 0;
	z-index: 2147483647;
	display: flex;
	align-items: center;
	justify-content: center;
}

.kdc-review-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.4);
}

.kdc-review-modal__dialog {
	position: relative;
	width: min(408px, calc(100vw - 24px));
	max-height: calc(100vh - 40px);
	overflow: auto;
	background: #fff;
	border-radius: 6px;
	padding: 28px 28px;
	box-shadow: 0 24px 72px rgba(0, 0, 0, 0.22);
}

.kdc-review-modal__close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 28px;
	height: 28px;
	border: 0;
	background: transparent;
	color: #282727;
	cursor: pointer;
	font-size: 0;
	box-shadow: none;
}

.kdc-review-modal__close:hover,
.kdc-review-modal__close:focus {
	background: transparent;
	color: var(--global-palette2);
	box-shadow: none;
}

.kdc-review-modal__title {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.25;
	color: var(--global-palette3);
}

.kdc-review-modal__subtitle {
	margin: 2px 0 0;
	color: #6D7482;
	font-size: 13px;
	line-height: 1.3;
	white-space: pre-line;
}

.kdc-review-modal__head {
	margin: 0 0 24px;
	padding-right: 32px;
}

.kdc-review-auth {
	display: flex;
	flex-direction: column;
	gap: 16px;
	align-items: stretch;
	margin-top: 24px;
}

.kdc-review-auth[hidden] {
	display: none !important;
}

.kdc-review-auth__text {
	margin: 0;
	color: #6D7482;
	font-size: 15px;
	text-align: center;
}

.kdc-review-auth__button {
	min-height: 42px;
	border-radius: 8px;
}

.kdc-review-form {
	display: flex;
	flex-direction: column;
	gap: 18px;
	margin-top: 24px;
}

.kdc-review-form[hidden],
.kdc-review-form__details[hidden],
.kdc-review-form__submit[hidden] {
	display: none !important;
}

.kdc-review-form__label {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 14px;
	font-weight: 600;
	color: var(--global-palette3);
}

.kdc-review-form__label input,
.kdc-review-form__label textarea {
	font-size: 14px;
	font-weight: 400;
	color: var(--global-palette5);
	padding: 10px 14px;
	border: 1px solid #CDCDCD;
	border-radius: 6px;
	background: #fff;
	width: 100%;
}

.kdc-review-form__label textarea {
	min-height: 100px;
	max-height: 300px;
	resize: vertical;
}

.kdc-review-form__label input:focus,
.kdc-review-form__label textarea:focus {
	outline: none;
	border-color: var(--global-palette2);
}

.kdc-review-form__rating {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 22px;
}

.kdc-review-form__stars {
	display: flex;
	justify-content: center;
	gap: 18px;
}

.kdc-review-form__star {
	background: transparent;
	border: 0;
	padding: 0;
	cursor: pointer;
	line-height: 0;
	box-shadow: none;
}

.kdc-review-form__star:hover,
.kdc-review-form__star:focus {
	background: transparent;
	box-shadow: none;
}

.kdc-review-form__star svg {
	width: 24px;
	height: 24px;
	display: block;
}

.kdc-review-form__question {
	margin: 0;
	color: #6D7482;
	font-size: 17px;
	font-weight: 500;
	line-height: 1.3;
	text-align: center;
}

.kdc-review-form__details {
	display: flex;
	flex-direction: column;
	gap: 22px;
}

.kdc-review-form__section-title {
	color: var(--global-palette3);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	text-align: center;
}

.kdc-review-form__features {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.kdc-review-form__checkbox {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	color: #8B93A1;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.35;
	cursor: pointer;
}

.kdc-review-form__checkbox input {
	appearance: none;
	-webkit-appearance: none;
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	margin: 1px 0 0;
	border: 1.5px solid var(--global-palette6, #cdd3de);
	border-radius: 3px;
	background: #fff;
	cursor: pointer;
	position: relative;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.kdc-review-form__checkbox input:checked {
	background: var(--global-palette2);
	border-color: var(--global-palette2);
	box-shadow: none;
}

.kdc-review-form__checkbox input:checked::after {
	content: '';
	position: absolute;
	left: 5px;
	top: 2px;
	width: 5px;
	height: 9px;
	border: 2px solid #fff;
	border-top: 0;
	border-left: 0;
	transform: rotate(45deg);
}

.kdc-review-form__checkbox:hover {
	color: var(--global-palette2);
}

.kdc-review-form__checkbox:hover input {
	border-color: var(--global-palette2);
}

.kdc-review-form__feedback {
	min-height: 0;
	font-size: 13px;
	color: var(--global-palette2);
}

.kdc-review-form__feedback.is-success {
	color: #17A34B;
}

.kdc-review-form__submit {
	background: #FFE1E1;
	color: var(--global-palette3);
	border: 0;
	border-radius: 8px;
	padding: 13px 16px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: none;
}

.kdc-review-form__submit:hover,
.kdc-review-form__submit:focus {
	background: var(--global-palette2);
	color: #fff;
	box-shadow: none;
}

body.kdc-review-modal-open { overflow: hidden; }

/* ================================================================
   Reviews mobile drawer
   ================================================================ */

.kdc-reviews-drawer,
.kdc-reviews-backdrop {
	display: none !important;
}

@media (max-width: 640px) {
	.kdc-reviews-drawer {
		position: fixed;
		inset: 0;
		z-index: 2147483600;
		display: flex !important;
		flex-direction: column;
		width: 100vw;
		height: 100dvh;
		background: #fff;
		transform: translateX(100%);
		transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
		overflow: hidden;
	}

	.kdc-reviews-drawer--open {
		transform: translateX(0);
	}

	.kdc-reviews-backdrop {
		position: fixed;
		inset: 0;
		z-index: 2147483599;
		display: block !important;
		background: rgba(0, 0, 0, 0.36);
		opacity: 0;
		pointer-events: none;
		transition: opacity 0.22s ease;
	}

	.kdc-reviews-backdrop--visible {
		opacity: 1;
		pointer-events: auto;
	}

	.kdc-reviews-drawer__header {
		display: flex;
		align-items: center;
		gap: 10px;
		min-height: 56px;
		padding: 10px 16px;
		border-bottom: 1px solid #E8E8E8;
		flex-shrink: 0;
	}

	.kdc-reviews-drawer__back {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 34px;
		height: 34px;
		padding: 0;
		border: 0;
		border-radius: 6px;
		background: transparent;
		color: var(--global-palette5, #282727);
		box-shadow: none;
	}

	.kdc-reviews-drawer__back:hover,
	.kdc-reviews-drawer__back:focus {
		background: #F6F5F5;
		color: var(--global-palette5, #282727);
		box-shadow: none;
	}

	.kdc-reviews-drawer__title {
		font-size: 18px;
		font-weight: 600;
		color: var(--global-palette3);
	}

	.kdc-reviews-drawer__body {
		display: flex;
		flex-direction: column;
		gap: 16px;
		flex: 1 1 auto;
		min-height: 0;
		overflow-y: auto;
		padding: 16px;
		-webkit-overflow-scrolling: touch;
	}

	.kdc-reviews-drawer__summary {
		display: flex;
		align-items: center;
		gap: 8px;
	}

	.kdc-reviews-drawer__rating {
		font-size: 15px;
		font-weight: 600;
		color: var(--global-palette3);
	}

	.kdc-reviews-drawer__add {
		align-self: stretch;
		justify-content: center;
	}

	.kdc-reviews-drawer__list {
		display: flex;
		flex-direction: column;
		gap: 12px;
	}

	.kdc-reviews-drawer__list .kdc-review {
		gap: 20px;
		padding: 16px;
	}

	.kdc-reviews-drawer__loader {
		padding: 8px 0 4px;
		text-align: center;
		font-size: 14px;
		color: #6D7482;
	}

	body.kdc-reviews-drawer-active {
		overflow: hidden;
	}
}
