/* Vouch Rate Reviews — front-end components. Override the custom properties to match your theme. */

.vouchrate {
	--vouchrate-accent: #0f6e66;
	--vouchrate-star: #f2a91f;
	--vouchrate-star-empty: #d9dde3;
	--vouchrate-border: rgba(0, 0, 0, 0.12);
	--vouchrate-muted: rgba(0, 0, 0, 0.6);
	--vouchrate-surface: #fff;
	--vouchrate-text: #1c2230;
	box-sizing: border-box;
	line-height: 1.5;
}

.vouchrate *,
.vouchrate *::before,
.vouchrate *::after {
	box-sizing: inherit;
}

.vouchrate-stars {
	display: inline-flex;
	gap: 2px;
	color: var(--vouchrate-star);
	vertical-align: middle;
}

.vouchrate-stars svg {
	display: block;
	width: 1.05em;
	height: 1.05em;
}

/* Rating */

.vouchrate-rating__link {
	display: inline-flex;
	align-items: center;
	gap: 0.75em;
	color: inherit;
	text-decoration: none !important;
}

.vouchrate-rating__score {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.3em;
	height: 2.3em;
	padding: 0 0.35em;
	border-radius: 999px;
	background: var(--vouchrate-accent);
	color: #fff;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.vouchrate-rating__body {
	display: inline-flex;
	flex-direction: column;
	gap: 0.1em;
}

.vouchrate-rating__meta,
.vouchrate-rating__facts,
.vouchrate-rating__score-line {
	color: var(--vouchrate-muted);
	font-size: 0.82em;
}

.vouchrate-rating__facts,
.vouchrate-rating__score-line {
	margin: 0.7em 0 0;
}

.vouchrate-brand {
	color: var(--vouchrate-accent);
	font-size: 0.72em;
	font-weight: 600;
	letter-spacing: 0.02em;
	white-space: nowrap;
}

.vouchrate-rating--badge .vouchrate-rating__link {
	padding: 0.45em 1em 0.45em 0.5em;
	border: 1px solid var(--vouchrate-border);
	border-radius: 999px;
	background: var(--vouchrate-surface);
	color: var(--vouchrate-text);
}

.vouchrate-rating--inline .vouchrate-rating__score {
	min-width: 0;
	height: auto;
	padding: 0;
	background: none;
	color: inherit;
}

.vouchrate-rating--inline .vouchrate-rating__body {
	flex-direction: row;
	align-items: center;
	gap: 0.5em;
}

.vouchrate-rating--card {
	max-width: 420px;
	padding: 1.1em 1.2em;
	border: 1px solid var(--vouchrate-border);
	border-radius: 12px;
	background: var(--vouchrate-surface);
	color: var(--vouchrate-text);
}

.vouchrate-rating--card .vouchrate-rating__score {
	min-width: 2.8em;
	height: 2.8em;
	border-radius: 10px;
	font-size: 1.15em;
}

.vouchrate-rating__details {
	margin-top: 0.9em;
}

.vouchrate-distribution {
	display: grid;
	gap: 0.3em;
	margin: 0;
	padding: 0;
	list-style: none;
}

.vouchrate-distribution li {
	display: grid;
	grid-template-columns: 4.2em 1fr 2.5em;
	align-items: center;
	gap: 0.6em;
	margin: 0;
	font-size: 0.82em;
}

.vouchrate-distribution__bar {
	overflow: hidden;
	height: 0.5em;
	border-radius: 99px;
	background: #eef0f3;
}

.vouchrate-distribution__bar span {
	display: block;
	height: 100%;
	background: var(--vouchrate-star);
}

.vouchrate-distribution__n {
	color: var(--vouchrate-muted);
	text-align: right;
	font-variant-numeric: tabular-nums;
}

/* Reviews */

.vouchrate-reviews__items {
	display: grid;
	gap: 1em;
	margin: 0;
	padding: 0;
	list-style: none;
}

.vouchrate-reviews--grid .vouchrate-reviews__items {
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.vouchrate-review {
	margin: 0;
	padding: 1em 1.1em;
	border: 1px solid var(--vouchrate-border);
	border-radius: 12px;
}

.vouchrate-review__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5em 0.75em;
	font-size: 0.88em;
}

.vouchrate-review__author {
	font-weight: 600;
}

.vouchrate-review__date {
	color: var(--vouchrate-muted);
}

.vouchrate-review__badge {
	display: inline-block;
	margin: 0.5em 0.4em 0 0;
	padding: 0.1em 0.55em;
	border-radius: 99px;
	background: rgba(15, 110, 102, 0.1);
	color: var(--vouchrate-accent);
	font-size: 0.75em;
	font-weight: 600;
}

.vouchrate-review__badge--muted {
	background: rgba(0, 0, 0, 0.06);
	color: var(--vouchrate-muted);
}

.vouchrate-review__title {
	margin: 0.55em 0 0.3em;
	font-size: 1em;
	line-height: 1.35;
}

.vouchrate-review__title a {
	color: inherit;
	text-decoration: none;
}

.vouchrate-review__title a:hover,
.vouchrate-review__title a:focus-visible {
	text-decoration: underline;
}

.vouchrate-review__body p {
	margin: 0 0 0.6em;
}

.vouchrate-review__reply {
	margin-top: 0.4em;
	padding: 0.6em 0.8em;
	border-left: 3px solid var(--vouchrate-accent);
	border-radius: 0 8px 8px 0;
	background: rgba(0, 0, 0, 0.03);
	font-size: 0.9em;
}

.vouchrate-review__reply summary {
	cursor: pointer;
	font-weight: 600;
}

.vouchrate-review__reply p {
	margin: 0.5em 0 0;
}

.vouchrate-reviews__footer {
	margin: 1em 0 0;
	font-size: 0.9em;
}

.vouchrate-reviews__footer a,
.vouchrate-button--link {
	color: var(--vouchrate-accent);
	font-weight: 600;
}

/* Button */

.vouchrate-button--button {
	display: inline-block;
	padding: 0.65em 1.2em;
	border-radius: 8px;
	background: var(--vouchrate-accent);
	color: #fff !important;
	font-weight: 600;
	text-decoration: none !important;
}

.vouchrate-button--button:hover,
.vouchrate-button--button:focus-visible {
	filter: brightness(1.08);
}

/* Floating badge */

.vouchrate-floating {
	position: fixed;
	bottom: 16px;
	z-index: 99990;
	width: 260px;
	max-width: calc(100vw - 32px);
}

.vouchrate-floating--right {
	right: 16px;
}

.vouchrate-floating--left {
	left: 16px;
}

@media (max-width: 600px) {
	.vouchrate-floating--hide-mobile {
		display: none;
	}
}

.vouchrate-hint {
	padding: 0.6em 0.8em;
	border: 1px dashed rgba(0, 0, 0, 0.25);
	border-radius: 6px;
	font-size: 0.9em;
}
