/* Cord Cutter Search. Colors fall back to the Cord Cutter theme's palette. */
.ccs-dialog {
	--ccs-ink: var(--wp--preset--color--ink, #14202e);
	--ccs-text: var(--wp--preset--color--body, #33465a);
	--ccs-muted: var(--wp--preset--color--muted, #4a5b6d);
	--ccs-line: var(--wp--preset--color--line, #dce3ea);
	--ccs-hover: var(--wp--preset--color--tint, #eef3f8);
	--ccs-accent: var(--wp--preset--color--accent, #1b4f80);
	--ccs-mark: #d6ecd2;

	position: fixed;
	inset: 0;
	margin: 12vh auto auto;
	width: min(720px, calc(100vw - 24px));
	max-width: none;
	max-height: none;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--ccs-text);
	font-family: var(--wp--preset--font-family--sans, system-ui, -apple-system, "Segoe UI", sans-serif);
	overflow: visible;
}
.ccs-dialog::backdrop {
	background: rgba(20, 32, 46, 0.55);
}
html.ccs-lock {
	overflow: hidden;
}
.ccs-panel {
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 24px 64px rgba(10, 20, 30, 0.35);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	max-height: 76vh;
}
.ccs-bar {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 6px 12px 6px 20px;
	border-bottom: 1px solid var(--ccs-line);
}
.ccs-icon {
	display: inline-flex;
	color: var(--ccs-ink);
	flex: none;
}
.ccs-input {
	flex: 1;
	min-width: 0;
	height: 56px;
	border: 0;
	outline: none;
	background: transparent;
	font: inherit;
	font-size: 1.125rem;
	color: var(--ccs-ink);
	-webkit-appearance: none;
	appearance: none;
}
.ccs-input::-webkit-search-cancel-button {
	-webkit-appearance: none;
}
.ccs-close {
	flex: none;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--ccs-accent);
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
}
.ccs-close:hover,
.ccs-close:focus-visible {
	background: var(--ccs-hover);
}
.ccs-dialog.is-loading .ccs-icon {
	animation: ccs-pulse 0.9s ease-in-out infinite;
}
@keyframes ccs-pulse {
	50% { opacity: 0.35; }
}
@media (prefers-reduced-motion: reduce) {
	.ccs-dialog.is-loading .ccs-icon { animation: none; }
}
.ccs-status:not(:empty) {
	padding: 14px 20px;
	font-size: 0.9375rem;
	color: var(--ccs-muted);
}
.ccs-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
.ccs-status:has(.ccs-sr) {
	padding: 0;
}
.ccs-list {
	overflow-y: auto;
	padding: 8px 10px;
	overscroll-behavior: contain;
}
.ccs-list:empty {
	display: none;
}
.ccs-group {
	padding: 14px 10px 8px;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ccs-muted);
}
.ccs-item {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 10px;
	border-radius: 10px;
	color: inherit;
	text-decoration: none;
}
.ccs-item.is-active {
	background: var(--ccs-hover);
}
.ccs-thumb {
	flex: none;
	width: 48px;
	height: 48px;
	border-radius: 8px;
	overflow: hidden;
	background: var(--ccs-hover);
}
.ccs-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.ccs-body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
}
.ccs-title {
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.3;
	color: var(--ccs-ink);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.ccs-line {
	display: flex;
	gap: 8px;
	align-items: baseline;
	font-size: 0.875rem;
	line-height: 1.4;
	color: var(--ccs-muted);
}
.ccs-snippet {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.ccs-date {
	flex: none;
	font-size: 0.8125rem;
}
.ccs-date::before {
	content: "· ";
}
.ccs-dialog mark {
	background: var(--ccs-mark);
	color: inherit;
	border-radius: 3px;
	padding: 0 1px;
}
.ccs-all {
	display: block;
	padding: 14px 20px;
	border-top: 1px solid var(--ccs-line);
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--ccs-accent);
	text-decoration: none;
}
.ccs-all[hidden] {
	display: none;
}
.ccs-all:hover,
.ccs-all:focus-visible {
	background: var(--ccs-hover);
}

.ccs-close-text {
	display: none;
}

/* Phones: full screen, like Substack's mobile search */
@media (max-width: 640px) {
	.ccs-dialog {
		margin: 0;
		width: 100vw;
		height: 100vh;
		height: 100dvh;
	}
	.ccs-dialog::backdrop {
		background: #fff;
	}
	.ccs-panel {
		height: 100%;
		max-height: none;
		border-radius: 0;
		box-shadow: none;
		padding-top: env(safe-area-inset-top);
	}
	.ccs-bar {
		padding: 4px 8px 4px 16px;
	}
	.ccs-close {
		width: auto;
		padding: 0 10px;
		font-size: 1rem;
		font-weight: 600;
		color: var(--ccs-ink);
	}
	.ccs-close-x {
		display: none;
	}
	.ccs-close-text {
		display: inline;
	}
	.ccs-list {
		flex: 0 1 auto;
		padding: 0 6px 4px;
	}
	.ccs-thumb {
		width: 48px;
		height: 48px;
	}
	.ccs-item {
		gap: 12px;
		padding: 10px;
	}
	.ccs-all {
		margin: 6px 16px calc(16px + env(safe-area-inset-bottom));
		padding: 12px;
		border: 1px solid var(--ccs-line);
		border-radius: 10px;
		text-align: center;
		color: var(--ccs-ink);
	}
}
