/**
 * Synoveo Reviews Shortcode Styles
 *
 * Placeholder CSS for reviews display shortcode.
 * Styling will be enhanced in Task 4.
 *
 * @package Synoveo
 * @since 2.0.0
 */

/* Container */
.synoveo-reviews-container {
	margin: 20px 0;
	padding: 0;
}

/* Review Card */
.synoveo-review-card {
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 16px;
	margin-bottom: 16px;
	background-color: #ffffff;
}

.synoveo-review-card:last-child {
	margin-bottom: 0;
}

/* Review Header */
.synoveo-review-header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}

/* Reviewer Photo */
.synoveo-reviewer-photo {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
	background-color: #e5e7eb;
}

/* Placeholder when no photo available */
.synoveo-reviewer-photo-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
	color: #ffffff;
}

.synoveo-reviewer-initial {
	font-size: 20px;
	font-weight: 600;
	text-transform: uppercase;
	line-height: 1;
}

/* Reviewer Info */
.synoveo-reviewer-info {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

/* Reviewer Name */
.synoveo-reviewer-name {
	font-weight: 600;
	font-size: 16px;
	color: #333333;
}

/* Star Rating */
.synoveo-review-rating {
	display: inline-block;
}

.synoveo-stars {
	display: inline-flex;
	gap: 2px;
	color: #fbbf24;
	font-size: 18px;
}

.synoveo-star-filled {
	color: #fbbf24;
}

.synoveo-star-empty {
	color: #d1d5db;
}

/* Review Text */
.synoveo-review-text {
	font-size: 14px;
	line-height: 1.6;
	color: #555555;
	margin-bottom: 8px;
}

/* Review Time */
.synoveo-review-time {
	font-size: 12px;
	color: #999999;
}

/* Error State */
.synoveo-reviews-error {
	padding: 16px;
	background-color: #fee;
	border-left: 4px solid #dc2626;
	border-radius: 4px;
	color: #991b1b;
}

.synoveo-reviews-error p {
	margin: 0;
}

/* Empty State */
.synoveo-reviews-empty {
	padding: 16px;
	background-color: #f3f4f6;
	border-radius: 4px;
	text-align: center;
	color: #6b7280;
}

.synoveo-reviews-empty p {
	margin: 0;
}

/* Horizontal Carousel Layout - Google Style */
.synoveo-reviews-horizontal {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	padding: 8px 4px 16px 4px;
	margin: 0 -4px;
	-webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* Hide scrollbar but keep functionality */
.synoveo-reviews-horizontal::-webkit-scrollbar {
	height: 8px;
}

.synoveo-reviews-horizontal::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 4px;
}

.synoveo-reviews-horizontal::-webkit-scrollbar-thumb {
	background: #c1c1c1;
	border-radius: 4px;
}

.synoveo-reviews-horizontal::-webkit-scrollbar-thumb:hover {
	background: #a1a1a1;
}

.synoveo-reviews-horizontal .synoveo-review-card {
	margin-bottom: 0;
	min-width: 320px;
	max-width: 380px;
	flex-shrink: 0;
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.synoveo-reviews-horizontal .synoveo-review-card:hover {
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.12);
	transform: translateY(-2px);
}

.synoveo-reviews-horizontal .synoveo-review-text {
	flex: 1;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 5;
	-webkit-box-orient: vertical;
}

/* Rating Summary Styles */
.synoveo-rating-summary {
	margin: 20px 0;
	padding: 20px;
	background-color: #ffffff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	text-align: center;
}

.synoveo-rating-summary-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
}

.synoveo-rating-average {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}

.synoveo-rating-number {
	font-size: 48px;
	font-weight: 700;
	color: #333333;
	line-height: 1;
}

.synoveo-rating-average .synoveo-stars {
	font-size: 24px;
}

.synoveo-rating-count {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
}

.synoveo-review-count-number {
	font-size: 20px;
	font-weight: 600;
	color: #555555;
}

.synoveo-review-count-label {
	font-size: 14px;
	color: #999999;
	text-transform: lowercase;
}

/* Half Star Support */
.synoveo-star-half {
	position: relative;
	color: #d1d5db;
}

.synoveo-star-half::before {
	content: '★';
	position: absolute;
	left: 0;
	width: 50%;
	overflow: hidden;
	color: #fbbf24;
}

/* Rating Summary Error/Empty States */
.synoveo-rating-summary-error {
	padding: 16px;
	background-color: #fee;
	border-left: 4px solid #dc2626;
	border-radius: 4px;
	color: #991b1b;
}

.synoveo-rating-summary-error p {
	margin: 0;
}

.synoveo-rating-summary-empty {
	padding: 16px;
	background-color: #f3f4f6;
	border-radius: 4px;
	text-align: center;
	color: #6b7280;
}

.synoveo-rating-summary-empty p {
	margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
	.synoveo-review-card {
		padding: 12px;
	}

	.synoveo-reviewer-name {
		font-size: 14px;
	}

	.synoveo-review-text {
		font-size: 13px;
	}

	/* Keep carousel on mobile but adjust card size */
	.synoveo-reviews-horizontal .synoveo-review-card {
		min-width: 280px;
		max-width: 320px;
	}

	/* Smaller rating number on mobile */
	.synoveo-rating-number {
		font-size: 36px;
	}

	.synoveo-rating-average .synoveo-stars {
		font-size: 20px;
	}
}

/* Synoveo Branding (FREE plan) */
.synoveo-branding {
	text-align: center;
	padding: 12px 0 4px;
	font-size: 11px;
	opacity: 0.6;
	transition: opacity 0.2s ease;
}

.synoveo-branding:hover {
	opacity: 1;
}

.synoveo-branding a {
	color: inherit;
	text-decoration: none;
}
