/**
 * Tunisia Local SEO Kit — Frontend Styles
 *
 * Google Reviews Widget — Dark & Light layouts.
 *
 * @package Tunisia_Local_SEO_Kit
 * @since   1.0.0
 */

/* ─── Root Variables ─────────────────────── */
:root {
	--tnseo-rw-bg: #1a1a1a;
	--tnseo-rw-card-bg: #252525;
	--tnseo-rw-text: #e0e0e0;
	--tnseo-rw-text-secondary: #999999;
	--tnseo-rw-border: #333333;
	--tnseo-rw-accent: #f4b400;
	--tnseo-rw-accent-star: #f4b400;
	--tnseo-rw-star-empty: #555555;
	--tnseo-rw-radius: 10px;
	--tnseo-rw-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
	--tnseo-rw-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--tnseo-rw-font-ar: "Segoe UI", "Tahoma", "Arial", sans-serif;
}

/* ─── Widget Container ───────────────────── */
.tnseo-reviews-widget {
	background: var(--tnseo-rw-bg);
	color: var(--tnseo-rw-text);
	border-radius: var(--tnseo-rw-radius);
	box-shadow: var(--tnseo-rw-shadow);
	overflow: hidden;
	font-family: var(--tnseo-rw-font);
	max-width: 500px;
	margin: 16px 0;
	border: 1px solid var(--tnseo-rw-border);
}

/* RTL support for Arabic */
html[dir="rtl"] .tnseo-reviews-widget,
.tnseo-reviews-widget[dir="rtl"] {
	font-family: var(--tnseo-rw-font-ar);
	direction: rtl;
	text-align: right;
}

/* ─── Header Section ─────────────────────── */
.tnseo-reviews-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 20px 16px 20px;
	border-bottom: 1px solid var(--tnseo-rw-border);
}

.tnseo-reviews-place-info {
	flex: 1;
}

.tnseo-reviews-place-name {
	margin: 0 0 8px 0;
	font-size: 18px;
	font-weight: 700;
	color: #ffffff;
}

.tnseo-reviews-overall {
	display: flex;
	align-items: center;
	gap: 8px;
}

.tnseo-rating-stars {
	color: var(--tnseo-rw-accent-star);
	font-size: 18px;
	letter-spacing: 2px;
}

.tnseo-rating-value {
	font-size: 16px;
	font-weight: 700;
	color: #ffffff;
}

.tnseo-rating-count {
	font-size: 13px;
	color: var(--tnseo-rw-text-secondary);
}

.tnseo-reviews-cta {
	display: inline-block;
	padding: 8px 16px;
	background: var(--tnseo-rw-accent);
	color: #1a1a1a;
	text-decoration: none;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	transition: opacity 0.2s ease;
	white-space: nowrap;
}

.tnseo-reviews-cta:hover {
	opacity: 0.85;
	color: #1a1a1a;
	text-decoration: none;
}

/* ─── Reviews List ────────────────────────── */
.tnseo-reviews-list {
	padding: 0;
}

.tnseo-no-reviews {
	padding: 30px 20px;
	text-align: center;
	color: var(--tnseo-rw-text-secondary);
	font-size: 14px;
	margin: 0;
}

/* ─── Single Review Item ──────────────────── */
.tnseo-review-item {
	padding: 18px 20px;
	border-bottom: 1px solid var(--tnseo-rw-border);
	transition: background 0.2s ease;
}

.tnseo-review-item:last-child {
	border-bottom: none;
}

.tnseo-review-item:hover {
	background: rgba(255, 255, 255, 0.02);
}

.tnseo-review-header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
}

.tnseo-review-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid var(--tnseo-rw-border);
	flex-shrink: 0;
}

.tnseo-review-meta {
	flex: 1;
	min-width: 0;
}

.tnseo-review-author-name {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: #ffffff;
	margin-bottom: 2px;
}

.tnseo-review-rating {
	color: var(--tnseo-rw-accent-star);
	font-size: 13px;
	letter-spacing: 1px;
}

.tnseo-review-time {
	font-size: 11px;
	color: var(--tnseo-rw-text-secondary);
	white-space: nowrap;
	flex-shrink: 0;
}

.tnseo-review-text {
	font-size: 13px;
	line-height: 1.6;
	color: var(--tnseo-rw-text);
	margin-top: 8px;
}

.tnseo-review-text p {
	margin: 0;
}

.tnseo-review-text p + p {
	margin-top: 8px;
}

/* ─── Footer ──────────────────────────────── */
.tnseo-reviews-footer {
	padding: 12px 20px;
	border-top: 1px solid var(--tnseo-rw-border);
	text-align: center;
}

.tnseo-powered-by {
	font-size: 11px;
	color: var(--tnseo-rw-text-secondary);
	opacity: 0.6;
}

/* ─── Error State ─────────────────────────── */
.tnseo-reviews-error {
	background: #2a1a1a;
	color: #ff6b6b;
	padding: 16px;
	border-radius: var(--tnseo-rw-radius);
	border: 1px solid #442222;
	font-size: 14px;
	text-align: center;
	max-width: 500px;
	margin: 16px 0;
}

.tnseo-reviews-error p {
	margin: 0;
}

/* ─── Light Layout Overrides ──────────────── */
.tnseo-reviews-light {
	background: #ffffff;
	color: #1a1a1a;
	border: 1px solid #e0e0e0;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.tnseo-reviews-light .tnseo-reviews-place-name {
	color: #1a1a1a;
}

.tnseo-reviews-light .tnseo-rating-value {
	color: #1a1a1a;
}

.tnseo-reviews-light .tnseo-review-author-name {
	color: #1a1a1a;
}

.tnseo-reviews-light .tnseo-review-text {
	color: #444444;
}

.tnseo-reviews-light .tnseo-rating-stars {
	color: #f4a200;
}

.tnseo-reviews-light .tnseo-review-rating {
	color: #f4a200;
}

.tnseo-reviews-light .tnseo-review-item:hover {
	background: rgba(0, 0, 0, 0.02);
}

.tnseo-reviews-light .tnseo-reviews-header {
	border-bottom-color: #e0e0e0;
}

.tnseo-reviews-light .tnseo-review-item {
	border-bottom-color: #f0f0f0;
}

.tnseo-reviews-light .tnseo-reviews-footer {
	border-top-color: #e0e0e0;
}

.tnseo-reviews-light .tnseo-powered-by {
	color: #888888;
}

.tnseo-reviews-light .tnseo-rating-count {
	color: #888888;
}

.tnseo-reviews-light .tnseo-review-time {
	color: #888888;
}

.tnseo-reviews-light .tnseo-no-reviews {
	color: #888888;
}

.tnseo-reviews-light .tnseo-review-avatar {
	border-color: #e0e0e0;
}

/* ─── Responsive ──────────────────────────── */
@media (max-width: 480px) {
	.tnseo-reviews-widget {
		max-width: 100%;
		margin: 12px 0;
	}

	.tnseo-reviews-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
		padding: 16px;
	}

	.tnseo-review-item {
		padding: 14px 16px;
	}

	.tnseo-review-header {
		gap: 8px;
	}

	.tnseo-review-avatar {
		width: 36px;
		height: 36px;
	}
}