/**
 * Review Listing — [weprocta_reviews]
 * Treatwell-style review listing with sidebar filters.
 * Mobile-first.
 *
 * @package WeProCTA
 * @since   5.1.0
 */

/* Container */
.weprocta-rl {
	width: 100%;
	font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	color: #2D3B3E;
}

/* ==========================================================================
   Rating Summary Header
   ========================================================================== */
.weprocta-rl__header {
	display: flex;
	align-items: center;
	gap: 12px;
}

.weprocta-rl__header-score {
	font-size: 42px;
	font-weight: 800;
	color: #A48D60;
	line-height: 1;
	letter-spacing: -0.02em;
}

.weprocta-rl__header-meta {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.weprocta-rl__header-stars {
	display: flex;
	gap: 2px;
}

.weprocta-rl__header-count {
	font-size: 13px;
	color: #6b7280;
	font-weight: 500;
}

/* Layout — stacked on mobile, sidebar+cards on tablet+ */
.weprocta-rl__layout {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */
.weprocta-rl__sidebar {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.weprocta-rl__filter-box {
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 14px;
}

.weprocta-rl__filter-title {
	font-size: 13px;
	font-weight: 600;
	color: #374151;
	margin: 0 0 12px;
}

/* Treatment dropdown */
.weprocta-rl__treatment-select {
	width: 100%;
	padding: 8px 12px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 14px;
	color: #2D3B3E;
	background: #fff;
	cursor: pointer;
}

.weprocta-rl__treatment-select:focus {
	outline: none;
	border-color: #A48D60;
	box-shadow: 0 0 0 3px rgba(164, 141, 96, 0.1);
}

/* ==========================================================================
   Star Histogram
   ========================================================================== */
.weprocta-rl__histogram {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.weprocta-rl__hist-row {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	padding: 4px 0;
	border-radius: 4px;
	transition: background 0.15s ease;
}

.weprocta-rl__hist-row:hover {
	background: #f9fafb;
}

.weprocta-rl__hist-row--active {
	background: rgba(164, 141, 96, 0.06);
}

.weprocta-rl__hist-check {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	accent-color: #A48D60;
	cursor: pointer;
}

.weprocta-rl__hist-stars {
	display: flex;
	gap: 1px;
	flex-shrink: 0;
}

.weprocta-rl__hist-star {
	font-size: 14px;
	color: #d1d5db;
	line-height: 1;
}

.weprocta-rl__hist-star--filled {
	color: #F5C518;
}

.weprocta-rl__hist-bar-wrap {
	flex: 1;
	height: 8px;
	background: #f3f4f6;
	border-radius: 4px;
	overflow: hidden;
	min-width: 40px;
}

.weprocta-rl__hist-bar {
	height: 100%;
	background: #F5C518;
	border-radius: 4px;
	min-width: 2px;
}

.weprocta-rl__hist-count {
	font-size: 13px;
	font-weight: 600;
	color: #374151;
	min-width: 36px;
	text-align: right;
	font-variant-numeric: tabular-nums;
}

/* Platform links */
.weprocta-rl__platform-links {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.weprocta-rl__platform-link {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 10px 14px;
	border: 1px solid color-mix(in srgb, var(--pl-color, #6b7280) 25%, transparent);
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	color: var(--pl-color, #6b7280);
	text-decoration: none;
	transition: background 0.15s ease;
}

.weprocta-rl__platform-link:hover {
	background: color-mix(in srgb, var(--pl-color, #6b7280) 6%, transparent);
	text-decoration: none;
}

@supports not (background: color-mix(in srgb, red 10%, transparent)) {
	.weprocta-rl__platform-link {
		border-color: #e5e7eb;
	}
	.weprocta-rl__platform-link:hover {
		background: #f9fafb;
	}
}

/* Verified box */
.weprocta-rl__verified-box {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 16px;
}

.weprocta-rl__verified-icon {
	flex-shrink: 0;
	padding-top: 2px;
}

.weprocta-rl__verified-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	font-size: 13px;
	color: #6b7280;
	line-height: 1.4;
}

.weprocta-rl__verified-text strong {
	color: #2D3B3E;
	font-size: 14px;
}

/* ==========================================================================
   Review Cards
   ========================================================================== */
.weprocta-rl__cards {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.weprocta-rl__card {
	padding: 20px 0;
	border-bottom: 1px solid #f1f5f9;
}

.weprocta-rl__card:first-child {
	padding-top: 0;
}

.weprocta-rl__card:last-child {
	border-bottom: none;
}

/* Hidden by filter */
.weprocta-rl__card--hidden {
	display: none;
}

/* Stars */
.weprocta-rl__card-stars {
	display: flex;
	gap: 2px;
	margin-bottom: 8px;
}

.weprocta-rl__card-star {
	font-size: 22px;
	color: #d1d5db;
	line-height: 1;
}

.weprocta-rl__card-star--filled {
	color: #F5C518;
}

/* Review text */
.weprocta-rl__card-text {
	font-size: 15px;
	line-height: 1.6;
	color: #1f2937;
	margin: 0 0 10px;
}

/* Treatment badge + employee */
.weprocta-rl__card-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 10px;
	font-size: 13px;
	color: #6b7280;
}

.weprocta-rl__card-treatment {
	display: inline-block;
	padding: 3px 10px;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 500;
	color: #374151;
	background: #fff;
}

.weprocta-rl__card-platform {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 10px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--pl-color, #6b7280);
	background: color-mix(in srgb, var(--pl-color, #6b7280) 8%, transparent);
	border: 1px solid color-mix(in srgb, var(--pl-color, #6b7280) 20%, transparent);
}

/* Fallback for browsers without color-mix */
@supports not (background: color-mix(in srgb, red 10%, transparent)) {
	.weprocta-rl__card-platform {
		background: #f3f4f6;
		border-color: #e5e7eb;
	}
}

/* Author footer */
.weprocta-rl__card-footer {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: #6b7280;
}

.weprocta-rl__card-author {
	font-weight: 600;
	color: #2D3B3E;
}

.weprocta-rl__card-verified {
	display: inline-flex;
	flex-shrink: 0;
}

.weprocta-rl__card-date {
	color: #9ca3b8;
}

/* ==========================================================================
   Tablet (>=768px) — sidebar left, cards right
   ========================================================================== */
@media (min-width: 768px) {

	.weprocta-rl__layout {
		flex-direction: row;
		align-items: flex-start;
		gap: 32px;
	}

	.weprocta-rl__sidebar {
		width: 280px;
		flex-shrink: 0;
		position: sticky;
		top: 80px;
	}

	.weprocta-rl__cards {
		flex: 1;
		min-width: 0;
	}
}

/* Desktop */
@media (min-width: 1024px) {

	.weprocta-rl__sidebar {
		width: 320px;
	}

	.weprocta-rl__layout {
		gap: 40px;
	}
}
