/* ── Google Reviews Swiper – Frontend Styles ─────────────────────────────── */

/* Slider container */
.grs-slider {
	position: relative;
	width: 100%;
	overflow: hidden;
	/* Bottom padding lets arrows breathe; left/right use offset vars (default 0) */
	padding: 0 var(--grs-pr-d, 0px) 8px var(--grs-pl-d, 0px);
	padding-top: 20px;
}

@media (max-width: 767px) {
	.grs-slider {
		padding-left: var(--grs-pl-m, 0px);
		padding-right: var(--grs-pr-m, 0px);
		padding-top: 20px;
	}
}

/* Swiper needs overflow visible so side-peeking slides show */
.grs-slider .swiper {
	overflow: visible;
}

/* Each slide stretches to fill Swiper's height so equal-height cards work */
.grs-slider .swiper-slide {
	height: auto;
}

/* ── Review card ─────────────────────────────────────────────────────────── */

.grs-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	box-sizing: border-box;
	/* Inline styles from PHP override bg/radius/padding/shadow */
}

/* Header: avatar + name + date */
.grs-card__header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 10px;
}

/* Avatar image */
.grs-avatar {
	width: 44px;
	height: 44px;
	/*border-radius: 50% !important;*/
	object-fit: cover;
	flex-shrink: 0;
	background: none !important;
}

/* Placeholder when no photo URL */
.grs-avatar--init {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	font-weight: 700;
	background: #e1ecf4;
	color: #2271b1;
	user-select: none;
}

.grs-card__meta {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.grs-card__author {
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-weight: 600 !important;
}

.grs-date {
	font-size: 0.78rem;
	opacity: .65;
	display: block;
	margin-top: 1px;
}

/* Google Maps link — right-aligned in card header */
.grs-maps-link {
	margin-left: auto;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	color: #EA4335;
	opacity: .7;
	transition: opacity .2s, background .2s;
	text-decoration: none;
}
.grs-maps-link:hover {
	opacity: 1;
	background: rgba(234, 67, 53, 0.08);
}
.grs-maps-icon {
	display: block;
	fill: currentColor;
}

/* Stars */
.grs-stars {
	display: flex;
	gap: 2px;
	margin-bottom: 10px;
	line-height: 1;
}

.grs-star {
	display: block;
	flex-shrink: 0;
	width: 24px;
	height: 24px;
}

/* Review text */
.grs-card__text {
	font-size: 0.875rem;
	line-height: 1.65;
	flex: 1;
	word-break: break-word;
}

/* "Read more" button */
.grs-read-more {
	display: inline;
	margin: 0;
	padding: 0;
	background: none;
	border: none;
	cursor: pointer;
	font-family: inherit;
	opacity: .65;
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
	transition: opacity .15s;
	white-space: nowrap;
	padding: 0 !important;
	background: none !important;
	color: #108fb8 !important;
	font-size: 14px;
	font-weight: 400 !important;
	text-decoration: none !important;
}
.grs-read-more:hover {
	opacity: 1;
}

/* ── Review modal ────────────────────────────────────────────────────────── */

#grs-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}
#grs-modal[hidden] {
	display: none;
}

.grs-no-scroll {
	overflow: hidden !important;
}

.grs-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	backdrop-filter: blur(2px);
}

.grs-modal__box {
	position: relative;
	background: #fff;
	border-radius: 14px;
	padding: 36px 32px 32px;
	max-width: 560px;
	width: 100%;
	max-height: 85vh;
	overflow-y: auto;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
	outline: none;
}

.grs-modal__close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 34px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f0f0f1;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	color: #50575e;
	transition: background .15s, color .15s;
	flex-shrink: 0;
	padding: 0 !important;
	background: #f0f0f1 !important;
	text-decoration: none !important;
}
.grs-modal__close:hover {
	background: #1d2327;
	color: #fff;
}

.grs-modal__head {
	display: flex;
	flex-direction: column;
	gap: 3px;
	margin-bottom: 12px;
	padding-right: 40px;
}
.grs-modal__author {
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.2;
}
.grs-modal__date {
	font-size: 0.8rem;
	display: block;
}

.grs-modal__stars {
	margin-bottom: 16px;
}

.grs-modal__text {
	font-size: 0.95rem;
	line-height: 1.75;
	color: inherit;
	white-space: pre-line;
	word-break: break-word;
}

@media ( max-width: 480px ) {
	.grs-modal__box {
		padding: 28px 20px 24px;
	}
}

/* ── Navigation arrows ───────────────────────────────────────────────────── */

.grs-slider .swiper-button-prev,
.grs-slider .swiper-button-next {
	--swiper-navigation-size: calc(var(--grs-arrow-size, 40px) * 0.45);
	width: var(--grs-arrow-size, 40px);
	height: var(--grs-arrow-size, 40px);
	background: var(--grs-arrow-bg, #fff);
	border-radius: var(--grs-arrow-radius, 50%);
	box-shadow: var(--grs-arrow-shadow, 0 2px 8px rgba(0,0,0,.15));
	color: var(--grs-arrow-color, #333);
	transition: background .2s, color .2s, box-shadow .2s;
}

.grs-slider .swiper-button-prev:hover,
.grs-slider .swiper-button-next:hover {
	background: #1d2327;
	color: #fff;
	box-shadow: 0 4px 12px rgba(0,0,0,.25);
}

.grs-slider .swiper-button-prev.swiper-button-disabled,
.grs-slider .swiper-button-next.swiper-button-disabled {
	opacity: .35;
	pointer-events: none;
}

/* Hide Swiper's built-in ::after chevron when a custom SVG icon is present */
.grs-slider .swiper-button-prev.grs-has-icon::after,
.grs-slider .swiper-button-next.grs-has-icon::after {
	display: none;
}

.grs-slider .swiper-button-prev.grs-has-icon > svg,
.grs-slider .swiper-button-next.grs-has-icon > svg {
	display: block;
	width: calc(var(--grs-arrow-size, 40px) * 0.5);
	height: calc(var(--grs-arrow-size, 40px) * 0.5);
	fill: currentColor;
	pointer-events: none;
}

/* ── Pagination ──────────────────────────────────────────────────────────── */

.grs-slider .swiper-pagination {
	position: static;
	margin-top: 20px;
}

.grs-slider .swiper-pagination-bullet {
	background: #ccc;
	opacity: 1;
	transition: background .2s, transform .2s;
}

.grs-slider .swiper-pagination-bullet-active {
	background: #1d2327;
	transform: scale(1.25);
}

/* Fraction / progressbar */
.grs-slider .swiper-pagination-fraction {
	font-size: 0.8rem;
	color: #666;
}

.grs-slider .swiper-pagination-progressbar {
	background: #eee;
	height: 3px;
	border-radius: 2px;
}
.grs-slider .swiper-pagination-progressbar-fill {
	background: #1d2327;
	border-radius: 2px;
}

/* ── Empty state ─────────────────────────────────────────────────────────── */

.grs-empty {
	text-align: center;
	color: #888;
	padding: 32px;
	font-style: italic;
}

/* ── Coverflow effect: clip neighbours ───────────────────────────────────── */

.grs-slider .swiper-slide-shadow-left,
.grs-slider .swiper-slide-shadow-right {
	border-radius: inherit;
}
