/* Reference cards for [skolasnu_references]. Scoped to avoid styling other CusRev views. */

.reviews-list.woop-order-reviews {
	--reviews-text: var(--e-global-color-text);
	--reviews-primary: var(--e-global-color-primary);
	--reviews-active: #D5F855;
	--reviews-background: #F5F7F8;
	--reviews-white: #FFFFFF;
	--reviews-star-icon: url("/wp-content/uploads/2026/09/Star-6.svg");

	width: 100%;
}

/* Dvousloupcový masonry výpis */
.reviews-list.woop-order-reviews .cr-all-reviews-shortcode ol.commentlist {
	width: 100%;
	margin: 0;
	padding: 0;
	columns: 2;
	column-gap: 64px;
	list-style: none;
}

/* Karta recenze */
.reviews-list.woop-order-reviews
	.cr-all-reviews-shortcode
	ol.commentlist
	> li.ss-review-card {
	display: inline-block;
	width: 100%;
	margin: 0 0 64px !important;
	padding: 64px 32px;
	overflow: hidden;
	break-inside: avoid;
	background-color: var(--reviews-white);
	border: 0;
	border-radius: 8px;
	box-sizing: border-box;
}

/* Reset původního CusRev designu */
.reviews-list.woop-order-reviews .ss-review-card__container {
	width: 100%;
	margin: 0;
	padding: 0;
	background: transparent;
	border: 0;
}

.reviews-list.woop-order-reviews .ss-review-card__body.comment-text-no-avatar {
	display: block;
	width: 100%;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
}

/* Horní řádek */
.reviews-list.woop-order-reviews .ss-review-card__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	width: 100%;
	margin-bottom: 32px;
}

/* Hodnocení */
.reviews-list.woop-order-reviews .ss-review-card__rating {
	position: relative;
	display: inline-block;
	flex-shrink: 0;
	margin: 0 !important;
	line-height: 0;
}

/* Obě vrstvy ratingu */
.reviews-list.woop-order-reviews .crstar-rating-svg .cr-rating-icon-base,
.reviews-list.woop-order-reviews .crstar-rating-svg .cr-rating-icon-frnt {
	display: flex;
	height: 30px;
	column-gap: 4px;
}

/* Dynamická vrchní vrstva */
.reviews-list.woop-order-reviews .crstar-rating-svg .cr-rating-icon-frnt {
	position: absolute;
	top: 0;
	left: 0;
	overflow: hidden;
}

/* Neviditelná vrstva určuje celkovou šířku */
.reviews-list.woop-order-reviews .crstar-rating-svg .cr-rating-icon-base {
	visibility: hidden;
}

/* Vlastní SVG hvězda */
.reviews-list.woop-order-reviews
	.crstar-rating-svg
	.cr-rating-icon-base
	.cr-rating-icon-bg,
.reviews-list.woop-order-reviews
	.crstar-rating-svg
	.cr-rating-icon-frnt
	.cr-rating-icon {
	display: block;
	width: 30px !important;
	height: 30px !important;
	min-width: 30px;
	flex: 0 0 30px;
	background-image: var(--reviews-star-icon);
	background-position: center;
	background-repeat: no-repeat;
	background-size: contain;
}

/* Datum – 18px / 400 */
.reviews-list.woop-order-reviews .ss-review-card__date {
	flex-shrink: 0;
	margin: 0;
	color: var(--reviews-text);
	font-size: 18px;
	font-style: normal;
	font-weight: 400;
	line-height: 1.3;
	white-space: nowrap;
}

/* Text recenze – 18px / italic / 400 */
.reviews-list.woop-order-reviews .ss-review-card__content {
	margin: 0 0 28px;
	color: var(--reviews-text);
}

.reviews-list.woop-order-reviews .ss-review-card__content .description {
	margin: 0;
}

.reviews-list.woop-order-reviews .ss-review-card__content .description p {
	margin: 0 !important;
	color: inherit;
	font-size: 18px;
	font-style: italic;
	font-weight: 400;
	line-height: 1.6;
	text-align: left;
}

/* Autor – 24px / 400 */
.reviews-list.woop-order-reviews .ss-review-card__author {
	margin: 0;
	color: var(--reviews-text);
	font-size: 24px;
	font-weight: 400;
	line-height: 1.3;
}

/* Customer photos of the review; each thumbnail links to the larger photo (lightbox). */
.reviews-list.woop-order-reviews .ss-review-card__body > .cr-comment-images {
	display: grid !important;
	grid-template-columns: repeat(3, 160px);
	gap: 16px;
	justify-content: start;
	width: 100%;
	margin: 28px 0 0 !important;
}

.reviews-list.woop-order-reviews .cr-comment-images::after {
	display: none;
}

/* Customer photos — 160 × 160 px, cropped */
.reviews-list.woop-order-reviews .cr-comment-images .woop-order-reviews__image {
	width: 160px !important;
	height: 160px !important;
	margin: 0 !important;
	overflow: hidden;
	background-color: var(--reviews-background);
	border: 0;
	border-radius: 8px;
	cursor: zoom-in;
}

.reviews-list.woop-order-reviews .cr-comment-images a.woop-order-reviews__image {
	display: block;
	text-decoration: none;
}

.reviews-list.woop-order-reviews .cr-comment-images a.woop-order-reviews__image:focus-visible {
	outline: 3px solid var(--reviews-primary);
	outline-offset: 2px;
}

.reviews-list.woop-order-reviews .cr-comment-images .woop-order-reviews__image img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	padding: 0;
	object-fit: cover;
	border-radius: 0;
	cursor: inherit;
}

/* Pagination */
.reviews-list.woop-order-reviews .woop-order-reviews__pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 12px;
	color: var(--reviews-text);
	font-size: 18px;
	font-weight: 500;
	line-height: 1;
}

/* Čísla stránek */
.reviews-list.woop-order-reviews .woop-order-reviews__pagination .woop-order-reviews__page {
	display: inline-flex;
	width: 64px;
	min-width: 64px;
	height: 64px;
	padding: 0;
	align-items: center;
	justify-content: center;
	color: var(--reviews-text);
	background-color: transparent;
	border: 2px solid var(--reviews-primary);
	border-radius: 10px;
	box-sizing: border-box;
	font-size: 20px;
	font-weight: 500;
	line-height: 1;
	text-decoration: none;
	box-shadow: none;
	transition:
		background-color 0.2s ease,
		border-color 0.2s ease;
}

/* Klikatelné stránky */
.reviews-list.woop-order-reviews .woop-order-reviews__pagination > a {
	cursor: pointer;
}

.reviews-list.woop-order-reviews .woop-order-reviews__pagination > a:hover {
	background-color: var(--reviews-active);
}

/* Override theme-generated link decorations; PHP supplies each label once. */
.reviews-list.woop-order-reviews .woop-order-reviews__pagination > a::before,
.reviews-list.woop-order-reviews .woop-order-reviews__pagination > a::after {
	content: none !important;
	display: none !important;
}

/* Aktivní stránka */
.reviews-list.woop-order-reviews .woop-order-reviews__pagination .woop-order-reviews__page--current {
	color: var(--reviews-text);
	background-color: var(--reviews-active);
	border-color: var(--reviews-primary);
	font-weight: 500;
}

/* Předchozí a následující */
.reviews-list.woop-order-reviews .woop-order-reviews__pagination .woop-order-reviews__page--prev,
.reviews-list.woop-order-reviews .woop-order-reviews__pagination .woop-order-reviews__page--next {
	display: inline-flex;
	width: auto;
	min-width: max-content;
	padding: 0 24px;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	box-sizing: border-box;
	font-size: 18px;
	white-space: nowrap;
}

/*
 * WordPress na první stránce nevypisuje odkaz Předchozí.
 * Vytvoříme jeho neklikací variantu.
 */
.reviews-list.woop-order-reviews
	.woop-order-reviews__pagination:not(:has(.woop-order-reviews__page--prev))::before {
	content: "Předchozí";
	display: inline-flex;
	height: 64px;
	padding: 0 24px;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	color: var(--reviews-text);
	background-color: transparent;
	border: 2px solid var(--reviews-primary);
	border-radius: 10px;
	box-sizing: border-box;
	font-size: 18px;
	font-weight: 500;
	line-height: 1;
	white-space: nowrap;
}

/* Tečky mezi stránkami */
.reviews-list.woop-order-reviews .woop-order-reviews__pagination .woop-order-reviews__page--dots {
	cursor: default;
}

/* 1366px a méně */
@media (max-width: 1366px) {
	.reviews-list.woop-order-reviews .cr-all-reviews-shortcode ol.commentlist {
		column-gap: 32px;
	}

	.reviews-list.woop-order-reviews
		.cr-all-reviews-shortcode
		ol.commentlist
		> li.ss-review-card {
		margin-bottom: 32px !important;
	}
}

/* Mobil */
@media (max-width: 767px) {
	.reviews-list.woop-order-reviews {
		--reviews-text: #01333C;
	}

	/* Jeden sloupec místo masonry, mezera 15px */
	.reviews-list.woop-order-reviews .cr-all-reviews-shortcode ol.commentlist {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		gap: 15px;
		columns: auto;
	}

	.reviews-list.woop-order-reviews
		.cr-all-reviews-shortcode
		ol.commentlist
		> li.ss-review-card {
		display: block;
		margin: 0 !important;
		padding: 25px;
		border-radius: 10px;
		box-shadow: none;
		font-family: "Barlow Semi Condensed", sans-serif;
	}

	/* Figma pořadí: hlavička, jméno, text, fotografie */
	.reviews-list.woop-order-reviews .ss-review-card__body.comment-text-no-avatar {
		display: flex;
		flex-direction: column;
	}

	.reviews-list.woop-order-reviews .ss-review-card__header {
		gap: 12px;
		margin-bottom: 18px;
	}

	/* Hvězdy 20 × 20 px, skupina 100 × 20 px */
	.reviews-list.woop-order-reviews .crstar-rating-svg .cr-rating-icon-base,
	.reviews-list.woop-order-reviews .crstar-rating-svg .cr-rating-icon-frnt {
		height: 20px;
		column-gap: 0;
	}

	.reviews-list.woop-order-reviews
		.crstar-rating-svg
		.cr-rating-icon-base
		.cr-rating-icon-bg,
	.reviews-list.woop-order-reviews
		.crstar-rating-svg
		.cr-rating-icon-frnt
		.cr-rating-icon {
		width: 20px !important;
		height: 20px !important;
		min-width: 20px;
		flex: 0 0 20px;
	}

	.reviews-list.woop-order-reviews .ss-review-card__date {
		font-size: 14px;
		line-height: 1.7;
		text-align: right;
	}

	.reviews-list.woop-order-reviews .ss-review-card__author {
		order: 2;
		font-size: 17px;
		line-height: 1.4;
		text-align: left;
		overflow-wrap: anywhere;
	}

	.reviews-list.woop-order-reviews .ss-review-card__content {
		order: 3;
		margin: 13px 0 0;
	}

	.reviews-list.woop-order-reviews .ss-review-card__content .description p {
		font-size: 14px;
		line-height: 1.7;
	}

	/* Hodnocení bez textu: jen hvězdy, datum a jméno */
	.reviews-list.woop-order-reviews .woop-order-reviews__card--no-text .ss-review-card__content {
		display: none;
	}

	/* Tři pružné sloupce: při 295px vnitřní šířky 85px fotky */
	.reviews-list.woop-order-reviews .ss-review-card__body > .cr-comment-images {
		order: 4;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 20px;
		margin-top: 20px !important;
	}

	.reviews-list.woop-order-reviews .cr-comment-images .woop-order-reviews__image {
		width: 100% !important;
		height: auto !important;
		aspect-ratio: 1 / 1;
		border-radius: 5px;
	}

	/* Mobilní pagination (Figma: 35px výška, mezera 10px) */
	.reviews-list.woop-order-reviews .woop-order-reviews__pagination {
		flex-wrap: nowrap;
		gap: 10px;
		margin-top: 20px;
	}

	.reviews-list.woop-order-reviews .woop-order-reviews__pagination .woop-order-reviews__page,
	.reviews-list.woop-order-reviews
		.woop-order-reviews__pagination:not(:has(.woop-order-reviews__page--prev))::before {
		display: inline-flex;
		width: 35px;
		min-width: 35px;
		max-width: 35px;
		height: 35px;
		padding: 0;
		align-items: center;
		justify-content: center;
		flex: 0 0 auto;
		box-sizing: border-box;
		color: #01333C;
		background-color: transparent;
		border: 1.5px solid #C4E842;
		border-radius: 10px;
		font-family: "Barlow Semi Condensed", sans-serif;
		font-size: 12px;
		font-weight: 500;
		line-height: 1.7;
		text-align: center;
		white-space: nowrap;
	}

	.reviews-list.woop-order-reviews .woop-order-reviews__pagination .woop-order-reviews__page--prev,
	.reviews-list.woop-order-reviews
		.woop-order-reviews__pagination:not(:has(.woop-order-reviews__page--prev))::before {
		width: 73px;
		min-width: 73px;
		max-width: 73px;
	}

	.reviews-list.woop-order-reviews .woop-order-reviews__pagination .woop-order-reviews__page--next {
		width: 74px;
		min-width: 74px;
		max-width: 74px;
	}

	.reviews-list.woop-order-reviews .woop-order-reviews__pagination .woop-order-reviews__page--current {
		background-color: #D5F855;
	}

	/*
	 * Více než tři stránky: zobrazit jen aktuální stránku a její sousedy,
	 * aby se vešly maximálně pět prvků (Předchozí, 3 čísla, Následující).
	 */
	.reviews-list.woop-order-reviews
		.woop-order-reviews__pagination--compact
		> :not(.woop-order-reviews__page--prev):not(.woop-order-reviews__page--next):not(.woop-order-reviews__page--current):not(.woop-order-reviews__page--current + *):not(:has(+ .woop-order-reviews__page--current)) {
		display: none;
	}
}

/* Úzké displeje: pět prvků = 292 px, při menší mezeře 276 px. */
@media (max-width: 359px) {
	.reviews-list.woop-order-reviews .woop-order-reviews__pagination {
		gap: 6px;
	}
}

/* AJAX loading state applied by order-references.js. */
.reviews-list.woop-order-reviews.cr-pagination-load {
	opacity: 0.45;
	pointer-events: none;
}

/* Photo lightbox (order-references-lightbox.js), a native modal <dialog> appended to <body>. */
html.woop-lightbox-open {
	overflow: hidden;
}

.woop-lightbox {
	position: fixed;
	inset: 0;
	width: 100%;
	max-width: none;
	height: 100%;
	max-height: none;
	margin: 0;
	padding: 0;
	overflow: hidden;
	color: #FFFFFF;
	background: transparent;
	border: 0;
}

.woop-lightbox::backdrop {
	background-color: rgba(1, 51, 60, 0.92);
}

.woop-lightbox__stage {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: 72px 88px;
	box-sizing: border-box;
}

.woop-lightbox__figure {
	max-width: 100%;
	max-height: 100%;
	margin: 0;
}

.woop-lightbox__image {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: calc(100vh - 144px);
	max-height: calc(100dvh - 144px);
	border-radius: 8px;
	object-fit: contain;
}

.woop-lightbox__error {
	margin: 0;
	font-size: 18px;
	text-align: center;
}

/* Theme button styles are reset; the dialog uses its own controls. */
.woop-lightbox .woop-lightbox__button {
	position: absolute;
	display: inline-flex;
	width: 48px;
	height: 48px;
	min-height: 0;
	padding: 0;
	align-items: center;
	justify-content: center;
	color: #FFFFFF;
	background-color: rgba(255, 255, 255, 0.16);
	border: 0;
	border-radius: 50%;
	box-shadow: none;
	font-size: 36px;
	line-height: 1;
	text-transform: none;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

/* Neutralise the theme's button focus colour; showModal() focuses the close button. */
.woop-lightbox .woop-lightbox__button:focus {
	color: #FFFFFF;
	background-color: rgba(255, 255, 255, 0.16);
}

.woop-lightbox .woop-lightbox__button:hover,
.woop-lightbox .woop-lightbox__button:focus-visible {
	color: #01333C;
	background-color: #D5F855;
}

.woop-lightbox .woop-lightbox__button:focus-visible {
	outline: 3px solid #D5F855;
	outline-offset: 3px;
}

.woop-lightbox .woop-lightbox__button[hidden] {
	display: none;
}

.woop-lightbox .woop-lightbox__button--close {
	top: 16px;
	right: 16px;
}

.woop-lightbox .woop-lightbox__button--previous,
.woop-lightbox .woop-lightbox__button--next {
	top: 50%;
	transform: translateY(-50%);
}

.woop-lightbox .woop-lightbox__button--previous {
	left: 24px;
}

.woop-lightbox .woop-lightbox__button--next {
	right: 24px;
}

.woop-lightbox__counter {
	position: absolute;
	bottom: 24px;
	left: 50%;
	margin: 0;
	font-size: 16px;
	line-height: 1.5;
	transform: translateX(-50%);
}

/* Mobil: šipky a počítadlo pod fotkou, aby nezakrývaly obraz. */
@media (max-width: 767px) {
	.woop-lightbox__stage {
		padding: 72px 12px 96px;
	}

	.woop-lightbox__image {
		max-height: calc(100vh - 168px);
		max-height: calc(100dvh - 168px);
	}

	.woop-lightbox .woop-lightbox__button--previous,
	.woop-lightbox .woop-lightbox__button--next {
		top: auto;
		bottom: 24px;
		transform: none;
	}

	.woop-lightbox .woop-lightbox__button--previous {
		left: 16px;
	}

	.woop-lightbox .woop-lightbox__button--next {
		right: 16px;
	}

	.woop-lightbox__counter {
		bottom: 36px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.woop-lightbox .woop-lightbox__button {
		transition: none;
	}
}
