/**
 * Warp Scan — [warp_scan_list] recently scanned sites, paged.
 *
 * px units on purpose: the site theme sets a 10px root font size.
 * Same palette and score colours as the slider (recent.css). Score colour
 * is always paired with the number and the grade letter.
 */

.wsrl {
	--wsrl-ink: #0f0f0f;
	--wsrl-ink-2: #6d6d6d;
	--wsrl-surface: #ffffff;
	--wsrl-row-hover: #f6f8fc;
	--wsrl-line: #e6e6e6;
	--wsrl-chip: #f2f2f2;
	--wsrl-good: #15803d;
	--wsrl-avg: #a15c07;
	--wsrl-poor: #b91c1c;
	--wsrl-focus: #3b82f6;
	--wsrl-warp-ink: #1d4ed8;
	--wsrl-warp-bg: rgba(59, 130, 246, 0.12);
	--wsrl-btn: #2563eb;
	--wsrl-btn-hover: #1d4ed8;

	box-sizing: border-box;
	width: 100%;
	color: var(--wsrl-ink);
	font-family: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.4;
}

.wsrl--dark {
	--wsrl-ink: #f6f8fc;
	--wsrl-ink-2: #a3a3a3;
	--wsrl-surface: #1a1a1a;
	--wsrl-row-hover: #222222;
	--wsrl-line: #2e2e2e;
	--wsrl-chip: #262626;
	--wsrl-good: #6ee7a0;
	--wsrl-avg: #f5b942;
	--wsrl-poor: #ff8a7a;
	--wsrl-focus: #93c5fd;
	--wsrl-warp-ink: #93c5fd;
	--wsrl-warp-bg: rgba(59, 130, 246, 0.18);
}

.wsrl *,
.wsrl *::before,
.wsrl *::after {
	box-sizing: border-box;
}

.wsrl .wsrl__heading {
	margin: 0 0 12px;
	padding-left: 4px;
	color: var(--wsrl-ink-2);
	font-family: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.08em;
	line-height: 1.3;
	text-transform: uppercase;
}

.wsrl__panel {
	overflow: hidden;
	background: var(--wsrl-surface);
	border: 1px solid var(--wsrl-line);
	border-radius: 14px;
}

/* One grid shared by the column labels and every row, so columns line up. */
.wsrl__cols,
.wsrl__row {
	display: grid;
	grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1.15fr) 40px 16px;
	align-items: center;
	gap: 16px;
	padding: 12px 18px;
}

.wsrl__cols {
	padding-top: 10px;
	padding-bottom: 10px;
	color: var(--wsrl-ink-2);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	border-bottom: 1px solid var(--wsrl-line);
}

.wsrl__cols span:first-child {
	grid-column: 1 / 3;
}

.wsrl__cols span:last-child {
	grid-column: 4 / 6;
}

.wsrl__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.wsrl__item {
	margin: 0;
	padding: 0;
}

.wsrl__item + .wsrl__item {
	border-top: 1px solid var(--wsrl-line);
}

.wsrl__row {
	color: inherit;
	text-decoration: none;
	transition: background-color 0.15s ease-out;
}

.wsrl__row:hover {
	background: var(--wsrl-row-hover);
}

.wsrl__row:focus-visible {
	outline: 2px solid var(--wsrl-focus);
	outline-offset: -2px;
}

.wsrl__more[hidden] {
	display: none !important;
}

/* New rows from "Load more" fade in. */
.wsrl__item.is-new {
	animation: wsrl-in 0.35s ease-out both;
}

@keyframes wsrl-in {
	from {
		opacity: 0;
		transform: translateY(4px);
	}
}

.wsrl__ring {
	position: relative;
	display: block;
	width: 44px;
	height: 44px;
}

.wsrl__ring svg {
	display: block;
	transform: rotate(-90deg);
}

.wsrl__ring circle {
	fill: none;
	stroke-width: 3.5;
}

.wsrl__bg {
	stroke: var(--wsrl-line);
}

.wsrl__arc {
	stroke: var(--wsrl-good);
	stroke-linecap: round;
}

.wsrl__row--average .wsrl__arc {
	stroke: var(--wsrl-avg);
}

.wsrl__row--poor .wsrl__arc {
	stroke: var(--wsrl-poor);
}

.wsrl__score {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: "Plus Jakarta Sans", "DM Sans", ui-sans-serif, system-ui, sans-serif;
	font-size: 15px;
	font-weight: 800;
}

.wsrl__site {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.wsrl__domain {
	overflow: hidden;
	font-weight: 700;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wsrl__date {
	color: var(--wsrl-ink-2);
	font-size: 13px;
}

.wsrl__stack {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	min-width: 0;
}

.wsrl__chip {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	max-width: 100%;
	padding: 3px 9px;
	overflow: hidden;
	color: var(--wsrl-ink);
	font-size: 13px;
	font-weight: 600;
	line-height: 18px;
	white-space: nowrap;
	background: var(--wsrl-chip);
	border-radius: 999px;
}

.wsrl__chip > span {
	overflow: hidden;
	text-overflow: ellipsis;
}

.wsrl__chip--warp {
	padding-left: 7px;
	color: var(--wsrl-warp-ink);
	background: var(--wsrl-warp-bg);
}

.wsrl__chip--warp .wsrs-warp-icon {
	display: block;
	flex: none;
}

.wsrl__ver {
	flex: none;
	font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 12px;
	font-weight: 500;
	opacity: 0.8;
}

.wsrl__chip--more {
	color: var(--wsrl-ink-2);
}

.wsrl__none {
	color: var(--wsrl-ink-2);
	font-size: 13px;
}

.wsrl__grade {
	justify-self: start;
	min-width: 32px;
	padding: 2px 8px;
	color: var(--wsrl-good);
	font-size: 13px;
	font-weight: 700;
	text-align: center;
	border: 1px solid currentcolor;
	border-radius: 8px;
}

.wsrl__row--average .wsrl__grade {
	color: var(--wsrl-avg);
}

.wsrl__row--poor .wsrl__grade {
	color: var(--wsrl-poor);
}

.wsrl__go {
	display: block;
	color: var(--wsrl-ink-2);
	transition: transform 0.15s ease-out;
}

.wsrl__row:hover .wsrl__go {
	transform: translateX(2px);
}

.wsrl__foot {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	margin-top: 16px;
}

.wsrl .wsrl__more {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	margin: 0;
	padding: 10px 22px;
	color: #ffffff;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	background: var(--wsrl-btn);
	border: 0;
	border-radius: 999px;
	transition: background-color 0.15s ease-out;
}

.wsrl .wsrl__more:hover {
	background: var(--wsrl-btn-hover);
}

.wsrl .wsrl__more:focus-visible {
	outline: 2px solid var(--wsrl-focus);
	outline-offset: 3px;
}

.wsrl .wsrl__more[aria-busy="true"] {
	cursor: progress;
}

.wsrl .wsrl__more[aria-busy="true"] [data-wsrl-label] {
	visibility: hidden;
}

.wsrl__spin {
	position: absolute;
	display: none;
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: wsrl-spin 0.8s linear infinite;
}

.wsrl__more[aria-busy="true"] .wsrl__spin {
	display: block;
}

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

.wsrl__status {
	min-height: 1.4em;
	margin: 0;
	color: var(--wsrl-ink-2);
	font-size: 13px;
	text-align: center;
}

.wsrl__status:empty {
	min-height: 0;
}

/* Phones: platform chips move under the domain; column labels go. */
@media (max-width: 600px) {
	.wsrl__cols {
		display: none;
	}

	.wsrl__row {
		grid-template-columns: 44px minmax(0, 1fr) auto;
		grid-template-areas:
			"ring site grade"
			"ring stack stack";
		gap: 6px 12px;
		padding: 12px 14px;
	}

	.wsrl__ring {
		grid-area: ring;
		align-self: start;
	}

	.wsrl__site {
		grid-area: site;
	}

	.wsrl__stack {
		grid-area: stack;
	}

	.wsrl__grade {
		grid-area: grade;
	}

	.wsrl__go {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wsrl__item.is-new,
	.wsrl__spin {
		animation: none;
	}

	.wsrl__row,
	.wsrl__go {
		transition: none;
	}
}
