/**
 * [bb_kiyoh_reviews] — Kiyoh score header + review card slider.
 *
 * Tweak per placement via the custom properties on .bb-kiyoh (e.g. from a
 * Flatsome custom class): colours, card radius, gap and cards per view.
 */

.bb-kiyoh {
	--bb-kiyoh-ink: var(--bb-petrol, #244757);
	--bb-kiyoh-accent: var(--bb-red, #b01e22);
	--bb-kiyoh-muted: #8a8f94;
	--bb-kiyoh-card-bg: #fff;
	--bb-kiyoh-radius: 14px;
	--bb-kiyoh-shadow: 0 6px 24px rgba(36, 71, 87, 0.08);
	--bb-kiyoh-gap: 22px;
	--bb-kiyoh-per-view: 4;
	--bb-kiyoh-font: "Creato Display", sans-serif;

	color: var(--bb-kiyoh-ink);
	font-family: var(--bb-kiyoh-font);
}

.bb-kiyoh *,
.bb-kiyoh *::before,
.bb-kiyoh *::after {
	box-sizing: border-box;
}

/* --------------------------------------------------------
 * Stars — outline layer + filled layer clipped to --bb-fill.
 * The SVG viewBox is padded horizontally, so each 1.25em cell holds one star
 * plus its gap and a half cell is exactly half a star.
 * ------------------------------------------------------ */

.bb-kiyoh__stars {
	--bb-star: 18px;
	--bb-star-cell: calc(var(--bb-star) * 1.25);

	position: relative;
	display: inline-block;
	flex: none;
	width: calc(var(--bb-star-cell) * 5);
	height: var(--bb-star);
	margin-left: calc(var(--bb-star-cell) * -0.1);
}

.bb-kiyoh__stars::before,
.bb-kiyoh__stars::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	background-color: currentColor;
	-webkit-mask-repeat: repeat-x;
	mask-repeat: repeat-x;
	-webkit-mask-position: left center;
	mask-position: left center;
	-webkit-mask-size: var(--bb-star-cell) var(--bb-star);
	mask-size: var(--bb-star-cell) var(--bb-star);
}

.bb-kiyoh__stars::before {
	right: 0;
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-3 0 30 24'%3E%3Cpath d='M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z' fill='none' stroke='%23000' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-3 0 30 24'%3E%3Cpath d='M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z' fill='none' stroke='%23000' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.bb-kiyoh__stars::after {
	width: var(--bb-fill, 100%);
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-3 0 30 24'%3E%3Cpath d='M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z' stroke='%23000' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-3 0 30 24'%3E%3Cpath d='M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z' stroke='%23000' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.bb-kiyoh__stars--lg {
	--bb-star: 34px;
}

/* --------------------------------------------------------
 * Header
 * ------------------------------------------------------ */

.bb-kiyoh__header {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
	margin-bottom: 22px;
}

.bb-kiyoh__summary {
	display: flex;
	flex-direction: column;
	line-height: 1.1;
}

.bb-kiyoh__score {
	font-size: 24px;
	font-weight: 900;
}

.bb-kiyoh__count,
.bb-kiyoh__count:hover {
	margin-top: 3px;
	color: inherit;
	font-size: 12px;
	text-decoration: none;
}

a.bb-kiyoh__count:hover {
	text-decoration: underline;
}

/* --------------------------------------------------------
 * Slider
 * ------------------------------------------------------ */

.bb-kiyoh__slider {
	display: flex;
	align-items: center;
	gap: 12px;
}

.bb-kiyoh .bb-kiyoh__track {
	display: flex;
	flex: 1 1 auto;
	gap: var(--bb-kiyoh-gap);
	min-width: 0;
	margin: 0;
	/* Room for the card shadows inside the scroll container. */
	padding: 12px 6px 24px;
	list-style: none;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: 6px;
	scrollbar-width: none;
}

.bb-kiyoh__track::-webkit-scrollbar {
	display: none;
}

.bb-kiyoh .bb-kiyoh__card {
	display: flex;
	flex: 0 0 calc((100% - (var(--bb-kiyoh-per-view) - 1) * var(--bb-kiyoh-gap)) / var(--bb-kiyoh-per-view));
	flex-direction: column;
	min-height: 150px;
	margin: 0;
	padding: 20px 22px 16px;
	border-radius: var(--bb-kiyoh-radius);
	background: var(--bb-kiyoh-card-bg);
	box-shadow: var(--bb-kiyoh-shadow);
	scroll-snap-align: start;
}

.bb-kiyoh__card-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.bb-kiyoh__card-score {
	font-size: 16px;
	font-weight: 900;
}

.bb-kiyoh .bb-kiyoh__text {
	display: -webkit-box;
	margin: 20px 0 16px;
	overflow: hidden;
	font-size: 14px;
	line-height: 1.35;
	text-align: center;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
}

.bb-kiyoh__meta {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-top: auto;
	line-height: 1.3;
	text-align: center;
}

.bb-kiyoh__author {
	color: var(--bb-kiyoh-accent);
	font-size: 11px;
	font-weight: 900;
}

.bb-kiyoh__date {
	color: var(--bb-kiyoh-muted);
	font-size: 10px;
}

/* Arrows — reset Flatsome's global button styling. */
.bb-kiyoh .bb-kiyoh__arrow {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 44px;
	min-height: 0;
	margin: 0 0 12px;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
	color: var(--bb-kiyoh-ink);
	line-height: 1;
	cursor: pointer;
	transition: opacity 0.2s;
}

.bb-kiyoh .bb-kiyoh__arrow svg {
	width: 28px;
	height: 28px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.bb-kiyoh .bb-kiyoh__arrow:disabled {
	opacity: 0.25;
	cursor: default;
}

/* Everything fits — no arrows needed. */
.bb-kiyoh.is-static .bb-kiyoh__arrow {
	visibility: hidden;
}

/* --------------------------------------------------------
 * Responsive
 * ------------------------------------------------------ */

@media (max-width: 1099px) {
	.bb-kiyoh {
		--bb-kiyoh-per-view: 3;
	}
}

@media (max-width: 849px) {
	.bb-kiyoh {
		--bb-kiyoh-per-view: 2;
		--bb-kiyoh-gap: 16px;
	}
}

@media (max-width: 549px) {
	/* One card with a peek of the next; swipe instead of arrows. */
	.bb-kiyoh {
		--bb-kiyoh-per-view: 1.15;
	}

	.bb-kiyoh .bb-kiyoh__arrow {
		display: none;
	}

	.bb-kiyoh__header {
		flex-direction: column;
		gap: 10px;
		text-align: center;
	}

	.bb-kiyoh__stars--lg {
		--bb-star: 28px;
	}

	.bb-kiyoh__summary {
		align-items: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bb-kiyoh .bb-kiyoh__track {
		scroll-behavior: auto;
	}
}

/* --------------------------------------------------------
 * [bb_kiyoh_badge] — one-line score for the header top bar.
 * Inherits the surrounding text colour; the check mark punches
 * through in --bb-kiyoh-badge-check.
 * ------------------------------------------------------ */

.bb-kiyoh-badge {
	--bb-kiyoh-badge-icon: 1.25em;
	--bb-kiyoh-badge-check: var(--bb-petrol, #244757);

	display: inline-flex;
	align-items: center;
	gap: 0.3em;
	color: inherit;
	line-height: 1;
	white-space: nowrap;
	text-decoration: none;
}

a.bb-kiyoh-badge:hover {
	color: inherit;
	text-decoration: underline;
}

.bb-kiyoh-badge__icon {
	flex: none;
	width: var(--bb-kiyoh-badge-icon);
	height: var(--bb-kiyoh-badge-icon);
	margin-right: 0.15em;
	fill: currentColor;
}

.bb-kiyoh-badge__check {
	fill: none;
	stroke: var(--bb-kiyoh-badge-check);
	stroke-width: 2.2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.bb-kiyoh-badge__score {
	font-weight: 700;
}
