/**
 * Ayonto Trustpilot Rating - Frontend Styles
 * Version: 0.1.1
 * Build: Build057 (100% Translation)
 */

/* ===========================
   Rating Widget Styles (Original Design)
   =========================== */

.atr-trustpilot-rating {
	flex-direction: column;
	gap: 8px;
	border-radius: 8px;
}

.atr-trustpilot-rating a {
	text-decoration: none;
	display: inline-flex;
	flex-direction: column;
	gap: 8px;
}

.atr-trustpilot-rating a:hover {
	text-decoration: none;
	filter: brightness(1.03);
}

.atr-trustpilot-rating .atr-label {
	font-weight: 700;
	text-transform: uppercase;
	font-size: 16px;
	text-decoration: none;
	order: 1;
}

.atr-trustpilot-rating .atr-stars {
	display: inline-flex;
	gap: 3px;
	order: 2;
}

.atr-trustpilot-rating .atr-star {
	width: 30px;
	height: 30px;
	position: relative;
	border-radius: 2px;
	overflow: hidden;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);
}

.atr-trustpilot-rating .atr-star::before {
	content: '★';
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -52%);
	font-size: 18px;
	color: #ffffff;
}

.atr-trustpilot-rating .atr-star-full {
	/* Color set via inline style */
}

.atr-trustpilot-rating .atr-star-empty {
	/* Color set via inline style */
}

.atr-trustpilot-rating .atr-star-partial {
	/* Gradient with precise percentage set via inline style (e.g. 30%, 70%) */
}

.atr-trustpilot-rating .atr-count {
	opacity: 1;
	font-size: 13px;
	margin-top: 2px;
	order: 3;
}

.atr-trustpilot-rating .atr-count span[itemprop="reviewCount"] {
	font-weight: 600;
}

@media (max-width: 480px) {
	.atr-trustpilot-rating .atr-label {
		font-size: 14px;
	}
	.atr-trustpilot-rating .atr-star {
		width: 24px;
		height: 24px;
	}
	.atr-trustpilot-rating .atr-star::before {
		font-size: 15px;
	}
}

/* ===========================
   Reviews Grid Styles
   =========================== */

.atr-reviews-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 2rem;
	margin: 2.5rem 0;
}

/* ===========================
   Review Card Styles
   =========================== */

.atr-review-card {
	border: 1px solid #e5e7eb;
	padding: 1.75rem;
	border-radius: 16px;
	background: #ffffff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
	transition: all 0.3s ease;
	position: relative;
}

.atr-review-card:hover {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	transform: translateY(-4px);
	border-color: #00b67a;
}

/* Review Header */
.atr-review-header {
	display: flex;
	align-items: center;
	margin-bottom: 1.25rem;
}

.atr-avatar {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 18px;
	margin-right: 14px;
	color: #ffffff;
	flex-shrink: 0;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.atr-meta {
	flex: 1;
	min-width: 0;
}

.atr-author {
	font-weight: 700;
	font-size: 16px;
	color: #111827;
	margin-bottom: 4px;
}

.atr-date {
	font-size: 14px;
	color: #6b7280;
}

/* Review Rating */
.atr-rating {
	margin-bottom: 0.75rem;
}

.atr-rating .atr-stars {
	display: inline-flex;
	gap: 3px;
}

/* Review Stars - Same design as rating widget */
.atr-review-card .atr-star {
	width: 24px;
	height: 24px;
	position: relative;
	border-radius: 2px;
	overflow: hidden;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);
}

.atr-review-card .atr-star::before {
	content: '★';
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -52%);
	font-size: 14px;
	color: #ffffff;
}

.atr-review-card .atr-star-full {
	/* Color set via inline style */
}

.atr-review-card .atr-star-empty {
	/* Color set via inline style */
}

.atr-review-card .atr-star-partial {
	/* Gradient with precise percentage set via inline style (e.g. 30%, 70%) */
}

/* Review Content */
.atr-headline {
	font-size: 17px;
	font-weight: 700;
	margin: 0 0 0.75rem;
	color: #111827;
	line-height: 1.4;
}

.atr-body {
	margin: 0 0 1rem;
	font-size: 15px;
	color: #4b5563;
	line-height: 1.7;
}

.atr-read-more {
	font-size: 14px;
	color: #00b67a;
	text-decoration: none;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	transition: all 0.2s ease;
}

.atr-read-more:hover {
	color: #00a067;
	gap: 8px;
}

.atr-read-more::after {
	content: '→';
	font-size: 16px;
}

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

@media (max-width: 640px) {
	.atr-reviews-grid {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}

	.atr-review-card {
		padding: 1.5rem;
	}

	.atr-avatar {
		width: 48px;
		height: 48px;
		font-size: 16px;
	}

	.atr-headline {
		font-size: 16px;
	}

	.atr-body {
		font-size: 14px;
	}

	.atr-review-card .atr-star {
		width: 20px;
		height: 20px;
	}

	.atr-review-card .atr-star::before {
		font-size: 12px;
	}
}

@media (min-width: 1200px) {
	.atr-reviews-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* ===========================
   NEW Build046: Layout & Alignment
   =========================== */

/* Base: Make wrapper a flex container */
.atr-trustpilot-rating {
	display: flex;
	width: 100%; /* Volle Breite damit Ausrichtung funktioniert */
}

/* Layout: Inline (Horizontal) */
.atr-trustpilot-rating.atr-layout-inline {
	flex-direction: row; /* Widget positioniert sich horizontal im Container */
}

.atr-trustpilot-rating.atr-layout-inline a {
	flex-direction: row;
	align-items: center;
	gap: 12px;
}

.atr-trustpilot-rating.atr-layout-inline .atr-label,
.atr-trustpilot-rating.atr-layout-inline .atr-stars,
.atr-trustpilot-rating.atr-layout-inline .atr-count {
	order: 0; /* Reset order for inline layout */
}

/* Layout: Stacked (Vertical) - Default */
.atr-trustpilot-rating.atr-layout-stacked {
	flex-direction: column; /* Container selbst ist vertikal */
}

.atr-trustpilot-rating.atr-layout-stacked a {
	flex-direction: column;
	gap: 8px;
}

/* Alignment: Left (Default) */
/* Stacked Layout: Widget links positionieren */
.atr-trustpilot-rating.atr-align-left.atr-layout-stacked {
	justify-content: flex-start;
}

.atr-trustpilot-rating.atr-align-left.atr-layout-stacked a {
	align-items: flex-start; /* Inhalt linksbündig bei stacked */
}

/* Inline Layout: Widget bleibt links (justify-content nicht ändern), nur vertikale Text-Ausrichtung */
.atr-trustpilot-rating.atr-align-left.atr-layout-inline {
	justify-content: flex-start; /* Widget horizontal links */
}

.atr-trustpilot-rating.atr-align-left.atr-layout-inline a {
	align-items: flex-start; /* Text vertikal oben */
}

/* Alignment: Center */
/* Stacked Layout: Widget zentriert */
.atr-trustpilot-rating.atr-align-center.atr-layout-stacked {
	justify-content: center;
	text-align: center;
}

.atr-trustpilot-rating.atr-align-center.atr-layout-stacked a {
	align-items: center; /* Inhalt zentriert */
}

/* Inline Layout: Widget bleibt links, Text vertikal mittig */
.atr-trustpilot-rating.atr-align-center.atr-layout-inline {
	justify-content: flex-start; /* Widget horizontal links (NICHT center!) */
}

.atr-trustpilot-rating.atr-align-center.atr-layout-inline a {
	align-items: center; /* Text vertikal mittig */
}

/* Alignment: Right */
/* Stacked Layout: Widget rechts */
.atr-trustpilot-rating.atr-align-right.atr-layout-stacked {
	justify-content: flex-end;
	text-align: right;
}

.atr-trustpilot-rating.atr-align-right.atr-layout-stacked a {
	align-items: flex-end; /* Inhalt rechtsbündig */
}

/* Inline Layout: Widget bleibt links, Text vertikal unten */
.atr-trustpilot-rating.atr-align-right.atr-layout-inline {
	justify-content: flex-start; /* Widget horizontal links (NICHT flex-end!) */
}

.atr-trustpilot-rating.atr-align-right.atr-layout-inline a {
	align-items: flex-end; /* Text vertikal unten */
}

/* Size: Small (20px stars) */
.atr-trustpilot-rating.atr-size-small .atr-star {
	width: 20px;
	height: 20px;
}

.atr-trustpilot-rating.atr-size-small .atr-star::before {
	font-size: 12px;
	line-height: 20px;
}

.atr-trustpilot-rating.atr-size-small .atr-label {
	font-size: 14px;
}

.atr-trustpilot-rating.atr-size-small .atr-count {
	font-size: 13px;
}

/* Size: Medium (30px stars) - Default */
.atr-trustpilot-rating.atr-size-medium .atr-star {
	width: 30px;
	height: 30px;
}

.atr-trustpilot-rating.atr-size-medium .atr-star::before {
	font-size: 18px;
	line-height: 30px;
}

.atr-trustpilot-rating.atr-size-medium .atr-label {
	font-size: 16px;
}

.atr-trustpilot-rating.atr-size-medium .atr-count {
	font-size: 14px;
}

/* Size: Large (40px stars) */
.atr-trustpilot-rating.atr-size-large .atr-star {
	width: 40px;
	height: 40px;
}

.atr-trustpilot-rating.atr-size-large .atr-star::before {
	font-size: 24px;
	line-height: 40px;
}

.atr-trustpilot-rating.atr-size-large .atr-label {
	font-size: 18px;
}

.atr-trustpilot-rating.atr-size-large .atr-count {
	font-size: 16px;
}

/* Responsive: Mobile anpassen */
@media (max-width: 640px) {
	/* Inline-Layout auf Mobile stacken */
	.atr-trustpilot-rating.atr-layout-inline a {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}
	
	/* Center-Alignment auf Mobile beibehalten */
	.atr-trustpilot-rating.atr-align-center.atr-layout-inline a {
		align-items: center;
	}
	
	/* Right-Alignment auf Mobile beibehalten */
	.atr-trustpilot-rating.atr-align-right.atr-layout-inline a {
		align-items: flex-end;
	}
}

/* ===========================
   Print Styles
   =========================== */

@media print {
	.atr-review-card {
		break-inside: avoid;
		page-break-inside: avoid;
	}
}
