/* GReview Widget */

.ir-widget {
	/*
	 * min() statt 100%: Manche Seitenbaukästen setzen dem umgebenden Container
	 * eine feste Pixelbreite (z. B. 1200px), die auf schmalen Geräten nicht
	 * mitschrumpft. Das Widget würde dann seitlich abgeschnitten und hielte
	 * sich selbst für breiter als der Bildschirm, wodurch die Umbruchpunkte
	 * nie greifen. Die Begrenzung auf die Fensterbreite fängt das ab.
	 */
	max-width: min(100%, 100vw);
	box-sizing: border-box;
	margin: 0 auto;
	/* Schrift kommt vom Theme; Akzentfarbe per Einstellung überschreibbar (--greview-accent) */
	font-family: inherit;
	-webkit-font-smoothing: antialiased;
}

/* Slider Container */
.ir-slider {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
}

.ir-track-wrapper {
	overflow: hidden;
	flex: 1;
	min-width: 0;
}

.ir-track {
	display: flex;
	transition: transform 0.4s ease;
	gap: 16px;
}

/* Cards */
.ir-card {
	flex: 0 0 calc(33.333% - 11px);
	min-width: 0;
	background: #fff;
	border: 1px solid #e8e8e8;
	border-radius: 8px;
	padding: 20px 18px 16px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.ir-card-inner {
	flex: 1;
}

/* Stars */
.ir-stars {
	display: flex;
	gap: 2px;
	margin-bottom: 10px;
}

.ir-star {
	display: inline-block;
	vertical-align: middle;
}

/* Review Text */
.ir-text {
	font-size: 14px;
	line-height: 1.5;
	color: #3c4043;
	margin-bottom: 12px;
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
	word-break: break-word;
}

.ir-text.ir-expanded {
	-webkit-line-clamp: unset;
	overflow: visible;
}

.ir-text.ir-clamped + .ir-readmore {
	display: inline;
}

/*
 * Themes stylen nackte <button>-Elemente oft global (Neve z. B. mit Markenfarbe,
 * Padding, Fettschrift, Versalien). Diese Eigenschaften hier zurücksetzen, damit
 * Pfeile, Punkte und der Weiterlesen-Link überall gleich aussehen. Steht bewusst
 * vor den Einzelregeln, damit deren eigene Werte gewinnen.
 */
.ir-arrow,
.ir-dot,
.ir-readmore {
	-webkit-appearance: none;
	appearance: none;
	font-family: inherit;
	font-weight: 400;
	line-height: normal;
	letter-spacing: normal;
	text-transform: none;
	text-align: inherit;
	box-shadow: none;
	min-width: 0;
	min-height: 0;
	margin: 0;
}

.ir-readmore {
	display: none;
	font-size: 13px;
	color: var(--greview-accent, #1a73e8);
	cursor: pointer;
	border: none;
	background: none;
	padding: 0;
	margin-bottom: 12px;
}

.ir-readmore:hover {
	text-decoration: underline;
}

.ir-no-text {
	color: #9aa0a6;
}

/* Platform Icon */
.ir-platform {
	display: flex;
	justify-content: flex-end;
	margin-top: auto;
	margin-bottom: 8px;
}

/* Reviewer */
.ir-reviewer {
	display: flex;
	align-items: center;
	gap: 10px;
	padding-top: 12px;
	border-top: 1px solid #f1f3f4;
}

.ir-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.ir-avatar-initial {
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--greview-accent, #1a73e8);
	color: #fff;
	font-weight: 600;
	font-size: 16px;
}

.ir-name {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #202124;
}

.ir-date {
	display: block;
	font-size: 12px;
	color: #80868b;
}

/* Arrows */
.ir-arrow {
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid #dadce0;
	background: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #5f6368;
	transition: box-shadow 0.2s, border-color 0.2s;
	padding: 0;
	z-index: 2;
}

.ir-arrow:hover {
	border-color: #bdc1c6;
	box-shadow: 0 1px 6px rgba(0,0,0,0.1);
	color: #202124;
}

.ir-arrow:disabled {
	opacity: 0.3;
	cursor: default;
	box-shadow: none;
}

/* Dots */
.ir-dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 16px;
}

.ir-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #dadce0;
	border: none;
	padding: 0;
	cursor: pointer;
	transition: background 0.3s;
}

.ir-dot.ir-active {
	background: var(--greview-accent, #1a73e8);
}

/* Tritt ab vielen Seiten an die Stelle der Punkte */
.ir-counter {
	font-size: 13px;
	color: #5f6368;
	font-variant-numeric: tabular-nums;
}

/* Footer */
.ir-footer {
	text-align: center;
	margin-top: 20px;
	padding-top: 16px;
}

.ir-footer-link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: #5f6368;
	font-size: 13px;
}

.ir-footer-link:hover {
	color: #202124;
}

.ir-footer-text strong {
	color: #202124;
}

/* Transparenzhinweis unter dem Widget */
.ir-transparency {
	margin-top: 12px;
	font-size: 11px;
	line-height: 1.5;
	color: #80868b;
	text-align: center;
}

/* ========================================================================= */
/* Abschlusskarte: Verweis auf das vollstaendige Google-Profil                */
/* ========================================================================= */

.ir-card-end {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	gap: 10px;
}

.ir-card-end .ir-stars {
	justify-content: center;
	margin-bottom: 0;
}

.ir-end-rating {
	font-size: 14px;
	font-weight: 600;
	color: #202124;
}

.ir-end-count {
	font-size: 13px;
	color: #5f6368;
}

/*
 * Der Knopf ist ein <a>, kein <button>, trotzdem greifen viele Themes ueber
 * generische Link-Styles zu. Deshalb dieselben Eigenschaften zuruecksetzen wie
 * beim Reset-Block der Slider-Buttons.
 */
.ir-end-btn {
	display: inline-block;
	background: var(--greview-accent, #1a73e8);
	color: #fff;
	padding: 10px 16px;
	border-radius: 6px;
	text-decoration: none;
	font-size: 13px;
	font-weight: 600;
	font-family: inherit;
	line-height: normal;
	letter-spacing: normal;
	text-transform: none;
	border: none;
	box-shadow: none;
}

.ir-end-btn:hover,
.ir-end-btn:focus {
	color: #fff;
	opacity: 0.88;
	text-decoration: none;
}

/* ========================================================================= */
/* Responsive */
/* ========================================================================= */

/* Tablet: 2 Karten */
@media (max-width: 960px) {
	.ir-card {
		flex: 0 0 calc(50% - 8px);
	}
}

/* Mobile: 1 Karte */
@media (max-width: 640px) {
	.ir-card {
		flex: 0 0 100%;
	}

	/*
	 * Auf schmalen Bildschirmen liegen die Pfeile ueber den Kartenraendern statt
	 * daneben. Nebeneinander fressen sie sonst rund ein Viertel der Breite und
	 * rutschen bei zu engen Containern ganz aus dem sichtbaren Bereich.
	 */
	.ir-slider {
		position: relative;
		gap: 0;
	}

	.ir-arrow {
		position: absolute;
		top: 50%;
		transform: translateY(-50%);
		width: 32px;
		height: 32px;
		background: rgba(255, 255, 255, 0.92);
		box-shadow: 0 1px 6px rgba(0, 0, 0, 0.18);
	}

	.ir-prev {
		left: 2px;
	}

	.ir-next {
		right: 2px;
	}

	/* Jede Karte bekommt ihre eigene Hoehe. Nebeneinander sind gleich hohe
	   Karten schoener, einzeln entsteht dadurch nur unnoetiger Leerraum. */
	.ir-track {
		align-items: flex-start;
	}

	/* Google-Icon nach links, damit es nicht unter dem rechten Pfeil liegt */
	.ir-platform {
		justify-content: flex-start;
	}

	.ir-arrow svg {
		width: 18px;
		height: 18px;
	}

	.ir-footer-link {
		flex-direction: column;
		gap: 6px;
	}

	.ir-footer-text {
		font-size: 12px;
	}

	.ir-text {
		font-size: 13px;
	}
}
