/* Dropzone Dashboard — frontend
 * Directive 8: brand palette as CSS custom properties from the start.
 * Layout: flexbox, two top-level columns; right column splits into two.
 */

.sdb-dashboard {
	/* Brand palette — change here, nowhere else. */
	--sdb-orange: #E59635;
	--sdb-orange-dark: #c97e22;
	--sdb-ink: #1a1a1a;
	--sdb-paper: #ffffff;
	--sdb-panel: #f6f5f3;
	--sdb-line: #e2dfd9;
	--sdb-muted: #6b6660;
	--sdb-jumprun: #18b6d6;   /* high-vis cyan over satellite */
	--sdb-pattern: #E59635;   /* orange landing pattern */
	--sdb-radius: 12px;
	--sdb-gap: 16px;

	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	color: var(--sdb-ink);
	font-size: 15px;
	line-height: 1.45;
	box-sizing: border-box;
}
.sdb-dashboard *,
.sdb-dashboard *::before,
.sdb-dashboard *::after { box-sizing: inherit; }

.sdb-loading {
	padding: 2rem;
	color: var(--sdb-muted);
	text-align: center;
}

/* --- Top-level flex: map column + info column --- */
.sdb-grid {
	display: flex;
	flex-wrap: wrap;
	gap: var(--sdb-gap);
	align-items: stretch;
}
.sdb-col-map { flex: 1 1 380px; min-width: 300px; }
.sdb-col-info { flex: 1 1 420px; min-width: 300px; display: flex; flex-direction: column; gap: var(--sdb-gap); }

/* Right column splits into two sub-columns (data text + winds) */
.sdb-info-split {
	display: flex;
	flex-wrap: wrap;
	gap: var(--sdb-gap);
	height: 100%;
}
.sdb-sub { flex: 1 1 200px; min-width: 200px; }

/* --- Panels --- */
.sdb-panel {
	background: var(--sdb-panel);
	border: 1px solid var(--sdb-line);
	border-radius: var(--sdb-radius);
	padding: 16px;
	height: 100%;
}
.sdb-panel h3 {
	margin: 0 0 12px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--sdb-orange-dark);
}

/* --- Map --- */
.sdb-map-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	border-radius: var(--sdb-radius);
	overflow: hidden;
	background: #2b2b2b;
	border: 1px solid var(--sdb-line);
}
.sdb-map-wrap img.sdb-map-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.sdb-map-wrap svg.sdb-map-overlay {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}
.sdb-map-legend {
	position: absolute;
	left: 8px;
	bottom: 8px;
	display: flex;
	gap: 10px;
	font-size: 11px;
	background: rgba(26,26,26,0.72);
	color: #fff;
	padding: 5px 9px;
	border-radius: 8px;
}
.sdb-map-legend span { display: inline-flex; align-items: center; gap: 5px; }
.sdb-map-legend i { width: 12px; height: 3px; border-radius: 2px; display: inline-block; }

/* --- Info text rows --- */
.sdb-data-block { margin-bottom: 14px; }
.sdb-data-block:last-child { margin-bottom: 0; }
.sdb-data-label {
	font-size: 11px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--sdb-muted);
	margin-bottom: 2px;
}
.sdb-data-value { font-size: 15px; font-weight: 600; }
.sdb-data-value .sdb-sub-detail { font-weight: 400; color: var(--sdb-muted); font-size: 13px; }

.sdb-comments {
	white-space: pre-wrap;
	font-weight: 400;
	background: var(--sdb-paper);
	border: 1px solid var(--sdb-line);
	border-radius: 8px;
	padding: 8px 10px;
}

/* --- Winds aloft table (instrument readout: tabular figures) --- */
.sdb-winds table {
	width: 100%;
	border-collapse: collapse;
	font-variant-numeric: tabular-nums;
	font-size: 13px;
}
.sdb-winds th, .sdb-winds td {
	padding: 5px 6px;
	text-align: right;
	border-bottom: 1px solid var(--sdb-line);
	white-space: nowrap;
}
.sdb-winds th { color: var(--sdb-muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
.sdb-winds td.sdb-alt { text-align: left; font-weight: 700; }
.sdb-winds .sdb-wind-arrow { display: inline-block; color: var(--sdb-ink); transform-origin: center; }
.sdb-cloud-bar {
	display: inline-block;
	height: 8px;
	border-radius: 4px;
	background: linear-gradient(90deg, var(--sdb-line), var(--sdb-muted));
	vertical-align: middle;
}
.sdb-surface-row td { background: #efe7d8; font-weight: 700; }

.sdb-meta {
	margin-top: 10px;
	font-size: 11px;
	color: var(--sdb-muted);
}
.sdb-stale { color: var(--sdb-orange-dark); font-weight: 600; }
.sdb-error { color: #b3261e; padding: 8px 0; }

@media (max-width: 720px) {
	.sdb-col-map, .sdb-col-info { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.sdb-dashboard * { transition: none !important; animation: none !important; }
}
