/* SeeDive — "monitor wall" grid. Scoped under .seedive; theme-agnostic. */

.seedive {
	--cd-bg: #101418;
	--cd-tile: #1a2027;
	--cd-line: #2b333d;
	--cd-text: #e8edf2;
	--cd-dim: #8b97a3;
	--cd-live: #38d39f;
	--cd-accent: #4ea1ff;
	color: var(--cd-text);
	background: var(--cd-bg);
	border-radius: 10px;
	padding: 16px;
	font-size: 15px;
	line-height: 1.4;
}

/* search bar */
.seedive-search {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}
.seedive-search input[type="text"],
.seedive-search select {
	background: var(--cd-tile);
	color: var(--cd-text);
	border: 1px solid var(--cd-line);
	border-radius: 6px;
	padding: 9px 12px;
	font-size: 15px;
}
.seedive-search input[type="text"] { flex: 1 1 260px; min-width: 0; }
.seedive-search .seedive-go {
	background: var(--cd-accent);
	color: #0b1016;
	font-weight: 600;
	border: 0;
	border-radius: 6px;
	padding: 9px 18px;
	cursor: pointer;
}
.seedive-search .seedive-go:hover { filter: brightness(1.1); }
.seedive-search input:focus-visible,
.seedive-search select:focus-visible,
.seedive-search button:focus-visible,
.seedive-tile:focus-visible,
.seedive-modal-close:focus-visible {
	outline: 2px solid var(--cd-accent);
	outline-offset: 2px;
}

.seedive-status {
	color: var(--cd-dim);
	margin: 10px 2px 0;
	min-height: 1.3em;
	font-variant-numeric: tabular-nums;
}

/* grid */
.seedive-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 10px;
	margin-top: 12px;
}
.seedive-tile {
	margin: 0;
	background: var(--cd-tile);
	border: 1px solid var(--cd-line);
	border-radius: 8px;
	overflow: hidden;
	cursor: pointer;
	transition: transform .12s ease, border-color .12s ease;
}
.seedive-tile:hover { transform: translateY(-2px); border-color: var(--cd-accent); }
.seedive-tile img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	background: #000;
}
.seedive-tile figcaption { padding: 8px 10px; }
.seedive-title {
	display: block;
	font-weight: 600;
	font-size: 13.5px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.seedive-sub {
	display: flex;
	align-items: center;
	gap: 6px;
	color: var(--cd-dim);
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 11.5px;
	margin-top: 2px;
}
.seedive-dot {
	width: 7px; height: 7px;
	border-radius: 50%;
	background: var(--cd-live);
	box-shadow: 0 0 6px var(--cd-live);
	animation: seedive-pulse 2.4s ease-in-out infinite;
	flex: 0 0 auto;
}
@keyframes seedive-pulse { 50% { opacity: .35; } }

.seedive-snap-err img { opacity: .25; }
.seedive-nosnap img { display: none; }
/* Cams with no usable snapshot get a placeholder rather than a blank square. */
.seedive-nosnap > img,
.seedive-snap-err > img { }
.seedive-nosnap::before,
.seedive-snap-err::before {
	content: "";
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	background:
		linear-gradient(135deg, #1a1f26 0%, #11151a 100%)
		center/40px 40px no-repeat;
	background-image:
		url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 24 24' fill='none' stroke='%234a5568' stroke-width='1.5'><path d='M23 7l-7 5 7 5V7z'/><rect x='1' y='5' width='15' height='14' rx='2'/></svg>"),
		linear-gradient(135deg, #1a1f26 0%, #11151a 100%);
	background-repeat: no-repeat, no-repeat;
	background-position: center, center;
	background-size: 44px 44px, cover;
}
.seedive-snap-err::before { opacity: .8; }

/* modal */
.seedive-noscroll { overflow: hidden; }
.seedive-modal { position: fixed; inset: 0; z-index: 99999; }
.seedive-modal[hidden] { display: none; }
.seedive-modal-backdrop {
	position: absolute; inset: 0;
	background: rgba(5, 8, 12, .82);
	backdrop-filter: blur(2px);
}
.seedive-modal-panel {
	position: relative;
	margin: 4vh auto;
	width: min(1100px, 94vw);
	background: var(--cd-bg, #101418);
	color: #e8edf2;
	border: 1px solid #2b333d;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 18px 60px rgba(0,0,0,.6);
}
.seedive-modal-media {
	background: #000;
	aspect-ratio: 16 / 9;
}
.seedive-modal-media iframe,
.seedive-modal-media video,
.seedive-modal-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	border: 0;
}
.seedive-modal-meta {
	display: flex;
	align-items: baseline;
	gap: 12px;
	flex-wrap: wrap;
	padding: 10px 14px;
}
.seedive-meta-sub {
	color: #8b97a3;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 12px;
}
.seedive-attr {
	margin-left: auto;
	color: #4ea1ff;
	font-size: 13px;
	text-decoration: none;
}
.seedive-attr:hover { text-decoration: underline; }
.seedive-modal-close {
	position: absolute;
	top: 8px; right: 8px;
	z-index: 2;
	width: 36px; height: 36px;
	border: 0;
	border-radius: 50%;
	background: rgba(16, 20, 24, .8);
	color: #e8edf2;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}
.seedive-modal-close:hover { background: rgba(40, 48, 58, .9); }

@media (max-width: 540px) {
	.seedive-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
	.seedive-modal-panel { margin: 2vh auto; width: 96vw; }
}

@media (prefers-reduced-motion: reduce) {
	.seedive-dot { animation: none; }
	.seedive-tile { transition: none; }
	.seedive-tile:hover { transform: none; }
}

/* ---------------- submit-a-cam form ---------------- */
.seedive-submit-form { display: flex; flex-direction: column; gap: 12px; }
.seedive-field { margin: 0; }
.seedive-field label {
	display: flex;
	flex-direction: column;
	gap: 5px;
	font-size: 13px;
	color: var(--cd-dim);
}
.seedive-field input,
.seedive-field select,
.seedive-field textarea {
	background: var(--cd-tile);
	color: var(--cd-text);
	border: 1px solid var(--cd-line);
	border-radius: 6px;
	padding: 9px 12px;
	font-size: 15px;
	width: 100%;
	box-sizing: border-box;
}
.seedive-field textarea { resize: vertical; }
.seedive-field-row { display: flex; gap: 12px; flex-wrap: wrap; }
.seedive-field-row label { flex: 1 1 200px; }
.seedive-submit-status { color: var(--cd-dim); font-size: 14px; min-height: 1.2em; margin: 0; }
/* honeypot — kept in the DOM for bots, removed from view for humans */
.seedive-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px; height: 1px;
	overflow: hidden;
}
