.mt-ratings {
	scroll-margin-top: 6rem;
}

.mt-rating-average-stars {
	position: relative;
	display: inline-block;
	color: #767676;
	white-space: nowrap;
}

.mt-rating-average-fill {
	position: absolute;
	inset: 0 auto 0 0;
	overflow: hidden;
	color: #D97706;
}

.mt-rating-reviews {
	box-sizing: border-box;
	max-inline-size: 34rem;
	margin-block-start: 1rem;
	padding: 1rem 1.25rem;
	border: 1px solid #F3F4F6;
	border-radius: 0.75rem;
	background: #FFF;
	box-shadow: 0 1px 3px rgb(0 0 0 / 5%);
}

.mt-ratings .mt-rating-reviews-title {
	margin: 0 0 0.5rem;
	font-size: 1.125rem;
	color: #1F2937;
}

.mt-ratings .mt-rating-comments {
	margin: 0;
	padding: 0;
	list-style: none;
	color: #006C8C;
	font-size: 0.875rem;
	overflow-wrap: anywhere;
}

.mt-rating-comments > li {
	margin: 0;
	padding-block: 0.75rem;
}

.mt-rating-comments > li + li {
	border-block-start: 1px solid #E5E7EB;
}

.mt-rating-comment-header {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.125rem 0.75rem;
	margin-block-end: 0.25rem;
	color: #1F2937;
}

.mt-rating-comment-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.25rem 0.625rem;
	margin-inline-start: auto;
	font-size: 0.75rem;
	color: #626D7D;
}

.mt-rating-comment-stars {
	color: #D97706;
	letter-spacing: 0.125em;
	white-space: nowrap;
}

.mt-rating-comments summary {
	display: flex;
	align-items: baseline;
	gap: 0.5em;
	cursor: pointer;
}

.mt-rating-comment-preview {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.mt-rating-comment-more,
.mt-rating-comment-less {
	flex-shrink: 0;
	margin-inline-start: auto;
	color: #2563EB;
	font-size: 0.75rem;
	white-space: nowrap;
}

.mt-rating-comments summary:hover :is(.mt-rating-comment-more, .mt-rating-comment-less),
.mt-rating-comments summary:focus-visible :is(.mt-rating-comment-more, .mt-rating-comment-less) {
	text-decoration: underline;
}

.mt-rating-comments details:not([open]) .mt-rating-comment-less,
.mt-rating-comments details[open] :is(.mt-rating-comment-preview, .mt-rating-comment-more) {
	display: none;
}

.mt-rating-comment-full {
	white-space: pre-wrap;
}

.mt-rating-comments details[open] {
	position: relative;
}

.mt-rating-comments details[open] summary {
	position: absolute;
	inset-block-start: 50%;
	inset-inline-end: 0;
	transform: translateY(-50%);
}

.mt-rating-comments details[open] .mt-rating-comment-full {
	padding-inline-end: 5.75rem;
}

.mt-ratings .mt-rating-notice {
	color: #B91C1C;
	font-weight: 700;
}

.mt-ratings .mt-rating-stars {
	display: flex;
	flex-wrap: wrap;
	gap: 0.125rem;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.mt-ratings .mt-rating-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.mt-rating-stars label {
	cursor: pointer;
}

.mt-rating-stars label span {
	display: grid;
	place-items: center;
	min-width: 2.75rem;
	min-height: 2.75rem;
	color: #D97706;
	font-size: 2rem;
	line-height: 1;
}

.mt-rating-stars label span::before {
	content: "☆";
}

.mt-rating-stars label:where(:has(input:checked, ~ label input:checked)) span::before {
	content: "★";
}

@media (hover: hover) {
	.mt-rating-stars:has(label:hover) label span::before {
		content: "☆";
	}

	.mt-rating-stars:has(label:hover) label:is(:hover, :has(~ label:hover)) span::before {
		content: "★";
	}
}

.mt-rating-stars input:focus-visible + span {
	outline: 2px solid #B45309;
	outline-offset: -2px;
}

.mt-ratings button.mt-rating-submit {
	background: #D97706;
	color: #FFFFFF;
}

.mt-ratings button.mt-rating-submit:hover,
.mt-ratings button.mt-rating-submit:focus-visible {
	background: #B45309;
	color: #FFFFFF;
}
