/* Opinie Booksy – slider */

.bo-root {
	--bo-accent: #00a3ad;
	container-type: inline-size;
	container-name: bo;
}

.bo-widget {
	--bo-star: #ffb400;
	--bo-star-empty: #e2e2e2;
	--bo-card-bg: #ffffff;
	--bo-border: rgba(0, 0, 0, 0.08);
	--bo-text: #2b2b2b;
	--bo-muted: #767676;
	--bo-radius: 14px;
	--bo-gap: 20px;
	--bo-per-view: 3;

	color: var(--bo-text);
	font-size: 15px;
	line-height: 1.55;
	box-sizing: border-box;
}

.bo-widget *,
.bo-widget *::before,
.bo-widget *::after {
	box-sizing: border-box;
}

/* Liczba kart zależy od szerokości kontenera, nie ekranu */
@container bo (max-width: 900px) {
	.bo-widget { --bo-per-view: 2; }
}

@container bo (max-width: 580px) {
	.bo-widget { --bo-per-view: 1; --bo-gap: 14px; }
}

/* ---------- Gwiazdki ---------- */

.bo-stars {
	position: relative;
	display: inline-block;
	line-height: 0;
	vertical-align: middle;
	white-space: nowrap;
}

.bo-stars svg {
	width: 17px;
	height: 17px;
	margin-right: 1px;
	fill: currentColor;
}

.bo-stars--lg svg {
	width: 22px;
	height: 22px;
}

.bo-stars__bg {
	color: var(--bo-star-empty);
}

.bo-stars__fg {
	position: absolute;
	top: 0;
	left: 0;
	overflow: hidden;
	color: var(--bo-star);
}

/* ---------- Nagłówek ---------- */

.bo-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 24px;
	margin-bottom: 24px;
}

.bo-header__name {
	font-weight: 600;
	font-size: 1.05em;
	margin-bottom: 4px;
}

.bo-header__score {
	display: flex;
	align-items: center;
	gap: 10px;
}

.bo-header__rating {
	font-size: 2em;
	font-weight: 700;
	line-height: 1;
}

.bo-header__count {
	margin-top: 4px;
	color: var(--bo-muted);
	font-size: 0.9em;
}

/* Przycisk – kolory z !important, bo motywy (OceanWP, kit Elementora)
   nadpisują a:hover i potrafią "schować" tekst na tle akcentu. */
.bo-widget .bo-btn,
.bo-widget .bo-btn:link,
.bo-widget .bo-btn:visited {
	display: inline-block;
	padding: 11px 22px;
	border: 2px solid var(--bo-accent) !important;
	border-radius: 999px;
	background: var(--bo-accent) !important;
	color: #fff !important;
	font-weight: 600;
	font-size: 0.95em;
	line-height: 1.2;
	text-decoration: none !important;
	box-shadow: none;
	opacity: 1 !important;
	transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.bo-widget .bo-btn:hover,
.bo-widget .bo-btn:focus-visible,
.bo-widget .bo-btn:active {
	background: #fff !important;
	color: var(--bo-accent) !important;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
	transform: translateY(-1px);
	outline: none;
}

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

.bo-slider {
	position: relative;
}

.bo-track {
	display: flex;
	gap: var(--bo-gap);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	padding: 4px 2px 10px;
	outline: none;
}

.bo-track::-webkit-scrollbar {
	display: none;
}

.bo-track:focus-visible {
	box-shadow: 0 0 0 2px var(--bo-accent);
	border-radius: var(--bo-radius);
}

/* ---------- Karta ---------- */

.bo-card {
	flex: 0 0 calc((100% - (var(--bo-per-view) - 1) * var(--bo-gap)) / var(--bo-per-view));
	min-width: 0;
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 22px;
	background: var(--bo-card-bg);
	border: 1px solid var(--bo-border);
	border-radius: var(--bo-radius);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
	transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.bo-card:hover {
	border-color: rgba(0, 0, 0, 0.12);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.bo-card__head {
	display: flex;
	align-items: center;
	gap: 12px;
}

.bo-avatar {
	flex: 0 0 auto;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	font-size: 15px;
	letter-spacing: 0.02em;
	color: #fff;
	background: hsl(var(--bo-hue, 180), 45%, 55%);
}

.bo-card__author {
	font-weight: 600;
	line-height: 1.3;
}

.bo-card__date {
	display: block;
	font-size: 0.85em;
	color: var(--bo-muted);
}

.bo-card__text {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 6;
	line-clamp: 6;
	overflow: hidden;
	overflow-wrap: anywhere;
}

.bo-card.is-expanded .bo-card__text {
	display: block;
	-webkit-line-clamp: unset;
	line-clamp: unset;
}

.bo-widget .bo-more {
	align-self: flex-start;
	margin: -4px 0 0;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
	color: var(--bo-accent);
	font: inherit;
	font-size: 0.9em;
	font-weight: 600;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
}

.bo-widget .bo-more[hidden] {
	display: none !important;
}

.bo-widget .bo-more,
.bo-widget .bo-more:hover,
.bo-widget .bo-more:focus,
.bo-widget .bo-more:active {
	background: none !important;
	color: var(--bo-accent) !important;
	border: 0 !important;
	box-shadow: none !important;
	opacity: 1 !important;
}

.bo-widget .bo-more:hover,
.bo-widget .bo-more:focus-visible {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.bo-card__meta {
	overflow-wrap: anywhere;
	font-size: 0.85em;
	color: var(--bo-muted);
}

.bo-card__reply {
	padding: 10px 12px;
	border-left: 3px solid var(--bo-accent);
	border-radius: 0 8px 8px 0;
	background: rgba(0, 0, 0, 0.03);
	font-size: 0.9em;
}

.bo-card__reply-label {
	display: block;
	font-size: 0.8em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--bo-muted);
	margin-bottom: 2px;
}

.bo-card__foot {
	margin-top: auto;
	padding-top: 8px;
	font-size: 0.8em;
	color: var(--bo-muted);
}

.bo-card__foot a {
	color: inherit !important;
	text-decoration: none !important;
}

.bo-card__foot a:hover,
.bo-card__foot a:focus-visible {
	color: var(--bo-accent) !important;
	text-decoration: underline !important;
	text-underline-offset: 3px;
}

/* ---------- Strzałki ---------- */

.bo-widget .bo-nav {
	position: absolute;
	top: 50%;
	z-index: 2;
	width: 40px;
	height: 40px;
	margin: -20px 0 0;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--bo-border);
	border-radius: 50%;
	background: #fff !important;
	color: var(--bo-text) !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
	cursor: pointer;
	transition: opacity 0.2s ease, color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.bo-widget .bo-nav:hover,
.bo-widget .bo-nav:focus-visible,
.bo-widget .bo-nav:active {
	background: var(--bo-accent) !important;
	border-color: var(--bo-accent) !important;
	color: #fff !important;
	outline: none;
}

.bo-widget .bo-nav svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.4;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.bo-nav--prev { left: -20px; }
.bo-nav--next { right: -20px; }

.bo-widget .bo-nav[disabled] {
	opacity: 0;
	pointer-events: none;
}

.bo-slider.is-static .bo-nav {
	display: none;
}

@container bo (max-width: 580px) {
	.bo-nav--prev { left: 4px; }
	.bo-nav--next { right: 4px; }
	.bo-widget .bo-nav { width: 34px; height: 34px; margin-top: -17px; }
}

/* ---------- Kropki ---------- */

.bo-dots {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 14px;
}

.bo-widget .bo-dot {
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.18) !important;
	box-shadow: none !important;
	cursor: pointer;
	transition: width 0.25s ease, background 0.25s ease;
}

.bo-widget .bo-dot:hover {
	background: rgba(0, 0, 0, 0.35) !important;
}

.bo-widget .bo-dot.is-active,
.bo-widget .bo-dot.is-active:hover {
	width: 22px;
	background: var(--bo-accent) !important;
}

@media (prefers-reduced-motion: reduce) {
	.bo-track { scroll-behavior: auto; }
	.bo-widget .bo-btn,
	.bo-widget .bo-dot { transition: none; }
}
