/* Surf Clip Finder — Surf Chronic theme
   Deep-ocean navy panel, sky-blue accent, orange timestamps, IBM Plex Mono labels.
   Everything is scoped under .scf-wrap so it can't fight the site theme. */

.scf-wrap {
	--scf-bg: #020c1b;
	--scf-bg-2: #06182e;
	--scf-line: #0e2a47;
	--scf-text: #e2e8f0;
	--scf-dim: #7d93ab;
	--scf-accent: #38bdf8;
	--scf-accent-2: #fb923c;
	--scf-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

	background: var(--scf-bg) !important;
	color: var(--scf-text) !important;
	border: 1px solid var(--scf-line);
	border-radius: 14px;
	padding: 28px 24px 18px;
	margin: 24px auto;
	max-width: 960px;
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
	position: relative;
	overflow: hidden;
}

/* thin swell line across the top */
.scf-wrap::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--scf-accent) 0%, #0ea5e9 45%, var(--scf-accent-2) 100%);
}

.scf-wrap * { box-sizing: border-box; }

.scf-head { padding-right: 52px; }

/* ---------- header ---------- */
.scf-eyebrow {
	font-family: var(--scf-mono);
	font-size: 11px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--scf-accent);
}

.scf-title {
	margin: 6px 0 6px !important;
	color: var(--scf-text) !important;
	font-size: clamp(24px, 3.4vw, 32px);
	line-height: 1.15;
	font-weight: 800;
	letter-spacing: -0.01em;
}

.scf-sub {
	margin: 0 0 20px !important;
	color: var(--scf-dim) !important;
	font-size: 14.5px;
	line-height: 1.55;
	max-width: 62ch;
}

/* ---------- form ---------- */
.scf-form {
	display: grid;
	grid-template-columns: 2fr 1.2fr 1fr 1fr auto;
	gap: 12px;
	align-items: end;
	padding: 16px;
	background: var(--scf-bg-2);
	border: 1px solid var(--scf-line);
	border-radius: 10px;
	margin: 0 0 18px;
}

.scf-field { display: flex; flex-direction: column; gap: 6px; }

.scf-field label {
	font-family: var(--scf-mono);
	font-size: 10.5px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--scf-dim);
}

.scf-field select,
.scf-field input {
	background: var(--scf-bg) !important;
	color: var(--scf-text) !important;
	border: 1px solid var(--scf-line) !important;
	border-radius: 8px !important;
	padding: 10px 12px !important;
	font-family: var(--scf-mono);
	font-size: 14px;
	line-height: 1.2;
	width: 100%;
	min-height: 42px;
	appearance: none;
	-webkit-appearance: none;
	color-scheme: dark; /* dark native date/time pickers */
}

.scf-field select {
	background-image: linear-gradient(45deg, transparent 50%, var(--scf-accent) 50%),
		linear-gradient(135deg, var(--scf-accent) 50%, transparent 50%);
	background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%;
	background-size: 5px 5px, 5px 5px;
	background-repeat: no-repeat;
	padding-right: 34px !important;
}

.scf-field select:focus,
.scf-field input:focus {
	outline: 2px solid var(--scf-accent) !important;
	outline-offset: 1px;
	border-color: var(--scf-accent) !important;
}

.scf-btn {
	background: var(--scf-accent) !important;
	color: #04121f !important;
	border: none !important;
	border-radius: 8px !important;
	padding: 0 22px !important;
	min-height: 42px;
	font-family: var(--scf-mono);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	cursor: pointer;
	transition: transform 0.12s ease, background 0.12s ease;
	white-space: nowrap;
}

.scf-btn:hover { background: #7dd3fc !important; transform: translateY(-1px); }
.scf-btn:disabled { opacity: 0.55; cursor: wait; transform: none; }

/* ---------- status ---------- */
.scf-status {
	font-family: var(--scf-mono);
	font-size: 13px;
	color: var(--scf-dim);
	min-height: 20px;
	margin-bottom: 10px;
}

.scf-status.scf-err { color: var(--scf-accent-2); }
.scf-status .scf-count { color: var(--scf-accent); font-weight: 600; }

/* ---------- results grid ---------- */
.scf-results {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 14px;
}

.scf-card {
	display: block;
	background: var(--scf-bg-2);
	border: 1px solid var(--scf-line);
	border-radius: 10px;
	overflow: hidden;
	text-decoration: none !important;
	transition: transform 0.14s ease, border-color 0.14s ease;
}

.scf-card:hover { transform: translateY(-3px); border-color: var(--scf-accent); }

.scf-thumb {
	position: relative;
	aspect-ratio: 16 / 9;
	background: #04101f;
}

.scf-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	margin: 0 !important;
}

/* play badge for video clips */
.scf-play {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: rgba(226, 232, 240, 0.92);
	font-size: 34px;
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
	pointer-events: none;
}

/* timestamp — the whole point of the tool, so it gets the orange */
.scf-time {
	position: absolute;
	left: 8px;
	bottom: 8px;
	font-family: var(--scf-mono);
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: 0.05em;
	color: var(--scf-accent-2);
	background: rgba(2, 12, 27, 0.85);
	border: 1px solid rgba(251, 146, 60, 0.35);
	border-radius: 6px;
	padding: 3px 8px;
}

.scf-meta {
	padding: 9px 11px 11px;
}

.scf-name {
	font-family: var(--scf-mono);
	font-size: 11px;
	color: var(--scf-dim);
	word-break: break-all;
	line-height: 1.4;
}

/* date group headers in "any date" mode */
.scf-datehead {
	grid-column: 1 / -1;
	font-family: var(--scf-mono);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--scf-accent);
	border-bottom: 1px solid var(--scf-line);
	padding: 10px 2px 6px;
	margin-top: 4px;
}

/* label row that carries the "Any date" switch beside the DATE label */
.scf-label-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	min-height: 16px;
}

/* "Any date" switch (real button — works on mobile), compact inline version */
.scf-any {
	display: inline-flex !important;
	align-items: center;
	gap: 6px;
	background: none !important;
	border: none !important;
	padding: 2px 0 2px 8px !important;
	margin: 0;
	min-height: 0;
	line-height: 1;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.scf-any-track {
	position: relative;
	width: 32px;
	height: 18px;
	border-radius: 999px;
	background: var(--scf-line);
	border: 1px solid var(--scf-line);
	transition: background 0.15s ease;
	flex: none;
}

.scf-any-knob {
	position: absolute;
	top: 2px;
	left: 2px;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--scf-dim);
	transition: transform 0.15s ease, background 0.15s ease;
}

.scf-any-on .scf-any-track { background: var(--scf-accent); border-color: var(--scf-accent); }
.scf-any-on .scf-any-knob  { transform: translateX(14px); background: #04121f; }

.scf-any-text {
	font-family: var(--scf-mono);
	font-size: 10.5px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--scf-dim);
	white-space: nowrap;
}

.scf-any-on .scf-any-text { color: var(--scf-accent); }

.scf-any:focus-visible { outline: 2px solid var(--scf-accent); outline-offset: 2px; border-radius: 8px; }

/* dark / light mode button, top-right corner */
.scf-theme {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 2;
	background: var(--scf-bg-2) !important;
	color: var(--scf-accent) !important;
	border: 1px solid var(--scf-line) !important;
	border-radius: 999px !important;
	width: 40px;
	height: 40px;
	padding: 0 !important;
	font-size: 17px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	-webkit-tap-highlight-color: transparent;
}

.scf-theme:hover { border-color: var(--scf-accent) !important; }
.scf-theme .scf-theme-sun { display: none; }
.scf-theme .scf-theme-moon { display: block; }
.scf-light .scf-theme .scf-theme-sun { display: block; }
.scf-light .scf-theme .scf-theme-moon { display: none; }

/* ---------- light mode palette ---------- */
.scf-wrap.scf-light {
	--scf-bg: #f5f9fd;
	--scf-bg-2: #ffffff;
	--scf-line: #d3e2f0;
	--scf-text: #0f2439;
	--scf-dim: #52708c;
	--scf-accent: #0284c7;
	--scf-accent-2: #d97014;
	box-shadow: 0 14px 40px rgba(15, 36, 57, 0.12);
}

.scf-light .scf-field select,
.scf-light .scf-field input { color-scheme: light; }

.scf-light .scf-btn { color: #ffffff !important; }
.scf-light .scf-btn:hover { background: #0369a1 !important; }
.scf-light .scf-any-on .scf-any-knob { background: #ffffff; }
.scf-light .scf-time { background: rgba(255, 255, 255, 0.92); }
.scf-light .scf-foot { color: #8aa4bd !important; }
.scf-light .scf-skel {
	background: linear-gradient(100deg, #e9f1f9 40%, #d8e6f3 50%, #e9f1f9 60%);
	background-size: 200% 100%;
}

.scf-empty,
.scf-none {
	font-family: var(--scf-mono);
	color: var(--scf-dim);
	font-size: 13.5px;
	padding: 26px 10px;
	text-align: center;
	border: 1px dashed var(--scf-line);
	border-radius: 10px;
}

.scf-diag {
	margin-top: 10px;
	font-size: 11px;
	color: var(--scf-accent-2);
	opacity: 0.85;
	line-height: 1.5;
}

.scf-foot {
	margin: 18px 0 0 !important;
	font-family: var(--scf-mono);
	font-size: 10.5px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #3d5570 !important;
	text-align: center;
}

/* skeleton shimmer while loading */
.scf-skel {
	aspect-ratio: 16 / 9;
	border-radius: 10px;
	background: linear-gradient(100deg, var(--scf-bg-2) 40%, #0a2340 50%, var(--scf-bg-2) 60%);
	background-size: 200% 100%;
	animation: scf-shimmer 1.1s infinite linear;
}

@keyframes scf-shimmer {
	to { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
	.scf-card, .scf-btn { transition: none; }
	.scf-skel { animation: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
	.scf-form { grid-template-columns: 1fr 1fr; }
	.scf-field-spot { grid-column: 1 / -1; }
	.scf-field-btn { grid-column: 1 / -1; }
	.scf-btn { width: 100%; }
}

@media (max-width: 480px) {
	.scf-wrap { padding: 22px 14px 14px; border-radius: 10px; }
	.scf-form { grid-template-columns: 1fr; }
	.scf-results { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
