/* STWB Google Reviews — widget styles */

/* ── Wrapper ─────────────────────────────────────────────── */
.stwb-gr-wrapper {
	width: 100%;
	position: relative;
}

/* ── Grid layout ─────────────────────────────────────────── */
.stwb-gr-layout-grid .stwb-gr-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

@media (max-width: 1024px) {
	.stwb-gr-layout-grid .stwb-gr-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 767px) {
	.stwb-gr-layout-grid .stwb-gr-grid {
		grid-template-columns: 1fr;
	}
}

/* ── Carousel — base ─────────────────────────────────────── */
/* Nie używamy klasy .swiper żeby Elementor nie przejął inicjalizacji.
   Replikujemy tu niezbędne style bazowe Swipera. */
.stwb-gr-swiper {
	position: relative;
	overflow: hidden;
	padding-bottom: 40px;
	z-index: 1;
}

.stwb-gr-swiper .swiper-wrapper {
	position: relative;
	width: 100%;
	height: 100%;
	z-index: 1;
	display: flex;
	transition-property: transform;
	box-sizing: content-box;
}

.stwb-gr-swiper .swiper-slide {
	flex-shrink: 0;
	width: 100%;
	position: relative;
	height: auto;
	transition-property: transform;
}

/* ── Navigation ──────────────────────────────────────────── */
/* Reset wartości Swipera: stałe width/height i margin-top rozjeżdżają się z paddingiem */
.stwb-gr-wrapper .swiper-button-prev,
.stwb-gr-wrapper .swiper-button-next {
	position: absolute;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	height: auto;
	margin-top: 0;
	z-index: 10;
	cursor: pointer;
	color: var(--stwb-gr-arrow-normal-color, #333);
	transition: color 0.3s, background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.stwb-gr-wrapper .swiper-button-prev:hover,
.stwb-gr-wrapper .swiper-button-next:hover {
	color: var(--stwb-gr-arrow-hover-color, var(--stwb-gr-arrow-normal-color, #333));
}

/* Ukryj domyślną ikonę Swipera — używamy własnych */
.stwb-gr-wrapper .swiper-button-prev::after,
.stwb-gr-wrapper .swiper-button-next::after {
	display: none;
}

/* Rozmiar ikony */
.stwb-gr-wrapper .swiper-button-prev i,
.stwb-gr-wrapper .swiper-button-next i {
	font-size: var(--stwb-gr-arrow-size, 20px);
	line-height: 1;
}

.stwb-gr-wrapper .swiper-button-prev svg,
.stwb-gr-wrapper .swiper-button-next svg {
	width: var(--stwb-gr-arrow-size, 20px);
	height: var(--stwb-gr-arrow-size, 20px);
	fill: currentColor;
	display: block;
}

/* Pozycjonowanie przez CSS vars (ustawiane przez kontrolki orientacji + offset) */
.stwb-gr-wrapper .swiper-button-prev {
	left: calc(var(--stwb-gr-arrow-prev-left-align, 0%) + var(--stwb-gr-arrow-prev-left-offset, 0px));
	top: calc(var(--stwb-gr-arrow-prev-top-align, 50%) + var(--stwb-gr-arrow-prev-top-offset, 0px));
	transform: translate(var(--stwb-gr-arrow-prev-translate-x, 0px), var(--stwb-gr-arrow-prev-translate-y, -50%));
	right: auto;
}

.stwb-gr-wrapper .swiper-button-next {
	right: calc(var(--stwb-gr-arrow-next-right-align, 0%) + var(--stwb-gr-arrow-next-right-offset, 0px));
	top: calc(var(--stwb-gr-arrow-next-top-align, 50%) + var(--stwb-gr-arrow-next-top-offset, 0px));
	transform: translate(var(--stwb-gr-arrow-next-translate-x, 0%), var(--stwb-gr-arrow-next-translate-y, -50%));
	left: auto;
}

/* ── Navigation — outside ────────────────────────────────── */
.stwb-gr-arrows-position-outside .stwb-gr-wrapper {
	padding-left: 48px;
	padding-right: 48px;
}

/* ── Pagination ───────────────────────────────────────────── */
.stwb-gr-swiper .swiper-pagination-bullet-active {
	background: #333;
}

/* Progressbar */
.stwb-gr-swiper .swiper-pagination-progressbar {
	background: rgba(0, 0, 0, 0.1);
	height: 3px;
	bottom: 8px;
	top: auto;
}

.stwb-gr-swiper .swiper-pagination-progressbar-fill {
	background: #333;
}

/* Fraction */
.stwb-gr-swiper .swiper-pagination-fraction {
	font-size: 0.85rem;
	color: #555;
	bottom: 8px;
}

/* ── Scrollbar ────────────────────────────────────────────── */
.stwb-gr-swiper .swiper-scrollbar {
	background: rgba(0, 0, 0, 0.1);
	height: 4px;
	border-radius: 2px;
	bottom: 4px;
}

.stwb-gr-swiper .swiper-scrollbar-drag {
	background: #555;
	border-radius: 2px;
}

/* ── Coverflow ────────────────────────────────────────────── */
.stwb-gr-swiper.swiper-coverflow .swiper-slide {
	opacity: 0.6;
	transition: opacity 0.3s;
}

.stwb-gr-swiper.swiper-coverflow .swiper-slide-active {
	opacity: 1;
}

/* ── Card ────────────────────────────────────────────────── */
.stwb-gr-card {
	background-color: #fff;
	border-radius: 12px;
	padding: 24px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	height: 100%;
	box-sizing: border-box;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* ── Card header: avatar + meta ──────────────────────────── */
.stwb-gr-card__header {
	display: flex;
	align-items: center;
	gap: 12px;
}

.stwb-gr-avatar {
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	overflow: hidden;
}

.stwb-gr-avatar__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.stwb-gr-avatar__initials {
	width: 100%;
	height: 100%;
	background-color: #4285f4;
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	user-select: none;
}

.stwb-gr-card__meta {
	display: flex;
	flex-direction: column;
	gap: 2px;
	overflow: hidden;
}

.stwb-gr-card__author {
	font-weight: 600;
	font-size: 0.9rem;
	color: #1a1a1a;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.stwb-gr-card__date {
	font-size: 0.78rem;
	color: #888;
}

/* ── Stars ───────────────────────────────────────────────── */
.stwb-gr-stars {
	display: flex;
	align-items: center;
	gap: 2px;
}

.stwb-gr-star {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

.stwb-gr-star--filled {
	fill: #f5a623;
	color: #f5a623;
}

.stwb-gr-star--half {
	color: #f5a623;
}

.stwb-gr-star--empty {
	fill: #ddd;
	color: #ddd;
}

/* ── Review text ─────────────────────────────────────────── */
.stwb-gr-card__text {
	flex: 1;
}

.stwb-gr-card__body {
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.6;
	color: #444;
}

.stwb-gr-readmore {
	background: none;
	border: none;
	padding: 0;
	margin-top: 4px;
	font-size: 0.85em;
	color: #4285f4;
	cursor: pointer;
	text-decoration: underline;
	display: inline-block;
}

.stwb-gr-readmore:hover {
	color: #1a73e8;
}

/* ── Card footer: Google logo ────────────────────────────── */
.stwb-gr-card__footer {
	display: flex;
	justify-content: flex-end;
	margin-top: auto;
}

.stwb-gr-google-logo {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}

/* ── Notice (brak danych / błąd) ─────────────────────────── */
.stwb-gr-notice {
	padding: 16px;
	background: #f0f6fc;
	border: 1px solid #c0d8f0;
	border-radius: 6px;
	color: #555;
	font-size: 0.9rem;
}

.stwb-gr-notice p {
	margin: 0;
}
