/*
 * Surf AI Feeds: review shortcodes. Values come from the Surf Internet design system (tokens.json).
 * Everything is scoped to .surf-rv so Divi and the child theme are untouched, and the brand tokens are
 * set here so the blocks look right even where the theme doesn't define them. Headlines, numbers,
 * buttons and eyebrows use Plus Jakarta Sans; body text uses Inter. The plugin doesn't load font files.
 */
.surf-rv {
	--rv-blue: #0E66FF;
	--rv-blue-hover: #0B52CC;
	--rv-navy: #181E54;
	--rv-navy-2: #0F1336;
	--rv-cornflower: #86B3FF;
	--rv-gray-1: #F4F4F7;
	--rv-gray-2: #C5C6D4;
	--rv-gray-4: #535662;
	--rv-divider: #E4E5F1;
	--rv-blue-100: #DAEAFF;
	--rv-green-ink: #18994A;
	--rv-green-tint: rgba(46, 217, 94, 0.15);
	/* Surf typefaces. The site loads them; elsewhere (dev) the system fallbacks are used. */
	--rv-jakarta: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
	--rv-inter: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--rv-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 6px 16px rgba(24, 30, 84, 0.06);
	--rv-shadow-hover: 0 4px 36px rgba(24, 30, 84, 0.18);
	--rv-radius-mkt: 32px;
	--rv-radius-card: 16px;

	container-type: inline-size;
	font-family: var(--rv-inter);
	font-size: 16px;
	line-height: 1.5;
	letter-spacing: -0.025em;
	color: var(--rv-navy);
	-webkit-font-smoothing: antialiased;
}
.surf-rv *,
.surf-rv *::before,
.surf-rv *::after { box-sizing: border-box; }
.surf-rv p { margin: 0; padding: 0; }

.surf-rv .screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- Type ---------- */
.surf-rv .surf-rv-eyebrow {
	font-family: var(--rv-jakarta);
	font-weight: 700;
	font-size: 14px;
	line-height: 1.3;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--rv-blue);
	margin: 0 0 8px;
}
.surf-rv h2.surf-rv-h2 {
	font-family: var(--rv-jakarta);
	font-weight: 600;
	font-size: clamp(28px, 4.2cqi, 40px);
	line-height: 1.1;
	letter-spacing: -0.02em;
	color: var(--rv-navy);
	margin: 0 0 24px;
	padding: 0;
}
.surf-rv h2.surf-rv-h3 {
	font-family: var(--rv-jakarta);
	font-weight: 600;
	font-size: 22px;
	line-height: 1.2;
	letter-spacing: -0.02em;
	color: var(--rv-navy);
	margin: 0 0 12px;
	padding: 0;
}

/* ---------- Score panel (navy) ---------- */
.surf-rv .surf-rv-score,
.surf-rv .surf-rv-hero {
	background: linear-gradient(180deg, var(--rv-navy), var(--rv-navy-2));
	color: #fff;
	border-radius: var(--rv-radius-mkt);
	padding: 32px;
	position: relative;
	overflow: hidden;
}
/* The arc motif: two translucent rings in the corner. */
.surf-rv .surf-rv-score::after,
.surf-rv .surf-rv-hero::after {
	content: "";
	position: absolute;
	right: -120px;
	bottom: -160px;
	width: 320px;
	height: 320px;
	border-radius: 50%;
	border: 36px solid rgba(255, 255, 255, 0.05);
	box-shadow: 0 0 0 56px rgba(255, 255, 255, 0.03);
	pointer-events: none;
}
.surf-rv .surf-rv-score > *,
.surf-rv .surf-rv-hero > * { position: relative; z-index: 1; }
.surf-rv .surf-rv-score-num {
	font-family: var(--rv-jakarta);
	font-weight: 700;
	font-size: clamp(64px, 11cqi, 112px);
	line-height: 1;
	letter-spacing: -0.03em;
	color: #fff;
}
.surf-rv .surf-rv-score-label {
	font-family: var(--rv-jakarta);
	font-weight: 700;
	font-size: 14px;
	line-height: 1.3;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--rv-cornflower);
	margin: 12px 0 0;
	padding: 0;
}
.surf-rv .surf-rv-of {
	font-size: 0.42em;
	font-weight: 600;
	letter-spacing: 0;
	color: var(--rv-cornflower);
	margin-left: 0.08em;
}
.surf-rv .surf-rv-score-nps {
	font-family: var(--rv-jakarta);
	font-size: 17px;
	line-height: 1.3;
	color: rgba(255, 255, 255, 0.92);
	margin: 10px 0 0;
}
.surf-rv .surf-rv-score-nps strong { font-weight: 700; color: #fff; }
.surf-rv .surf-rv-score-industry { margin-top: 6px; }
/* The industry figure: same weight as Surf's NPS, set apart by the accent color only. */
.surf-rv .surf-rv-hl {
	font-weight: 700;
	color: var(--rv-cornflower);
	background: none;
	padding: 0;
}
.surf-rv .surf-rv-sr {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
.surf-rv .surf-rv-score-meta {
	font-size: 15px;
	color: rgba(255, 255, 255, 0.82);
	margin-top: 16px;
	max-width: 36ch;
}
.surf-rv .surf-rv-score-note {
	font-size: 13px;
	line-height: 1.5;
	color: var(--rv-cornflower);
	margin-top: 12px;
	max-width: 36ch;
}
.surf-rv .surf-rv-hero .surf-rv-eyebrow { color: var(--rv-cornflower); }
.surf-rv .surf-rv-hero-head {
	max-width: 760px;
	margin-bottom: clamp(32px, 4cqi, 48px);
	padding-bottom: clamp(28px, 3.5cqi, 40px);
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.surf-rv h2.surf-rv-hero-title {
	font-family: var(--rv-jakarta);
	font-weight: 700;
	font-size: clamp(36px, 5.4cqi, 64px);
	line-height: 1.06;
	letter-spacing: -0.025em;
	color: #fff;
	margin: 0;
	padding: 0;
}
.surf-rv .surf-rv-hero-intro {
	font-family: var(--rv-inter);
	font-size: clamp(17px, 1.9cqi, 22px);
	line-height: 1.5;
	letter-spacing: -0.0275em;
	color: rgba(255, 255, 255, 0.86);
	margin-top: 16px;
	max-width: 52ch;
}
.surf-rv .surf-rv-hero-intro a { color: var(--rv-cornflower); text-decoration: underline; }
.surf-rv .surf-rv-ast { margin-left: 2px; }
.surf-rv .surf-rv-benchmark {
	font-size: 12px;
	line-height: 1.5;
	letter-spacing: -0.005em;
	color: rgba(255, 255, 255, 0.72);
	margin-top: 20px;
	max-width: 70ch;
}
.surf-rv .surf-rv-benchmark a { color: var(--rv-cornflower); text-decoration: underline; }

/* ---------- Market block ---------- */
.surf-rv-market .surf-rv-market-grid {
	display: grid;
	grid-template-columns: minmax(260px, 1fr) 2fr;
	gap: 24px;
	align-items: start;
}
.surf-rv-market .surf-rv-market-grid.is-score-only { grid-template-columns: minmax(260px, 480px); }
.surf-rv-market .surf-rv-score { position: sticky; top: 24px; }

/* ---------- Review cards ---------- */
.surf-rv ul.surf-rv-list,
.surf-rv ul.surf-rv-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 16px;
}
/* As many 300px+ columns as the container fits: two in a normal content column, three when wide. */
.surf-rv ul.surf-rv-grid { grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 20px; }
.surf-rv .surf-rv-card {
	background: #fff;
	border: 1px solid var(--rv-divider);
	border-radius: var(--rv-radius-card);
	box-shadow: var(--rv-shadow);
}
.surf-rv li.surf-rv-review {
	list-style: none;
	margin: 0;
	padding: 24px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	transition: box-shadow 0.2s ease;
}
.surf-rv li.surf-rv-review:hover { box-shadow: var(--rv-shadow-hover); }
.surf-rv blockquote.surf-rv-quote {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	quotes: none;
	font-style: normal;
}
.surf-rv blockquote.surf-rv-quote::before,
.surf-rv blockquote.surf-rv-quote::after { content: none; }
.surf-rv blockquote.surf-rv-quote p {
	font-family: var(--rv-inter);
	font-size: 16px;
	line-height: 1.6;
	letter-spacing: -0.015em;
	color: var(--rv-navy);
	overflow-wrap: anywhere;
}
.surf-rv .surf-rv-meta {
	margin-top: auto;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 12px;
	font-size: 13px;
	line-height: 1.4;
	letter-spacing: -0.01em;
	color: var(--rv-gray-4);
}
.surf-rv .surf-rv-badge {
	font-family: var(--rv-jakarta);
	font-weight: 700;
	font-size: 12px;
	letter-spacing: 0.02em;
	border-radius: 9999px;
	padding: 4px 10px;
	display: inline-flex;
	align-items: center;
}
.surf-rv .surf-rv-badge.is-promoter { background: var(--rv-green-tint); color: var(--rv-green-ink); }
.surf-rv .surf-rv-badge.is-passive { background: var(--rv-blue-100); color: var(--rv-blue); }
.surf-rv .surf-rv-badge.is-detractor { background: var(--rv-gray-1); color: var(--rv-gray-4); }
.surf-rv .surf-rv-place { font-weight: 500; color: var(--rv-navy); }
.surf-rv .surf-rv-edited {
	font-family: var(--rv-jakarta);
	font-weight: 700;
	font-size: 11px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--rv-gray-4);
	border: 1px solid var(--rv-gray-2);
	border-radius: 9999px;
	padding: 2px 8px;
}

/* ---------- Button (marketing pill, ALL CAPS) ---------- */
.surf-rv .surf-rv-actions { margin-top: 32px; }
.surf-rv.surf-rv-actions { margin: 16px 0; }
.surf-rv a.surf-rv-btn {
	font-family: var(--rv-jakarta);
	font-weight: 700;
	font-size: 14px;
	line-height: 1;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
	color: #fff;
	background: var(--rv-blue);
	border-radius: 9999px;
	padding: 16px 40px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	transition: padding 0.25s ease, background 0.2s ease;
}
.surf-rv a.surf-rv-btn:hover { background: var(--rv-blue-hover); padding-right: 48px; color: #fff; }
.surf-rv a.surf-rv-btn:active { transform: translateY(1px); }
.surf-rv a.surf-rv-btn:focus-visible,
.surf-rv .surf-rv-pagination a:focus-visible {
	outline: 3px solid rgba(14, 102, 255, 0.35);
	outline-offset: 3px;
}

/* ---------- Reviews page ---------- */
.surf-rv-page { display: flex; flex-direction: column; gap: 56px; }
.surf-rv-page .surf-rv-hero { padding: clamp(32px, 5cqi, 56px); }
.surf-rv-page .surf-rv-hero-grid {
	display: grid;
	grid-template-columns: minmax(240px, 1fr) minmax(0, 1.4fr);
	gap: 40px;
	align-items: end;
}
.surf-rv-page .surf-rv-tiles {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	grid-auto-rows: 1fr; /* every tile the height of the tallest */
	gap: 12px;
	margin: 0;
}
.surf-rv-page .surf-rv-tile {
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.10);
	border-radius: var(--rv-radius-card);
	padding: 18px 20px;
	display: flex;
	flex-direction: column-reverse;
	justify-content: flex-end; /* value and label sit at the top of a taller tile */
	gap: 4px;
	min-width: 0;
}
.surf-rv-page .surf-rv-tile dt {
	font-size: 13px;
	line-height: 1.4;
	color: var(--rv-cornflower);
	font-weight: 500;
	margin: 0;
}
.surf-rv-page .surf-rv-tile dd {
	font-family: var(--rv-jakarta);
	font-weight: 700;
	font-size: clamp(26px, 3.4cqi, 34px);
	line-height: 1.1;
	letter-spacing: -0.02em;
	color: #fff;
	margin: 0;
}

.surf-rv-page .surf-rv-tables {
	display: grid;
	/* At most two per row (a 2x2 grid for the four tables), one per row when narrow. */
	grid-template-columns: repeat(auto-fit, minmax(max(300px, calc(50% - 10px)), 1fr));
	gap: 20px;
	align-items: stretch; /* cards side by side share a height; stacked cards keep their own */
}
.surf-rv-page .surf-rv-table-card { padding: 8px 20px 12px; overflow-x: auto; }
.surf-rv table.surf-rv-table th[scope="row"] { white-space: nowrap; }
.surf-rv table.surf-rv-table {
	width: 100%;
	border-collapse: collapse;
	border: 0;
	margin: 0;
	font-size: 15px;
	font-variant-numeric: tabular-nums;
}
/* Divi's ".entry-content table:not(.variations)" adds a gray outer border and a bottom margin, and
   loads after this file at the same specificity. The extra class wins it back. */
.surf-rv .surf-rv-table-card table.surf-rv-table { border: 0 !important; margin: 0 !important; width: 100%; }
.surf-rv .surf-rv-table-card table.surf-rv-table tr th,
.surf-rv .surf-rv-table-card table.surf-rv-table tr td { border-top: 0 !important; border-left: 0 !important; border-right: 0 !important; }
.surf-rv table.surf-rv-table caption {
	font-family: var(--rv-jakarta);
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--rv-blue);
	text-align: left;
	padding: 14px 0 6px;
	caption-side: top;
}
.surf-rv table.surf-rv-table th,
.surf-rv table.surf-rv-table td {
	padding: 10px 0;
	border: 0;
	border-bottom: 1px solid var(--rv-divider);
	text-align: right;
	color: var(--rv-navy);
	background: none;
}
.surf-rv table.surf-rv-table thead th {
	font-size: 12px;
	font-weight: 600;
	color: var(--rv-gray-4);
	padding-top: 4px;
}
.surf-rv table.surf-rv-table th[scope="row"] { text-align: left; font-weight: 500; }
.surf-rv table.surf-rv-table td.surf-rv-td-avg { font-family: var(--rv-jakarta); font-weight: 700; width: 5em; white-space: nowrap; }
.surf-rv table.surf-rv-table td.surf-rv-td-avg .surf-rv-of { color: var(--rv-gray-4); font-size: 0.8em; font-weight: 500; }
.surf-rv table.surf-rv-table td.surf-rv-td-nps { font-family: var(--rv-jakarta); font-weight: 500; width: 3.5em; }
.surf-rv table.surf-rv-table td:last-child { color: var(--rv-gray-4); width: 5.5em; }
.surf-rv table.surf-rv-table tbody tr:last-child th,
.surf-rv table.surf-rv-table tbody tr:last-child td { border-bottom: 0; }

.surf-rv-page .surf-rv-method {
	background: var(--rv-gray-1);
	border-radius: var(--rv-radius-mkt);
	padding: clamp(24px, 4cqi, 40px);
}
.surf-rv-page .surf-rv-method-body { color: var(--rv-gray-4); font-size: 15px; }
.surf-rv-page .surf-rv-method-body p + p { margin-top: 12px; }

.surf-rv-page .surf-rv-section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 24px;
	margin-bottom: 24px;
}
.surf-rv-page .surf-rv-section-head .surf-rv-h2 { margin: 0; }
.surf-rv-page .surf-rv-section-meta { font-size: 14px; color: var(--rv-gray-4); }
.surf-rv .surf-rv-empty,
.surf-rv .surf-rv-unavailable {
	background: var(--rv-gray-1);
	border-radius: var(--rv-radius-card);
	padding: 32px;
	color: var(--rv-gray-4);
}
.surf-rv .surf-rv-empty .surf-rv-actions { margin-top: 20px; }

/* Filters: state autocomplete, then city. */
.surf-rv .surf-rv-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 16px;
	background: var(--rv-gray-1);
	border-radius: var(--rv-radius-card);
	padding: 20px 24px;
	margin: 0 0 24px;
}
.surf-rv .surf-rv-field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 220px; min-width: 0; }
.surf-rv .surf-rv-field label {
	font-family: var(--rv-jakarta);
	font-weight: 700;
	font-size: 12px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--rv-navy);
	margin: 0;
}
.surf-rv .surf-rv-field input,
.surf-rv .surf-rv-field select {
	font-family: var(--rv-inter);
	font-size: 15px;
	letter-spacing: -0.015em;
	color: var(--rv-navy);
	background-color: #fff;
	border: 1px solid var(--rv-gray-2);
	border-radius: 8px;
	height: 48px;
	padding: 0 14px;
	width: 100%;
	margin: 0;
	box-shadow: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.surf-rv .surf-rv-field select {
	appearance: none;
	-webkit-appearance: none;
	padding-right: 40px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23181E54' d='M12 15.6 6.4 10l1.4-1.4 4.2 4.2 4.2-4.2 1.4 1.4z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 20px;
}
.surf-rv .surf-rv-field select:disabled { color: var(--rv-gray-4); background-color: var(--rv-gray-1); cursor: not-allowed; }
.surf-rv .surf-rv-field input::placeholder { color: var(--rv-gray-4); opacity: 1; }
.surf-rv .surf-rv-field input:focus,
.surf-rv .surf-rv-field select:focus {
	outline: none;
	border-color: var(--rv-blue);
	box-shadow: 0 0 0 3px rgba(14, 102, 255, 0.35);
}
.surf-rv .surf-rv-field input[aria-invalid="true"] { border-color: #ED7105; }
.surf-rv .surf-rv-filter-actions { display: flex; align-items: center; gap: 16px; flex: 0 0 auto; }
.surf-rv button.surf-rv-btn,
.surf-rv .surf-rv-btn-sm {
	font-family: var(--rv-jakarta);
	font-weight: 700;
	font-size: 13px;
	line-height: 1;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #fff;
	background: var(--rv-blue);
	border: 0;
	border-radius: 9999px;
	height: 48px;
	padding: 0 28px;
	cursor: pointer;
	transition: padding 0.25s ease, background 0.2s ease;
}
.surf-rv button.surf-rv-btn:hover { background: var(--rv-blue-hover); padding-right: 34px; }
.surf-rv button.surf-rv-btn:focus-visible { outline: 3px solid rgba(14, 102, 255, 0.35); outline-offset: 3px; }
.surf-rv a.surf-rv-clear { font-size: 14px; font-weight: 500; color: var(--rv-blue); text-decoration: none; }
.surf-rv a.surf-rv-clear:hover { text-decoration: underline; }
.surf-rv .surf-rv-filter-summary { font-size: 15px; color: var(--rv-navy); font-weight: 500; margin: -8px 0 20px; }

/* Pagination: pills, current page in blue. */
.surf-rv .surf-rv-pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin-top: 40px;
}
.surf-rv .surf-rv-pagination .page-numbers {
	font-family: var(--rv-jakarta);
	font-weight: 600;
	font-size: 14px;
	letter-spacing: -0.01em;
	min-width: 44px;
	height: 44px;
	padding: 0 14px;
	border-radius: 9999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	text-decoration: none;
	color: var(--rv-navy);
	background: #fff;
	border: 1px solid var(--rv-divider);
	transition: background 0.2s ease, border-color 0.2s ease;
}
.surf-rv .surf-rv-pagination a.page-numbers:hover { background: var(--rv-gray-1); border-color: var(--rv-gray-2); }
.surf-rv .surf-rv-pagination .page-numbers.current { background: var(--rv-blue); border-color: var(--rv-blue); color: #fff; }
.surf-rv .surf-rv-pagination .page-numbers.dots { border-color: transparent; background: none; min-width: 24px; padding: 0; }
/* The Surf Divi theme styles WordPress's generic .page-numbers with !important colors and a blue fill
   (for blog pagination). These win back the block's own colors; the selectors here are more specific. */
.surf-rv .surf-rv-pagination .page-numbers { color: var(--rv-navy) !important; background-color: #fff !important; border: 1px solid var(--rv-divider) !important; }
.surf-rv .surf-rv-pagination a.page-numbers:hover { background-color: var(--rv-gray-1) !important; border-color: var(--rv-gray-2) !important; }
.surf-rv .surf-rv-pagination .page-numbers.current { color: #fff !important; background-color: var(--rv-blue) !important; border-color: var(--rv-blue) !important; }
.surf-rv .surf-rv-pagination .page-numbers.dots { background-color: transparent !important; border-color: transparent !important; }

/* Land below the theme's sticky header when a filter or page link jumps to the comments. */
.surf-rv-page #comments { scroll-margin-top: 140px; }

/* ---------- Narrow containers (Divi columns, phones) ---------- */
@container (max-width: 760px) {
	.surf-rv-market .surf-rv-market-grid,
	.surf-rv-market .surf-rv-market-grid.is-score-only,
	.surf-rv-page .surf-rv-hero-grid { grid-template-columns: 1fr; }
	.surf-rv-market .surf-rv-score { position: relative; top: auto; } /* relative, so overflow:hidden still clips the arc rings */
	.surf-rv .surf-rv-filters { padding: 16px; }
	.surf-rv .surf-rv-filter-actions { flex: 1 1 100%; }
	.surf-rv .surf-rv-filter-actions button.surf-rv-btn { flex: 1; }
	.surf-rv .surf-rv-score,
	.surf-rv .surf-rv-hero { border-radius: 24px; padding: 28px 24px; }
	.surf-rv li.surf-rv-review { padding: 20px; }
	.surf-rv a.surf-rv-btn { width: 100%; justify-content: center; }
	/* Newer and Older share the first row; page numbers wrap below. */
	.surf-rv .surf-rv-pagination .page-numbers.prev,
	.surf-rv .surf-rv-pagination .page-numbers.next { flex: 1 1 calc(50% - 4px); order: -1; }
}

@media (prefers-reduced-motion: reduce) {
	.surf-rv a.surf-rv-btn,
	.surf-rv li.surf-rv-review { transition: none; }
}
