/* Customer Reviews for WooCommerce — front-end UI */

:root {
	--crw-primary: #4f46e5;
	--crw-primary-dark: #4338ca;
	--crw-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
	--crw-star: #f59e0b;
	--crw-border: #e9e9f2;
	--crw-text-muted: #6b7280;
	--crw-shadow-soft: 0 2px 10px rgba(17, 24, 39, 0.05);
	--crw-shadow-lift: 0 16px 32px rgba(17, 24, 39, 0.1);
	--crw-widget-radius: 16px;
	/* Surface/text tokens — used throughout for card backgrounds and body
	   text so a single dark-mode block (below) can retheme every widget at
	   once. Light-mode values match the plugin's original hardcoded colors. */
	--crw-surface: #ffffff;
	--crw-surface-alt: #f9fafb;
	--crw-surface-hover: #f3f4f6;
	--crw-track: #e5e7eb;
	--crw-text: #111827;
	--crw-text-secondary: #374151;
	box-sizing: border-box;
}

/*
 * Dark mode support.
 *
 * Themes implement dark mode in wildly different ways — some just honour the
 * OS-level `prefers-color-scheme`, others toggle a class or data-attribute on
 * <html> or <body> via JS, and there's no reliable way to "detect" a theme's
 * dark mode from CSS alone. The --crw-surface/--crw-text/etc. tokens above
 * are what every widget/review/Q&A rule below is built from; the actual dark
 * palette is generated in PHP (CRW_Widgets::enqueue_assets()) based on the
 * Settings → General → "Dark mode support" option, and injected as either a
 * `prefers-color-scheme: dark` media query and/or rules scoped to whatever
 * selector(s) the site's theme uses to toggle dark mode (a bundled list of
 * common ones, plus any custom selector the site owner enters).
 */

/* Toast notifications (review submitted, question posted, etc.) */
.crw-toast-container {
	position: fixed;
	z-index: 100001;
	bottom: 24px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	pointer-events: none;
}

.crw-toast {
	pointer-events: auto;
	cursor: pointer;
	max-width: min(90vw, 420px);
	padding: 14px 20px;
	border-radius: 12px;
	font-size: 14px;
	font-weight: 600;
	color: #fff;
	box-shadow: 0 12px 28px -8px rgba(17, 24, 39, 0.35);
	opacity: 0;
	transform: translateY(12px);
	transition: opacity 0.25s ease, transform 0.25s ease;
}

.crw-toast.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.crw-toast-success {
	background: #111827;
}

.crw-toast-success::before {
	content: "✓ ";
}

.crw-toast-error {
	background: #dc2626;
}

.crw-toast-error::before {
	content: "! ";
}

@media ( max-width: 600px ) {
	.crw-toast-container {
		left: 16px;
		right: 16px;
		transform: none;
		bottom: 16px;
	}

	.crw-toast {
		max-width: none;
	}
}

/* Widget theme: Minimal — flat, monochrome, no gradients or soft shadows. */
body.crw-widget-theme-minimal {
	--crw-primary: #111827;
	--crw-primary-dark: #000000;
	--crw-gradient: #111827;
	--crw-star: #111827;
	--crw-shadow-soft: none;
	--crw-shadow-lift: none;
	--crw-widget-radius: 8px;
}

/* Widget theme: Bold — vivid gradient, larger radius, deeper shadow, bolder type. */
body.crw-widget-theme-bold {
	--crw-primary: #db2777;
	--crw-primary-dark: #be185d;
	--crw-gradient: linear-gradient(135deg, #db2777 0%, #7c3aed 60%, #4f46e5 100%);
	--crw-star: #f59e0b;
	--crw-shadow-soft: 0 6px 18px rgba(219, 39, 119, 0.12);
	--crw-shadow-lift: 0 20px 40px rgba(124, 58, 237, 0.22);
	--crw-widget-radius: 24px;
}

body.crw-widget-theme-bold .crw-review,
body.crw-widget-theme-bold .crw-carousel-card,
body.crw-widget-theme-bold .crw-summary,
body.crw-widget-theme-bold .crw-widget-preview-card,
body.crw-widget-theme-bold .crw-trust-badge {
	font-weight: 600;
}

.crw-reviews-layout {
	display: flex;
	align-items: flex-start;
	gap: 40px;
	max-width: 1100px;
	margin: 0 auto;
}

.crw-reviews-sidebar {
	flex: 0 0 280px;
	position: sticky;
	top: var(--crw-sticky-offset, 32px);
}

.crw-reviews-main {
	flex: 1;
	min-width: 0;
}

.crw-reviews-app {
	max-width: 100%;
}

.crw-summary {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 20px;
	max-width: 100%;
	padding: 26px 28px;
	border: 1px solid var(--crw-border);
	border-radius: var(--crw-widget-radius);
	margin-bottom: 0;
	background: var(--crw-summary-bg, linear-gradient(180deg, #fbfbff 0%, #f7f7fc 100%));
	box-shadow: var(--crw-shadow-soft);
}

.crw-summary-score {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	min-width: 140px;
}

a.crw-leave-review-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 12px 20px;
	border: none;
	border-radius: 999px;
	background: var(--crw-leave-review-bg, var(--crw-gradient)) !important;
	color: var(--crw-leave-review-text, #fff) !important;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	box-sizing: border-box;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

a.crw-leave-review-btn:hover,
a.crw-leave-review-btn:focus,
a.crw-leave-review-btn:visited {
	color: var(--crw-leave-review-text, #fff) !important;
}

a.crw-leave-review-btn:hover {
	transform: translateY(-1px);
	box-shadow: var(--crw-shadow-lift);
}

/* Below the sidebar breakpoint, drop back to a single stacked column and
   disable the sticky positioning so the score block doesn't overlap content. */
@media (max-width: 782px) {
	.crw-reviews-layout {
		flex-direction: column;
	}

	.crw-reviews-sidebar {
		position: static;
		width: 100%;
		flex-basis: auto;
	}
}

.crw-summary-average {
	font-size: 40px;
	font-weight: 800;
	line-height: 1;
	color: var(--crw-text, #111827);
}

.crw-summary-count {
	font-size: 13px;
	color: var(--crw-text-muted);
}

.crw-summary-bars {
	flex: 1;
	min-width: 220px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.crw-summary-bar-row {
	display: grid;
	grid-template-columns: 32px 1fr 32px;
	align-items: center;
	gap: 10px;
	background: none;
	border: none;
	color: var(--crw-text, #111827);
	cursor: pointer;
	padding: 2px 0;
	font-size: 13px;
	opacity: 1;
	transition: opacity 0.15s ease;
}

/* When a star row is selected as the active filter, fade the rest out a bit
   so the selection reads clearly at a glance; clearing the filter (handled in
   JS by removing both classes from every row) brings everything back to full
   opacity. */
.crw-summary-bar-row.is-dimmed {
	opacity: 0.45;
}

.crw-summary-bar-row.is-selected {
	opacity: 1;
}

.crw-bar-track {
	height: 8px;
	background: var(--crw-track, #e5e7eb);
	border-radius: 999px;
	overflow: hidden;
}

.crw-bar-fill {
	display: block;
	height: 100%;
	background: var(--crw-star);
	border-radius: 999px;
}

.crw-bar-count {
	text-align: right;
	color: var(--crw-text-muted);
}

/* Star display (read-only) */
.crw-stars {
	display: inline-flex;
	gap: 2px;
}

.crw-star-display {
	position: relative;
	width: 16px;
	height: 16px;
	background: var(--crw-track, #e5e7eb);
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2l3.09 6.26L22 9.27l-5 4.87L18.18 21 12 17.77 5.82 21 7 14.14 2 9.27l6.91-1.01L12 2z'/></svg>") no-repeat center / contain;
	mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2l3.09 6.26L22 9.27l-5 4.87L18.18 21 12 17.77 5.82 21 7 14.14 2 9.27l6.91-1.01L12 2z'/></svg>") no-repeat center / contain;
}

.crw-star-fill {
	position: absolute;
	inset: 0;
	background: var(--crw-star);
}

/* Star input (clickable) */
.crw-star-input {
	display: inline-flex;
	gap: 4px;
}

.crw-star-input .crw-star {
	background: none;
	border: none;
	cursor: pointer;
	padding: 2px;
	width: 28px;
	height: 28px;
	transition: transform 0.15s ease;
}

.crw-star-input .crw-star:hover {
	transform: scale(1.15);
}

.crw-star-input .crw-star.is-hover {
	transform: scale(1.15);
}

.crw-star-input-sm .crw-star {
	width: 20px;
	height: 20px;
}

.crw-star-input .crw-star svg {
	width: 100%;
	height: 100%;
	fill: #d1d5db;
	transition: fill 0.15s ease;
}

.crw-star-input .crw-star.is-active svg,
.crw-star-input .crw-star.is-hover svg {
	fill: var(--crw-star);
}

/* Toolbar */
.crw-toolbar {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-bottom: 20px;
}

.crw-toolbar-filters {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.crw-chip {
	border: 1px solid var(--crw-border);
	background: var(--crw-surface, #fff);
	color: var(--crw-text, #111827);
	border-radius: 999px;
	padding: 7px 16px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.crw-chip:hover {
	border-color: var(--crw-primary);
	color: var(--crw-primary-dark);
}

.crw-chip.is-active {
	background: var(--crw-gradient);
	border-color: transparent;
	color: #fff;
}

.crw-toolbar-sort select {
	border-radius: 999px;
	border-color: var(--crw-border);
}

.crw-toolbar-sort {
	display: flex;
	align-items: center;
	gap: 8px;
}

.crw-select {
	position: relative;
}

/* Visually hidden once the JS enhancement runs, but still present/functional as
   the single source of truth for the current value (screen readers + no-JS
   fallback both still see a plain, working <select>). */
.crw-select-native-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.crw-select-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	min-width: 160px;
	padding: 9px 14px;
	background: var(--crw-surface, #fff);
	border: 1px solid var(--crw-border);
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	color: var(--crw-text, #111827);
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.crw-select-trigger:hover {
	border-color: var(--crw-primary);
}

.crw-select-trigger[aria-expanded="true"] {
	border-color: var(--crw-primary);
	box-shadow: 0 0 0 3px rgba(0, 186, 111, 0.12);
}

.crw-select-caret {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	color: var(--crw-text-muted);
	transition: transform 0.15s ease;
}

.crw-select-trigger[aria-expanded="true"] .crw-select-caret {
	transform: rotate(180deg);
}

.crw-select-menu {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	z-index: 5;
	min-width: 180px;
	margin: 0 !important;
	padding: 6px !important;
	list-style: none !important;
	background: var(--crw-surface, #fff);
	border: 1px solid var(--crw-border);
	border-radius: 12px;
	box-shadow: var(--crw-shadow-lift, 0 12px 28px rgba(17, 24, 39, 0.12));
}

.crw-select-menu[hidden] {
	display: none;
}

.crw-select-menu li {
	margin: 0 !important;
	padding: 8px 10px !important;
	font-size: 13px;
	font-weight: 500;
	color: var(--crw-text, #111827);
	border-radius: 8px;
	list-style: none !important;
	list-style-image: none !important;
	cursor: pointer;
	transition: background 0.12s ease, color 0.12s ease;
}

.crw-select-menu li::marker {
	content: none;
}

.crw-select-menu li:hover {
	background: var(--crw-surface-hover, #f3f4f6);
}

.crw-select-menu li[aria-selected="true"] {
	background: var(--crw-gradient);
	color: #fff;
	font-weight: 700;
}

.crw-active-filter-pill[hidden] {
	display: none !important;
}

.crw-active-filter-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	border-radius: 999px;
	padding: 7px 8px 7px 16px;
	font-size: 13px;
	font-weight: 600;
	background: var(--crw-gradient);
	color: #fff;
}

.crw-active-filter-remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	box-sizing: border-box;
	width: 18px;
	height: 18px;
	padding: 0;
	margin: 0;
	border: none;
	border-radius: 50%;
	color: #fff;
	background: rgba(255, 255, 255, 0.25);
	color: #fff;
	line-height: 0;
	cursor: pointer;
	transition: background 0.15s ease;
}

.crw-active-filter-remove svg {
	width: 11px;
	height: 11px;
	display: block;
}

.crw-active-filter-remove:hover {
	background: rgba(255, 255, 255, 0.4);
}

/* Review cards */
.crw-review-list {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.crw-review {
	border: 1px solid var(--crw-border);
	border-radius: var(--crw-widget-radius);
	padding: 22px;
	background: var(--crw-surface, #fff);
	box-shadow: var(--crw-shadow-soft);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.crw-review:hover {
	box-shadow: var(--crw-shadow-lift);
	transform: translateY(-2px);
}

/* Load more */
.crw-load-more-wrap {
	display: flex;
	justify-content: center;
	margin-top: 28px;
}

.crw-load-more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 11px 28px;
	border: 1px solid var(--crw-border);
	border-radius: 999px;
	background: var(--crw-surface, #fff);
	color: var(--crw-text, #111827);
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.crw-load-more:hover {
	border-color: var(--crw-primary);
	color: var(--crw-primary-dark);
}

.crw-load-more:disabled,
.crw-load-more.is-loading {
	opacity: 0.6;
	cursor: default;
	pointer-events: none;
}

.crw-load-more.is-loading::after {
	content: '';
	width: 13px;
	height: 13px;
	margin-left: 2px;
	border-radius: 50%;
	border: 2px solid rgba(17, 24, 39, 0.2);
	border-top-color: #111827;
	animation: crw-spin 0.7s linear infinite;
}

@keyframes crw-spin {
	to {
		transform: rotate(360deg);
	}
}

.crw-review-head {
	display: flex;
	gap: 12px;
	align-items: flex-start;
}

.crw-review-headtext {
	flex: 1;
	min-width: 0;
}

.crw-avatar {
	border-radius: 50%;
	width: 44px;
	height: 44px;
	flex-shrink: 0;
}

.crw-avatar-initials {
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--crw-primary);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.crw-review-author {
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 6px;
}

img.crw-country-flag {
	display: inline-block !important;
	border-radius: 2px !important;
	width: 16px !important;
	height: 12px !important;
	max-width: 16px !important;
	max-height: 12px !important;
	min-width: 0 !important;
	object-fit: cover !important;
	flex-shrink: 0;
	vertical-align: middle;
}

.crw-badge-verified {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin-top: 2px;
}

.crw-badge-verified-text {
	font-size: 13px;
	font-weight: 400;
	color: var(--crw-verified-text, #4b5563);
}

.crw-badge-verified svg {
	display: block;
	flex-shrink: 0;
}

.crw-review-meta {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 12px;
	color: var(--crw-text-muted);
	margin-top: 4px;
}

.crw-review-meta time {
	margin-left: auto;
}

.crw-review-title {
	margin: 12px 0 0;
	font-weight: 700;
	font-size: 15px;
	line-height: 1.4;
	color: var(--crw-text, #111827);
}

.crw-review-body {
	margin: 12px 0 0;
	line-height: 1.6;
	/* A few shades lighter than the title above for contrast/hierarchy. */
	color: var(--crw-text-secondary, #374151);
}

/* The body content is run through wpautop(), which wraps it in its own <p>
   tags — themes commonly style bare <p> elements directly (e.g. via
   .entry-content p), which otherwise silently overrides the color set above
   since element selectors like that can be as or more specific. Explicitly
   inheriting here, and in the review/modal contexts below, makes sure our
   color always wins regardless of the surrounding theme. */
.crw-review-body p {
	color: inherit;
	margin: 0 0 8px;
}

.crw-review-body p:first-child {
	margin-top: 0;
}

.crw-review-body p:last-child {
	margin-bottom: 0;
}

.crw-review-title + .crw-review-body {
	margin-top: 4px;
}

.crw-review-media {
	display: flex;
	gap: 8px;
	margin-top: 12px;
	flex-wrap: wrap;
}

.crw-review-media-item {
	position: relative;
	width: 76px;
	height: 76px;
	flex: 0 0 76px;
	border-radius: 10px;
	overflow: hidden;
	display: block;
}

/* !important guards against theme stylesheets that apply a generic
   `img { height: auto; max-width: 100%; }` rule (very common in WooCommerce
   themes) — without it, that rule wins on equal specificity by loading later
   in the cascade, and landscape photos end up short/narrow instead of
   cropped to a true 1:1 square like the portrait ones. */
.crw-review-media-item img,
.crw-review-media-item video {
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover !important;
}

.crw-media-play {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.3);
	color: #fff;
}

.crw-review-media-item {
	cursor: zoom-in;
}

body.crw-lightbox-open {
	overflow: hidden;
}

.crw-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(10, 10, 15, 0.92);
	padding: 32px;
}

.crw-lightbox.is-open {
	display: flex;
}

.crw-lightbox-inner {
	position: relative;
	display: flex;
	width: 100%;
	max-width: 1100px;
	height: 86vh;
	max-height: 720px;
	background: var(--crw-surface, #fff);
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.crw-lightbox-media {
	position: relative;
	flex: 1 1 60%;
	min-width: 0;
	background: #000;
	display: flex;
	align-items: center;
	justify-content: center;
}

.crw-lightbox-stage {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.crw-lightbox-stage img,
.crw-lightbox-stage video {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.crw-lightbox-review {
	flex: 1 1 40%;
	max-width: 420px;
	min-width: 300px;
	overflow-y: auto;
	padding: 32px;
	background: var(--crw-surface, #fff);
	display: flex;
	flex-direction: column;
}

.crw-lightbox-review .crw-review {
	display: flex;
	flex-direction: column;
	flex: 1;
	border: none;
	padding: 0;
	margin-top: 34px;
	box-shadow: none;
	transition: none;
}

.crw-lightbox-review .crw-review-footer {
	margin-top: auto;
	padding-top: 24px;
}

.crw-lightbox-review .crw-review:hover {
	box-shadow: none;
	transform: none;
}

.crw-lightbox-close {
	position: absolute;
	top: 16px;
	right: 16px;
	background: transparent;
	border: none;
	color: var(--crw-text, #111827);
	cursor: pointer;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	font-size: 22px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2;
}

.crw-lightbox-close:hover {
	background: transparent;
	color: var(--crw-text, #111827);
}

.crw-lightbox-prev,
.crw-lightbox-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(17, 24, 39, 0.45);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	border: none;
	color: #fff;
	cursor: pointer;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	padding: 0;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease;
	z-index: 2;
}

.crw-lightbox-prev svg,
.crw-lightbox-next svg {
	display: block;
	margin: 0 auto;
}

.crw-lightbox-prev:hover,
.crw-lightbox-next:hover {
	background: rgba(17, 24, 39, 0.65);
}

.crw-lightbox-prev {
	left: 20px;
}

.crw-lightbox-next {
	right: 20px;
}

.crw-lightbox-dots {
	position: absolute;
	left: 50%;
	bottom: 20px;
	transform: translateX(-50%);
	display: flex;
	align-items: center;
	gap: 8px;
	z-index: 2;
}

.crw-lightbox-dot {
	width: 8px;
	height: 8px;
	padding: 0;
	border: 1.5px solid rgba(255, 255, 255, 0.8);
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.crw-lightbox-dot:hover {
	border-color: #fff;
}

.crw-lightbox-dot.is-active {
	background: #fff;
	border-color: #fff;
}

@media (max-width: 782px) {
	.crw-lightbox {
		padding: 0;
	}

	.crw-lightbox-inner {
		flex-direction: column;
		height: 100vh;
		max-height: none;
		border-radius: 0;
	}

	.crw-lightbox-media {
		flex: 1 1 45%;
	}

	.crw-lightbox-review {
		flex: 1 1 55%;
		max-width: none;
		min-width: 0;
	}

	.crw-lightbox-prev,
	.crw-lightbox-next {
		left: 12px;
		right: auto;
	}

	.crw-lightbox-next {
		left: auto;
		right: 12px;
	}

	.crw-lightbox-dots {
		bottom: 16px;
	}
}

.crw-review-criteria,
.crw-review-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 12px;
}

.crw-criteria-pill,
.crw-tag {
	background: var(--crw-surface-hover, #f3f4f6);
	border-radius: 999px;
	padding: 3px 10px;
	font-size: 12px;
	color: var(--crw-text-secondary, #374151);
}

.crw-store-reply {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-top: 14px;
	padding: 12px 16px;
	background: var(--crw-surface-alt, #f9fafb);
	border-left: 3px solid var(--crw-primary);
	border-radius: 0 10px 10px 0;
}

.crw-store-reply-body {
	flex: 1;
	min-width: 0;
}

.crw-store-reply-label {
	display: block;
	font-weight: 700;
	font-size: 12px;
	color: var(--crw-primary);
	margin-bottom: 4px;
}

.crw-store-reply p {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	color: var(--crw-text-secondary, #374151);
}

.crw-store-avatar {
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	object-fit: cover;
	display: inline-block !important;
	background: var(--crw-surface, #fff);
	border: 1px solid var(--crw-border, #e5e7eb);
}

.crw-store-avatar-fallback {
	display: flex !important;
	align-items: center;
	justify-content: center;
	background: var(--crw-primary);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.crw-review-footer {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 16px;
	font-size: 13px;
	color: var(--crw-text-muted);
}

.crw-vote-prompt {
	color: var(--crw-text-muted);
}

.crw-vote-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: var(--crw-surface, #fff);
	border: 1px solid var(--crw-border);
	border-radius: 999px;
	padding: 5px 12px;
	color: var(--crw-text-muted);
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease, color 0.15s ease;
}

.crw-vote-icon {
	width: 15px;
	height: 15px;
	flex-shrink: 0;
}

.crw-vote-count {
	font-size: 11.5px;
}

.crw-vote-btn:hover {
	border-color: var(--crw-primary);
	color: var(--crw-primary-dark);
	transform: translateY(-1px);
}

.crw-vote-btn.is-active {
	background: #eef2ff;
	border-color: var(--crw-primary);
	color: var(--crw-primary-dark);
	font-weight: 600;
}

/* Review submission form — WordPress's comment_form() renders #respond >
   h3.comment-reply-title + form#commentform.comment-form; our custom fields
   (star rating, title, media, tags) live inside .crw-form-wrap at the top of
   that form, and comment-form-comment/form-submit are WP's own field/button
   wrappers that we restyle here to match the rest of the plugin. */
#respond,
.comment-respond {
	max-width: 800px;
	margin: 40px auto 0;
	padding: 32px;
	border: 1px solid var(--crw-border);
	border-radius: var(--crw-widget-radius);
	background: var(--crw-surface, #fff);
	box-shadow: var(--crw-shadow-soft);
}

.comment-reply-title {
	margin: 0 0 4px;
	font-size: 22px;
	font-weight: 800;
	letter-spacing: -0.01em;
}

.comment-reply-title small {
	font-size: 13px;
	font-weight: 500;
	margin-left: 8px;
}

.comment-reply-title small a {
	color: var(--crw-text-muted);
	text-decoration: none;
}

.comment-notes,
.logged-in-as,
.crw-logged-in-as {
	margin: 0 0 20px;
	padding-bottom: 20px;
	font-size: 13px;
	color: var(--crw-text-muted);
	border-bottom: 1px solid var(--crw-border);
}

.logged-in-as a,
.crw-logged-in-as a {
	color: var(--crw-primary-dark);
	font-weight: 600;
}

.must-log-in {
	font-size: 14px;
}

.must-log-in a {
	color: var(--crw-primary-dark);
	font-weight: 600;
}

.comment-form p {
	margin: 0 0 18px;
}

.crw-form-wrap {
	margin: 0 0 4px;
}

.crw-field {
	margin-bottom: 18px;
}

.crw-field label {
	display: block;
	font-weight: 600;
	font-size: 14px;
	margin-bottom: 6px;
	/* Explicit color (not just inherited) so themes that set a global
	   `label { color: ... }` rule for their own dark-styled forms can't
	   make our labels invisible against our own light form background. */
	color: var(--crw-text, #111827);
}

.crw-field .required {
	color: #dc2626;
}

.crw-criteria-row {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 8px;
}

.crw-criteria-label {
	min-width: 140px;
	font-size: 14px;
	color: var(--crw-text, #111827);
}

.crw-dropzone {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	text-align: center;
	padding: 28px 20px;
	border: 1.5px dashed var(--crw-border);
	border-radius: 14px;
	background: #fafafd;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.crw-dropzone:hover {
	border-color: var(--crw-primary);
}

.crw-dropzone.is-dragover {
	border-color: var(--crw-primary);
	background: #eef2ff;
}

.crw-dropzone-icon {
	width: 28px;
	height: 28px;
	color: var(--crw-text-muted);
	margin-bottom: 4px;
}

.crw-dropzone.is-dragover .crw-dropzone-icon {
	color: var(--crw-primary);
}

.crw-dropzone-text {
	margin: 0;
	font-size: 13px;
	font-weight: 500;
	color: var(--crw-text-muted);
}

.crw-dropzone-browse {
	color: var(--crw-primary-dark);
	font-weight: 700;
	text-decoration: underline;
}

.crw-dropzone-hint {
	margin: 2px 0 0;
	font-size: 11px;
	color: var(--crw-text-muted);
	opacity: 0.8;
}

.crw-dropzone-input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

.crw-media-preview {
	display: flex;
	gap: 8px;
	margin-top: 10px;
	flex-wrap: wrap;
}

.crw-media-preview-tile {
	position: relative;
	width: 60px;
	height: 60px;
	border-radius: 8px;
	overflow: hidden;
	flex: 0 0 auto;
}

.crw-media-preview-tile img {
	width: 60px;
	height: 60px;
	object-fit: cover;
	border-radius: 8px;
	display: block;
}

.crw-media-preview-tile-file {
	width: 60px;
	height: 60px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 4px;
	font-size: 10px;
	line-height: 1.2;
	background: var(--crw-surface-muted, #f3f4f6);
	color: var(--crw-text-muted, #6b7280);
	border-radius: 8px;
	word-break: break-word;
}

.crw-media-preview-remove {
	position: absolute;
	top: 2px;
	right: 2px;
	width: 18px;
	height: 18px;
	border: none;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.65);
	color: #fff;
	font-size: 12px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
}

.crw-media-preview-remove:hover {
	background: rgba(0, 0, 0, 0.85);
}

.crw-media-preview-add {
	position: relative;
	width: 60px;
	height: 60px;
	flex: 0 0 auto;
	display: block;
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	border: 1.5px dashed var(--crw-border-color, #d1d5db);
	border-radius: 8px;
	background: transparent;
	color: var(--crw-text-muted, #6b7280);
	cursor: pointer;
	font-size: 0; /* hide the raw "+" text node; the glyph is drawn via ::before for pixel-accurate centering */
	line-height: 0;
}

.crw-media-preview-add::before {
	content: '+';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 16px;
	line-height: 1;
}

.crw-media-preview-add:hover {
	border-color: var(--crw-accent-color, #292929);
	color: var(--crw-accent-color, #292929);
}

.crw-honeypot {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.form-submit {
	margin: 24px 0 0 !important;
}

.crw-submit-button,
#commentform input#submit {
	background: var(--crw-gradient) !important;
	border: none !important;
	color: #fff !important;
	border-radius: 999px !important;
	padding: 13px 30px !important;
	font-weight: 700 !important;
	font-size: 14px !important;
	cursor: pointer;
	transition: transform 0.15s ease, filter 0.15s ease;
}

.crw-standalone-form .crw-submit-button {
	width: 100%;
	box-sizing: border-box;
	text-align: center;
}

.crw-legal-notice {
	font-size: 12px;
	line-height: 1.5;
	color: var(--crw-text-muted, #6b7280);
	text-align: center;
	margin: 16px 0 12px !important;
}

.crw-legal-notice a {
	color: inherit;
	text-decoration: underline;
}

.crw-submit-button:hover,
#commentform input#submit:hover {
	transform: translateY(-1px);
	filter: brightness(1.04);
}

.crw-submit-button.is-loading,
#commentform input#submit.is-loading {
	position: relative;
	color: transparent !important;
	pointer-events: none;
}

.crw-submit-button.is-loading::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 16px;
	height: 16px;
	margin: -8px 0 0 -8px;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: crw-spin 0.7s linear infinite;
}

@keyframes crw-spin {
	to {
		transform: rotate(360deg);
	}
}

.crw-field input[type="text"],
.crw-field input[type="email"],
.crw-field input[type="url"],
.crw-form-wrap input[type="text"],
.crw-form-wrap input[type="email"],
.crw-form-wrap input[type="url"],
.comment-form-comment textarea,
.crw-form-wrap textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 11px 14px;
	font-size: 14px;
	font-family: inherit;
	border-radius: 10px;
	border: 1px solid var(--crw-border);
	background: var(--crw-surface, #fff);
	/* Explicit text color: without this, a theme's own global input styles
	   (e.g. white text for its dark-themed forms) can inherit through and
	   make typed text invisible against our light input background. */
	color: var(--crw-text, #111827);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.comment-form-comment textarea {
	min-height: 130px;
	resize: vertical;
}

.crw-field input[type="text"]:focus,
.crw-field input[type="email"]:focus,
.crw-field input[type="url"]:focus,
.crw-form-wrap input[type="text"]:focus,
.crw-form-wrap input[type="email"]:focus,
.crw-form-wrap input[type="url"]:focus,
.comment-form-comment textarea:focus,
.crw-form-wrap textarea:focus {
	border-color: var(--crw-primary);
	outline: none;
	box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.crw-field-terms label {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-weight: 400;
	font-size: 13px;
	color: var(--crw-text-muted);
	cursor: pointer;
}

.crw-field-terms input[type="checkbox"] {
	margin-top: 2px;
}

@media ( max-width: 600px ) {
	#respond,
	.comment-respond {
		padding: 22px;
		border-radius: 14px;
	}
}

.crw-form-message {
	margin-top: 10px;
	padding: 10px 14px;
	border-radius: 8px;
	font-size: 14px;
}

.crw-form-message.is-success {
	background: #ecfdf5;
	color: #059669;
}

.crw-form-message.is-error {
	background: #fef2f2;
	color: #dc2626;
}

/* Q&A */
.crw-qa-app {
	margin-top: 4px;
}

.crw-qa-ask {
	/* Was a hardcoded #fafafa, which never responded to dark mode (dark mode
	   only redefines the --crw-* custom properties, not literal hex values) —
	   so on dark sites the card stayed white while its heading text switched
	   to the light-mode text color, making "Have a question?" unreadable. */
	background: var(--crw-surface-alt, #f9fafb);
	border: 1px solid var(--crw-border);
	border-radius: 16px;
	padding: 22px;
	margin-bottom: 28px;
}

.crw-qa-ask h4 {
	margin: 0 0 12px;
	font-size: 15px;
}

.crw-qa-ask textarea,
.crw-answer-form input[type="text"] {
	width: 100%;
	border-radius: 12px;
	border: 1px solid var(--crw-border);
	background: var(--crw-surface, #fff);
	font-size: 14px;
}

.crw-qa-ask textarea {
	padding: 12px 14px;
	resize: vertical;
}

.crw-qa-ask textarea:focus,
.crw-answer-form input[type="text"]:focus {
	outline: none;
	border-color: var(--crw-primary);
	box-shadow: 0 0 0 3px rgba(0, 186, 111, 0.12);
}

.crw-qa-guest-fields {
	display: flex;
	gap: 10px;
	margin-top: 10px;
}

.crw-qa-guest-fields input {
	flex: 1;
	padding: 10px 14px;
}

.crw-qa-ask .crw-submit-button {
	margin-top: 12px;
	width: auto;
	padding: 10px 24px;
}

.crw-no-questions {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	padding: 48px 20px;
	color: var(--crw-text-muted);
	text-align: center;
}

.crw-no-questions svg {
	width: 34px;
	height: 34px;
	opacity: 0.5;
}

.crw-no-questions p {
	margin: 0;
	font-size: 14px;
}

.crw-qa-list {
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.crw-question {
	padding-bottom: 28px;
	border-bottom: 1px solid var(--crw-border);
}

.crw-question:last-child {
	padding-bottom: 0;
	border-bottom: none;
}

.crw-question-row,
.crw-answer-row {
	display: flex;
	gap: 12px;
	align-items: flex-start;
}

.crw-qa-col {
	flex: 1;
	min-width: 0;
}

.crw-qa-avatar {
	width: 30px;
	height: 30px;
	flex-shrink: 0;
	border-radius: 50%;
	background: var(--crw-gradient);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 700;
}

.crw-qa-avatar-a {
	background: #111827;
}

/* Chat bubbles */
.crw-qa-bubble {
	display: inline-block;
	max-width: 100%;
	padding: 11px 15px;
	border-radius: 4px 16px 16px 16px;
	background: var(--crw-surface-hover, #f3f4f6);
}

.crw-qa-bubble-a.is-store {
	background: rgba(0, 186, 111, 0.08);
	border: 1px solid rgba(0, 186, 111, 0.2);
}

.crw-question-text,
.crw-answer-text {
	margin: 0;
	font-size: 14px;
	line-height: 1.55;
	color: #1f2937;
	word-wrap: break-word;
}

.crw-qa-bubble-footer {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-top: 6px;
	padding-left: 3px;
}

.crw-question-meta,
.crw-answer-meta {
	font-size: 12px;
	color: var(--crw-text-muted);
}

.crw-badge-store {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 999px;
	background: rgba(0, 186, 111, 0.12);
	color: var(--crw-primary-dark);
	font-size: 10.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.crw-qa-helpful {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	font-size: 12px;
	font-weight: 600;
	color: var(--crw-text-muted);
	transition: color 0.15s ease;
}

.crw-qa-helpful svg {
	width: 13px;
	height: 13px;
}

.crw-qa-helpful:hover,
.crw-qa-helpful:disabled {
	color: var(--crw-primary-dark);
}

.crw-qa-answers {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin-top: 14px;
}

.crw-answer-row {
	margin: 0;
}

.crw-answer-form {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 16px;
	flex-wrap: wrap;
}

.crw-answer-form input {
	flex: 1;
	min-width: 140px;
	padding: 9px 14px;
}

.crw-answer-form input[name="name"] {
	flex: 0 0 140px;
}

.crw-qa-send {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: var(--crw-gradient);
	color: #fff;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.crw-qa-send svg {
	width: 15px;
	height: 15px;
}

.crw-qa-send:hover {
	transform: scale(1.06);
	box-shadow: var(--crw-shadow-lift);
}

.crw-qa-pending-note {
	margin-top: 10px;
	font-size: 12px;
	color: var(--crw-text-muted);
	font-style: italic;
}

/* Aggregated review form (from email/WhatsApp link) */
.crw-aggregated-page {
	max-width: 720px;
	margin: 0 auto;
	padding: 40px 20px;
}

.crw-aggregated-intro {
	color: var(--crw-text-muted);
	margin-bottom: 24px;
}

.crw-aggregated-product {
	border: 1px solid var(--crw-border);
	border-radius: var(--crw-widget-radius);
	padding: 18px;
	margin-bottom: 16px;
}

.crw-aggregated-product-head {
	display: flex;
	gap: 14px;
	align-items: center;
	margin-bottom: 10px;
}

.crw-aggregated-product-head img {
	width: 56px;
	height: 56px;
	object-fit: cover;
	border-radius: 8px;
}

.crw-aggregated-product textarea {
	width: 100%;
	border-radius: 8px;
}

.crw-aggregated-submit-row {
	text-align: center;
	margin-top: 24px;
}

.crw-aggregated-message {
	text-align: center;
	margin-top: 12px;
}

.crw-no-reviews,
.crw-no-questions {
	color: var(--crw-text-muted);
	padding: 20px 0;
}

/* ---- Display widgets ---- */

.crw-trust-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	border: 1px solid var(--crw-border);
	border-radius: 999px;
	text-decoration: none;
	color: var(--crw-text, #111827);
	background: var(--crw-surface, #fff);
	font-size: 14px;
	box-shadow: var(--crw-shadow-soft);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.crw-trust-badge:hover {
	box-shadow: var(--crw-shadow-lift);
	transform: translateY(-2px);
}

.crw-trust-badge-check {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #059669;
	color: #fff;
	font-size: 11px;
}

.crw-trust-badge-score {
	font-weight: 800;
}

.crw-star-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 6px 0;
}

.crw-star-badge-count {
	font-size: 12px;
	color: var(--crw-text-muted);
}

.crw-title-rating {
	margin: 4px 0 14px;
}

.crw-title-rating-link {
	display: inline-flex;
	color: inherit;
	text-decoration: none;
	cursor: pointer;
}

.crw-title-rating-link:hover .crw-star-badge-count,
.crw-title-rating-link:focus-visible .crw-star-badge-count {
	text-decoration: underline;
}

/* Carousels */
.crw-carousel {
	position: relative;
	margin: 20px 0;
	max-width: 100%;
}

.crw-carousel-track {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	scroll-behavior: smooth;
	/* No side padding — cards sit flush with the container edges. */
	padding: 4px 0;
	/* Without this, a flex item's default min-width is the width of its
	   content (all the cards laid out at full size), so the track refuses to
	   shrink to the container's available width and spills out to the right
	   instead of scrolling internally — this is what made cards look cut off. */
	min-width: 0;
}

.crw-carousel-track::-webkit-scrollbar {
	height: 6px;
}

/* Card width is a fraction of the track rather than a fixed px value, so
   the visible set always lands on a whole number of cards with no sliver of
   a partial next card poking in at the right edge — 2 per view on mobile,
   3 per view from 900px up (matches the video-carousel breakpoint below).
   Formula: (100% - gap * (N - 1)) / N, where gap matches .crw-carousel-track's gap. */
.crw-carousel-card {
	flex: 0 0 calc((100% - 16px) / 2);
	min-width: 0;
	box-sizing: border-box;
	border: 1px solid var(--crw-border);
	border-radius: var(--crw-widget-radius);
	padding: 18px;
	background: var(--crw-surface, #fff);
}

@media (min-width: 900px) {
	.crw-carousel-card {
		flex-basis: calc((100% - 32px) / 3);
	}
}

.crw-carousel-text {
	margin: 10px 0 12px;
	font-size: 14px;
	line-height: 1.5;
	color: var(--crw-text-secondary, #374151);
}

.crw-carousel-author {
	display: block;
	font-weight: 600;
	font-size: 13px;
}

.crw-carousel-product {
	display: block;
	font-size: 12px;
	color: var(--crw-text-muted);
}

/* Nav arrow look — box-sizing + aspect-ratio keep the circle a true 1:1
   regardless of the border, and flex centering (rather than relying on
   line-height) keeps the ‹ › glyph dead-center instead of drifting. */
.crw-carousel-nav {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 34px;
	height: 34px;
	aspect-ratio: 1 / 1;
	margin: 0;
	padding: 0;
	border-radius: 50%;
	border: 1px solid var(--crw-border);
	background: var(--crw-surface, #fff);
	color: var(--crw-text, #111827);
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
	transition: background 0.15s ease, color 0.15s ease;
}

.crw-carousel-nav:hover {
	background: var(--crw-gradient);
	color: #fff;
	border-color: transparent;
}

/* Plain "Reviews Carousel": the nav arrows sit as a small static row below
   the track, bottom-left — not overlaid on the cards, always visible, no
   hover-lift animation (that's still what the video carousel below does).
   Grid placement lets the track span the full width on row 1 while the two
   buttons sit next to each other on row 2, independent of their source order
   (prev, then track, then next in the markup). */
.crw-carousel:not(.crw-video-carousel) {
	display: grid;
	grid-template-columns: auto auto 1fr;
	column-gap: 8px;
}

.crw-carousel:not(.crw-video-carousel) .crw-carousel-track {
	grid-column: 1 / -1;
	grid-row: 1;
}

.crw-carousel:not(.crw-video-carousel) .crw-carousel-prev,
.crw-carousel:not(.crw-video-carousel) .crw-carousel-next {
	grid-row: 2;
	margin-top: 24px;
}

.crw-carousel:not(.crw-video-carousel) .crw-carousel-prev {
	grid-column: 1;
}

.crw-carousel:not(.crw-video-carousel) .crw-carousel-next {
	grid-column: 2;
}

/* The video itself sits flush against the card edges (no padding, top
   corners only rounded to match the card's own radius, bottom square so it
   reads as one continuous surface with the text block below it) — only the
   stars/author block below gets breathing room, via .crw-video-card-body. */
.crw-carousel-card.crw-video-card {
	padding: 0;
	overflow: hidden;
}

.crw-video-card video {
	display: block;
	width: 100%;
	aspect-ratio: var(--crw-video-carousel-ratio, 4 / 5);
	border-radius: var(--crw-widget-radius) var(--crw-widget-radius) 0 0;
	object-fit: cover;
}

/* The card's cropped aspect-ratio/object-fit:cover is only meant for the tile
   view — once the visitor expands the native player to full screen, the
   browser fullscreens this same <video> element, and without this override
   it kept the tile's forced aspect-ratio + "cover" cropping, making the
   video look stretched/zoomed and cutting off part of the frame. Resetting
   both to their natural values in the :fullscreen state lets the video show
   at its own original aspect ratio, letterboxed rather than cropped. */
.crw-video-card video:fullscreen,
.crw-video-card video:-webkit-full-screen,
.crw-video-card video:-moz-full-screen {
	aspect-ratio: auto;
	object-fit: contain;
	width: 100%;
	height: 100%;
	border-radius: 0;
}

.crw-video-card-body {
	padding: 14px 16px 16px;
}

/* Video carousel: desktop layout — cards scroll-snap into place, minimal
   arrows only appear on hover. Every card is the same size (no coverflow
   scale/fade), so media heights stay consistent across the row. */
.crw-video-carousel .crw-carousel-track {
	scroll-snap-type: x proximity;
	gap: 20px;
	padding: 10px 4px 6px;
}

.crw-video-carousel .crw-carousel-card.crw-video-card {
	scroll-snap-align: center;
}

@media (min-width: 900px) {
	.crw-video-carousel .crw-carousel-card.crw-video-card {
		flex: 0 0 200px;
	}
}

/* The video carousel keeps the overlay/hover-reveal nav treatment: arrows
   float on top of the track, centered vertically, hidden until hover — and
   only shown at all when there's more to scroll to (crw-has-more is toggled
   by JS based on overflow). */
.crw-video-carousel .crw-carousel-nav {
	position: absolute;
	top: 50%;
	z-index: 2;
	width: 30px;
	height: 30px;
	font-size: 15px;
	opacity: 0;
	pointer-events: none;
	transform: translateY(-50%);
	transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.crw-video-carousel .crw-carousel-prev {
	left: 4px;
}

.crw-video-carousel .crw-carousel-next {
	right: 4px;
}

.crw-video-carousel .crw-carousel-nav:hover {
	transform: translateY(-50%) scale(1.08);
}

.crw-video-carousel.crw-has-more:hover .crw-carousel-nav {
	opacity: 1;
	pointer-events: auto;
}

/* Testimonial slider */
.crw-testimonials {
	position: relative;
	min-height: 100px;
	text-align: center;
	padding: 24px;
}

.crw-testimonial {
	display: none;
	max-width: 560px;
	margin: 0 auto;
}

.crw-testimonial.is-active {
	display: block;
}

.crw-testimonial p {
	font-size: 18px;
	font-style: italic;
	color: var(--crw-text, #111827);
	line-height: 1.6;
}

.crw-testimonial cite {
	display: block;
	margin-top: 10px;
	font-style: normal;
	font-weight: 600;
	font-size: 13px;
	color: var(--crw-text-muted);
}

/* UGC grid */
.crw-ugc-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 14px;
}

.crw-ugc-tile {
	border: 1px solid var(--crw-border);
	border-radius: var(--crw-widget-radius);
	overflow: hidden;
	background: var(--crw-surface, #fff);
}

.crw-ugc-tile img,
.crw-ugc-tile video {
	width: 100%;
	height: 160px;
	object-fit: cover;
	display: block;
}

.crw-ugc-tile-body {
	padding: 12px;
}

.crw-ugc-tile-body p {
	font-size: 13px;
	margin: 6px 0;
	color: var(--crw-text-secondary, #374151);
}

.crw-ugc-tile-body span {
	font-size: 12px;
	color: var(--crw-text-muted);
}

/* UGC Shopping grid — shoppable customer photos */
.crw-ugc-shopping-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 4px;
}

.crw-ugc-shop-tile {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: var(--crw-surface-hover, #f3f4f6);
}

.crw-ugc-shop-tile img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.35s ease;
}

.crw-ugc-shop-tile:hover img {
	transform: scale(1.06);
}

.crw-ugc-shop-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: flex-end;
	padding: 12px;
	background: linear-gradient(180deg, rgba(17, 24, 39, 0) 55%, rgba(17, 24, 39, 0.75) 100%);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.crw-ugc-shop-tile:hover .crw-ugc-shop-overlay {
	opacity: 1;
}

.crw-ugc-shop-icon {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--crw-text, #111827);
	opacity: 0;
	transform: scale(0.8);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.crw-ugc-shop-tile:hover .crw-ugc-shop-icon {
	opacity: 1;
	transform: scale(1);
}

.crw-ugc-shop-icon svg {
	width: 15px;
	height: 15px;
}

.crw-ugc-shop-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
	color: #fff;
}

.crw-ugc-shop-name {
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.crw-ugc-shop-price {
	font-size: 12px;
	opacity: 0.9;
}

.crw-ugc-shop-price ins {
	text-decoration: none;
}

/* All Reviews wall */
.crw-all-reviews-page {
	max-width: 860px;
	margin: 0 auto;
}

.crw-all-reviews-hero {
	text-align: center;
	padding: 20px 0 8px;
}

.crw-all-reviews-score {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	margin-top: 10px;
}

/* Medals */
.crw-medals {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin: 20px 0 28px;
}

.crw-medal {
	background: #fffbeb;
	border: 1px solid #fde68a;
	color: #92400e;
	border-radius: 999px;
	padding: 7px 16px;
	font-size: 13px;
	font-weight: 700;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.crw-medal:hover {
	transform: translateY(-2px);
}

/* Counters */
.crw-counter {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	padding: 18px 26px;
	text-align: center;
	border-radius: var(--crw-widget-radius);
	transition: transform 0.15s ease;
}

.crw-counter:hover {
	transform: translateY(-2px);
}

.crw-counter-value {
	font-size: 30px;
	font-weight: 800;
	background: var(--crw-gradient);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.crw-counter-label {
	font-size: 12px;
	color: var(--crw-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* Below-add-to-cart snippets */
.crw-snippet-row {
	display: flex;
	gap: 14px;
	margin-top: 20px;
	flex-wrap: wrap;
}

.crw-snippet {
	flex: 1;
	min-width: 200px;
	border: 1px solid var(--crw-border);
	border-radius: 12px;
	padding: 14px;
}

.crw-snippet p {
	font-size: 13px;
	margin: 8px 0;
	color: var(--crw-text-secondary, #374151);
}

.crw-snippet span {
	font-size: 12px;
	color: var(--crw-text-muted);
}

/* Floating reviews tab — colors are intentionally hardcoded rather than
   pulled from the Style tab settings, so this widget always reads as a
   deliberate, high-contrast badge regardless of the site's own theme. The
   default (light-theme) state below is a dark pill with light stars/text;
   dark_mode_css() in class-crw-widgets.php inverts it (light pill, dark
   stars/text) when the site itself is in dark mode. */
.crw-floating-tab {
	position: fixed;
	bottom: 24px;
	z-index: 9999;
}

.crw-floating-right {
	right: 0;
}

.crw-floating-left {
	left: 0;
}

.crw-floating-toggle {
	display: flex;
	align-items: center;
	gap: 6px;
	background: #1a1a1a;
	color: #ffffff;
	border: none;
	padding: 12px 16px;
	cursor: pointer;
	font-size: 12px;
	font-weight: 600;
	writing-mode: horizontal-tb;
	border-radius: 12px 0 0 12px;
	transition: filter 0.15s ease;
}

.crw-floating-toggle:hover {
	filter: brightness(1.2);
}

.crw-floating-right .crw-floating-toggle {
	border-radius: 10px 0 0 10px;
}

.crw-floating-left .crw-floating-toggle {
	border-radius: 0 10px 10px 0;
}

.crw-floating-panel {
	display: none;
	position: absolute;
	bottom: 0;
	width: 280px;
	background: #1a1a1a;
	color: #ffffff;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: var(--crw-widget-radius);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
	padding: 16px;
}

.crw-floating-right .crw-floating-panel {
	right: 100%;
	margin-right: 8px;
}

.crw-floating-left .crw-floating-panel {
	left: 100%;
	margin-left: 8px;
}

.crw-floating-tab.is-open .crw-floating-panel {
	display: block;
}

.crw-floating-panel-head {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin-bottom: 10px;
	font-size: 14px;
	color: #ffffff;
}

.crw-floating-tab .crw-star-display {
	background: rgba(255, 255, 255, 0.1);
}

.crw-floating-tab .crw-star-fill {
	background: #ffffff;
}

.crw-floating-review {
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	padding: 8px 0;
}

.crw-floating-review p {
	font-size: 12px;
	margin: 4px 0 0;
	color: rgba(255, 255, 255, 0.72);
}

/* Review notification popups — toast-style, cycling through a product's latest reviews */
.crw-popup-review {
	position: fixed;
	bottom: 24px;
	left: 24px;
	width: 280px;
	z-index: 9999;
	opacity: 0;
	transform: translateY(16px) scale(0.98);
	pointer-events: none;
	transition: opacity 0.35s ease, transform 0.35s ease;
}

.crw-popup-review.is-visible {
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}

.crw-popup-toast-track {
	position: relative;
	min-height: 96px;
}

.crw-popup-toast {
	position: absolute;
	inset: 0;
	background: var(--crw-surface, #fff);
	border: 1px solid var(--crw-border);
	border-radius: var(--crw-widget-radius);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
	padding: 16px 34px 16px 16px;
	opacity: 0;
	transform: translateY(6px);
	pointer-events: none;
	transition: opacity 0.35s ease, transform 0.35s ease;
}

.crw-popup-toast.is-active {
	position: relative;
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

/* Exit animation: slides down and fades out before the next toast appears. */
.crw-popup-toast.is-active.is-leaving {
	opacity: 0;
	transform: translateY(20px);
	pointer-events: none;
}

.crw-popup-close {
	position: absolute;
	top: 8px;
	right: 10px;
	background: none;
	border: none;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	color: var(--crw-text-muted);
	z-index: 1;
}

.crw-popup-toast p {
	font-size: 13px;
	margin: 8px 0;
	color: var(--crw-text-secondary, #374151);
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}

.crw-popup-toast span {
	font-size: 11px;
	color: var(--crw-text-muted);
}

.crw-popup-toast span .crw-verified-badge-icon {
	vertical-align: middle;
	margin-left: 3px;
	position: relative;
	top: -1px;
}

/* Customer support screen (shown before posting a low-star review) */
.crw-support-screen-overlay {
	position: fixed;
	inset: 0;
	background: rgba(17, 24, 39, 0.55);
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.crw-support-screen {
	background: var(--crw-surface, #fff);
	border-radius: var(--crw-widget-radius);
	max-width: 420px;
	width: 100%;
	padding: 28px;
	text-align: center;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.crw-support-screen h3 {
	margin: 0 0 10px;
	font-size: 18px;
}

.crw-support-screen p {
	margin: 0 0 20px;
	color: var(--crw-text-muted);
	font-size: 14px;
	line-height: 1.5;
}

.crw-support-screen-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
	align-items: center;
}

.crw-support-screen-actions .button {
	width: 100%;
	text-align: center;
	background: var(--crw-gradient);
	color: #fff;
	border: none;
	padding: 11px;
	border-radius: 999px;
	font-weight: 600;
}

.crw-support-continue-btn {
	background: none;
	border: none;
	color: var(--crw-text-muted);
	font-size: 13px;
	text-decoration: underline;
	cursor: pointer;
}
