.galaxy-view-content { --gx-panel-font: "Segoe UI", system-ui, -apple-system, sans-serif; }
/* Overview: Galaxy graph controls, index counts, toolbar toggles, and configured inspector styles. */
/* Overview: Galaxy view, control panel, scrollable tags, and source inspector styles. */
/* Galaxy View — view, control panel, overlays (deep-space gx-theme-dark / daylight gx-theme-light) */

.galaxy-view-content {
	padding: 0;
	overflow: hidden;
	position: relative;
	font-family: 'Roboto', var(--font-interface, sans-serif);
}

.galaxy-view-canvas {
	position: absolute;
	inset: 0;
}

.galaxy-view-canvas:focus {
	outline: none;
}

/* ---------- Header / icon rail / toolbar (same chrome as the isomorphic app) ----------
   Header (50px) spans the top; the rail runs full height beneath it; the Data
   toolbar (36px) sits between them and only shows while the Data drawer is open.
   Layout mirrors topomorphic app.css (.app-header / .icon-rail / .layout-toolbar). */

.gx-header {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 50px;
	z-index: 30;
	background: #000000;
	border-bottom: 1px solid #202a40;
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 0 16px;
}

.gx-header-menu {
	flex: none;
	background: none;
	border: none;
	box-shadow: none;
	padding: 6px;
	display: flex;
	align-items: center;
	cursor: pointer;
	color: #faf8f7;
}

.gx-header-menu:hover {
	color: #4ade80;
}

.gx-brand {
	display: flex;
	flex-direction: row;
	align-items: baseline;
	gap: 8px;
}

.gx-brand-name {
	font-family: 'Orbitron', 'Roboto', sans-serif;
	font-size: 22px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: 3px;
	background: linear-gradient(90deg, #6c8ce8, #35d6c4);
	background-clip: text;
	-webkit-background-clip: text;
	color: transparent;
}

.gx-brand-sep {
	color: #8b97b4;
	font-size: 16px;
}

.gx-brand-sub {
	font-family: 'Orbitron', 'Roboto', sans-serif;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 1px;
	background: linear-gradient(90deg, #35d6c4, #a77bff);
	background-clip: text;
	-webkit-background-clip: text;
	color: transparent;
}

/* Rail: positioned under the header. Its look (colours, widths, icons, active state) comes
   from ../css/sidenav.css, shared with every other page's menu. */
.gx-rail {
	position: absolute;
	top: 50px;
	left: 0;
	bottom: 0;
	z-index: 22;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	overflow-x: hidden;
	overflow-y: auto;
}

/* Data-view toolbar: one non-scrolling line of search fields + Recenter. */
.gx-toolbar {
	position: absolute;
	top: 50px;
	left: var(--sidenav-collapsed);
	right: 0;
	height: 36px;
	z-index: 24;
	background: rgba(9, 13, 22, 0.96);
	border-bottom: 1px solid #202a40;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
	transition: left 0.18s ease;
}

.gx-toolbar[hidden] {
	display: none;
}

.gx-rail-expanded .gx-toolbar {
	left: var(--sidenav-expanded);
}

/* The bar is inner (scrolls) + tail (pinned), so the Tag-controls button always stays visible. */
.gx-toolbar {
	display: flex;
	align-items: center;
}

.gx-toolbar-tail {
	flex: none;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 0 12px 0 8px;
	border-left: 1px solid #202a40;
}

/* No horizontal scrollbar under the bar: the fields shrink to fit instead (see .gx-filter
   below), so every control stays reachable without a scroll gesture. */
.gx-toolbar-inner {
	flex: 1;
	min-width: 0;
	height: 100%;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 0 12px;
	overflow: hidden;
	white-space: nowrap;
}

.gx-toolbar-label {
	flex: none;
	font-size: 10px;
	letter-spacing: 2px;
	color: #4ade80;
}

/* Shrinkable, not fixed: this is what lets the bar drop its scrollbar on a narrow window. */
.gx-toolbar .gx-filter {
	flex: 0 1 168px;
	min-width: 84px;
	margin-top: 0;
}

.gx-toolbar-select {
	flex: none;
	height: 26px;
	padding: 0 6px;
	border-radius: 6px;
	border: 1px solid rgba(150, 160, 185, 0.22);
	background: rgba(0, 0, 0, 0.3);
	/* Explicit, not `inherit` — the toolbar's own color leaves this barely legible on the dark fill. */
	color: #e8ecf6;
	font-size: 12px;
	cursor: pointer;
}

.gx-toolbar-select option {
	background: #090c15;
	color: #e8ecf6;
}

.gx-toolbar-button {
	flex: none;
	height: 24px;
	padding: 0 10px;
	border: 1px solid #4ade80;
	border-radius: 999px;
	background: rgba(74, 222, 128, 0.08);
	box-shadow: none;
	color: #e8ecf6;
	font-size: 11px;
	cursor: pointer;
}

.gx-toolbar-button:hover {
	background: rgba(74, 222, 128, 0.16);
}

.gx-toolbar-button[aria-pressed="true"] {
	background: rgba(74, 222, 128, 0.28);
}

.gx-index-stats {
	color: #e8ecf6;
	font-size: 11px;
	white-space: nowrap;
	margin-left: 12px;
}

/* "Size by" row at the top of the Semantic UI drawer: label left, dropdown fills the rest. */
.gx-size-row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 10px;
}

.gx-size-label {
	flex: none;
	font-size: 12px;
	color: rgba(150, 160, 185, 0.85);
}

.gx-size-row .gx-theme-select {
	flex: 1;
	min-width: 0;
}

/* "Zoom to node" click-behaviour toggle at the end of the toolbar. */
.gx-toolbar-check {
	flex: none;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	color: #e8ecf6;
	font-size: 11px;
	white-space: nowrap;
	cursor: pointer;
}

.gx-toolbar-check input[type='checkbox'] {
	flex: none;
	margin: 0;
	cursor: pointer;
}

/* ---------- Control panel (Appearance drawer: the rail icon slides it in/out, not always-on) ---------- */

.galaxy-panel {
	position: absolute;
	top: 60px;
	left: calc(var(--sidenav-collapsed) + 10px);
	z-index: 12;
	width: 252px;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 300;
	user-select: none;
	max-height: calc(100% - 70px);
	transition: left 0.18s ease;
	display: flex;
	flex-direction: column;
	overflow: hidden; /* Scrolling belongs to the body; the panel frame + resizer stay fixed. */
}

/* Drawers follow the rail's width and drop below the toolbar when it's showing. */
.gx-rail-expanded .galaxy-panel {
	left: calc(var(--sidenav-expanded) + 10px);
}

.gx-toolbar-visible .galaxy-panel {
	top: 96px;
	max-height: calc(100% - 106px);
}

.galaxy-panel.gx-drawer {
	visibility: hidden;
	transform: translateX(-16px);
	opacity: 0;
	pointer-events: none;
	transition: transform 0.18s ease, opacity 0.18s ease, visibility 0s 0.18s;
}

.galaxy-panel.gx-drawer.is-open {
	visibility: visible;
	transform: translateX(0);
	opacity: 1;
	pointer-events: auto;
	transition-delay: 0s;
}

/* Dataset picker: one dropdown at the top of the Data drawer, above the Filter and tag
   controls that describe the dataset it has selected. */
.gx-dataset-select {
	width: 100%;
	padding: 8px 10px;
	font-size: 13px;
}

.galaxy-panel.gx-theme-dark {
	background: #090C15;
	backdrop-filter: blur(16px);
	border: 1px solid rgba(255, 255, 255, 0.08);
	color: #e8ecf6;
}

.galaxy-panel.gx-theme-light {
	background: rgba(252, 250, 245, 0.82);
	backdrop-filter: blur(16px);
	border: 1px solid rgba(31, 41, 51, 0.12);
	color: #1f2933;
}

.galaxy-panel-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 8px 10px;
}

.galaxy-panel-stats {
	font-family: var(--font-monospace);
	font-size: 15px;
	font-weight: 600;
	opacity: 0.75;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.galaxy-panel-collapse {
	flex-shrink: 0;
	width: 22px;
	height: 22px;
	padding: 0;
	line-height: 1;
	background: transparent;
	border: 1px solid currentColor;
	color: inherit;
	opacity: 0.6;
	border-radius: 6px;
	cursor: pointer;
	box-shadow: none;
}

.galaxy-panel-body {
	padding: 0 10px 10px;
	flex: 1;
	overflow-y: auto;
	overflow-x: hidden; /* the panel never scrolls sideways — content must fit its width */
	scrollbar-width: thin;
}


.galaxy-panel-section {
	margin-top: 4px;
}

.galaxy-panel-section-title {
	font-size: 13px;
	font-weight: 300;
	opacity: 0.55;
	letter-spacing: 0.05em;
	margin: 8px 0 2px;
}

.galaxy-panel-row {
	display: flex;
	gap: 6px;
	margin-top: 10px;
}

.galaxy-panel-row button {
	flex: 1;
	font-size: 13px;
	padding: 3px 8px;
	background: rgba(127, 127, 127, 0.12);
	border: 1px solid rgba(127, 127, 127, 0.25);
	color: inherit;
	border-radius: 6px;
	cursor: pointer;
	box-shadow: none;
}

.galaxy-panel-row button:hover {
	background: rgba(127, 127, 127, 0.25);
}

.galaxy-panel-dev {
	margin-top: 10px;
	border-top: 1px solid rgba(127, 127, 127, 0.2);
	padding-top: 6px;
}

.galaxy-panel-dev summary {
	font-size: 13px;
	opacity: 0.6;
	cursor: pointer;
}

.galaxy-panel-help {
	margin-top: 6px;
	display: flex;
	flex-direction: column;
	gap: 3px;
	font-size: 13px;
	opacity: 0.8;
}

/* Twinkle slider + inline Starfield toggle share one row. */
.gx-twinkle-row { display: flex; align-items: center; gap: 12px; }
.gx-twinkle-row .gx-slider { flex: 1; min-width: 0; }
.gx-inline-toggle { display: flex; align-items: center; gap: 7px; flex: none; }
.gx-inline-toggle .gx-toggle-label { font-size: 13px; opacity: 0.85; white-space: nowrap; }

/* ---------- Lightroom-style sliders ---------- */

/* One row per slider: label, track, value. The track narrows before anything wraps. */
.gx-slider {
	display: grid;
	grid-template-columns: max-content minmax(70px, 1fr) max-content;
	align-items: center;
	column-gap: 8px;
	padding: 4px 0 2px;
}

.gx-slider-label {
	opacity: 0.85;
	white-space: nowrap;
}

.gx-slider-value {
	font-family: var(--font-monospace);
	font-size: 13px;
	opacity: 0.9;
	white-space: nowrap;
	text-align: right;
}

.gx-slider-value.is-default {
	opacity: 0.45;
}

.gx-slider-track {
	position: relative;
	height: 18px;
	cursor: ew-resize;
	touch-action: none;
}

.gx-slider-rail {
	position: absolute;
	left: 0;
	right: 0;
	top: 8px;
	height: 2px;
	border-radius: 1px;
	background: currentColor;
	opacity: 0.18;
}

.gx-slider-fill {
	position: absolute;
	top: 8px;
	height: 2px;
	border-radius: 1px;
	background: #7f9bff;
}

.gx-theme-light .gx-slider-fill {
	background: #3a5fd9;
}

.gx-slider-notch {
	position: absolute;
	left: 50%;
	top: 4px;
	width: 1.5px;
	height: 10px;
	margin-left: -0.75px;
	background: currentColor;
	opacity: 0.4;
}

.gx-slider-thumb {
	position: absolute;
	top: 4px;
	width: 10px;
	height: 10px;
	margin-left: -5px;
	border-radius: 50%;
	background: #e8ecf6;
	border: 1.5px solid #7f9bff;
	pointer-events: none;
}

.gx-theme-light .gx-slider-thumb {
	background: #fcfaf5;
	border-color: #3a5fd9;
}

/* ---------- Overlays: labels and cards ---------- */

.gx-overlay {
	position: absolute;
	inset: 0;
	z-index: 8;
	pointer-events: none;
	overflow: hidden;
}

.gx-label {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 1;
	transform: translate3d(-1000px, -1000px, 0);
	translate: -50% -100%;
	font-size: 13px;
	white-space: nowrap;
	color: #dbe2f2;
	text-shadow: 0 0 6px rgba(0, 0, 6, 0.95);
	transition: opacity 150ms ease;
}

.gx-daylight .gx-label {
	color: #1f2933;
	text-shadow: 0 0 6px rgba(246, 244, 239, 0.95);
}

.gx-label-hover,
.gx-label-neighbor {
	font-size: 13px;
}

.gx-label-hover {
	display: flex;
	flex-direction: column;
	gap: 2px;
	max-width: 240px;
	padding: 6px 10px;
	border-radius: 8px;
	white-space: normal;
	background: rgba(10, 14, 24, 0.78);
	backdrop-filter: blur(12px);
	border: 1px solid rgba(255, 255, 255, 0.08);
}

.gx-daylight .gx-label-hover {
	background: rgba(252, 250, 245, 0.88);
	border: 1px solid rgba(31, 41, 51, 0.14);
}

/* Hover-only node note (setHover): type / name / title, nothing else. */
.gx-hover-type {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	opacity: 0.7;
}

.gx-hover-name {
	font-size: 15px;
	font-weight: 600;
}

.gx-hover-title {
	font-size: 12px;
	font-style: italic;
	opacity: 0.85;
}

.gx-search-path {
	font-size: 13px;
	color: var(--text-muted);
}

/* Source panel: the right-side slot, as a column so the editor can take every pixel the
   header leaves. */
.gx-source-panel {
	position: absolute;
	top: 60px;
	right: 10px;
	bottom: 10px;
	z-index: 15;
	width: 460px;
	max-width: calc(100% - 20px);
	display: flex;
	flex-direction: column;
	pointer-events: auto;
	border-radius: 10px;
	font-size: 14px;
	background: rgba(10, 14, 24, 0.92);
	backdrop-filter: blur(16px);
	border: 1px solid rgba(255, 255, 255, 0.08);
	color: #e8ecf6;
	overflow: hidden;
}

/* The panel must clear the Data toolbar when it is showing or the bar covers its header. */
.gx-toolbar-visible .gx-source-panel {
	top: 96px;
}

.gx-source-head {
	flex: none;
	padding: 12px 14px 10px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.gx-source-title-row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
}

.gx-source-title {
	font-size: 16px;
	font-weight: 500;
	line-height: 1.3;
	word-break: break-word;
}

.gx-source-close {
	flex: none;
	width: 24px;
	height: 24px;
	padding: 0;
	border: none;
	border-radius: 6px;
	background: transparent;
	color: inherit;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}

.gx-source-close:hover {
	background: rgba(255, 255, 255, 0.1);
}

.gx-source-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin-top: 7px;
}

.gx-source-pill {
	padding: 2px 8px;
	border-radius: 999px;
	background: rgba(127, 155, 255, 0.14);
	border: 1px solid rgba(127, 155, 255, 0.28);
	font-size: 11px;
}

.gx-source-pill-type {
	background: rgba(74, 222, 128, 0.14);
	border-color: rgba(74, 222, 128, 0.4);
	color: #4ade80;
}

.gx-source-subtitle {
	margin-top: 7px;
	font-size: 12.5px;
	opacity: 0.8;
}

.gx-source-path {
	margin-top: 6px;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 11px;
	opacity: 0.62;
	word-break: break-all;
}

.gx-source-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin-top: 10px;
}

.gx-source-btn {
	height: 24px;
	padding: 0 10px;
	border: 1px solid rgba(150, 160, 185, 0.3);
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.28);
	color: inherit;
	font-size: 11px;
	cursor: pointer;
}

.gx-source-btn:hover {
	border-color: rgba(127, 155, 255, 0.55);
	background: rgba(127, 155, 255, 0.14);
}

.gx-source-status {
	margin-left: auto;
	font-size: 11px;
	opacity: 0.7;
}

.gx-source-body {
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
	padding: 10px 14px 12px;
}

.gx-source-label {
	flex: none;
	font-size: 10px;
	letter-spacing: 2px;
	color: #4ade80;
	margin-bottom: 6px;
}

.gx-source-content {
	flex: 1;
	min-height: 0;
	width: 100%;
	resize: none;
	padding: 10px;
	border-radius: 8px;
	border: 1px solid rgba(150, 160, 185, 0.22);
	background: rgba(0, 0, 0, 0.34);
	color: inherit;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 12px;
	line-height: 1.5;
	tab-size: 4;
}

.gx-source-content:focus {
	outline: none;
	border-color: rgba(127, 155, 255, 0.55);
}

.gx-source-content:disabled {
	opacity: 0.5;
}

.gx-daylight .gx-source-panel {
	background: rgba(252, 250, 245, 0.95);
	border: 1px solid rgba(31, 41, 51, 0.14);
	color: #1f2933;
}

/* ---------- Opening mask ---------- */

.gx-mask {
	position: absolute;
	inset: 0;
	z-index: 20;
	background: #000003;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 600ms ease;
}

.gx-mask.is-fading {
	opacity: 0;
	pointer-events: none;
}

.gx-mask-text {
	color: #aeb8d0;
	font-size: 15px;
	letter-spacing: 0.3em;
	animation: gx-pulse 1.6s ease-in-out infinite;
}

@keyframes gx-pulse {
	0%,
	100% {
		opacity: 0.35;
	}
	50% {
		opacity: 0.9;
	}
}

/* ---------- Style-preset chips and collapsible sections (panel v3) ---------- */

.gx-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin-top: 8px;
}

.gx-chip {
	flex: 1 1 calc(50% - 3px);
	min-width: 0;
	font-size: 13px;
	padding: 5px 4px;
	border-radius: 12px;
	background: rgba(127, 127, 127, 0.1);
	border: 1px solid rgba(127, 127, 127, 0.22);
	color: inherit;
	cursor: pointer;
	box-shadow: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.gx-chip:hover {
	background: rgba(127, 155, 255, 0.18);
}

.gx-chip.is-active {
	background: rgba(127, 155, 255, 0.25);
	border-color: rgba(127, 155, 255, 0.6);
}

/* Group-labeled chips (Galaxy / Effects) */
.gx-chip-group {
	margin-top: 8px;
}

.gx-chip-group-label {
	font-size: 12px;
	font-weight: 300;
	opacity: 0.5;
	letter-spacing: 0.06em;
}

.gx-chip-group .gx-chips {
	margin-top: 4px;
}

/* Dismissible first-run hint (replaces the old help wall) */
.gx-firstrun-hint {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 8px;
	padding: 6px 8px;
	font-size: 13px;
	line-height: 1.35;
	border-radius: 6px;
	background: rgba(127, 155, 255, 0.14);
	border: 1px solid rgba(127, 155, 255, 0.3);
}

.gx-hint-close {
	flex: 0 0 auto;
	margin-left: auto;
	width: 18px;
	height: 18px;
	padding: 0;
	font-size: 15px;
	line-height: 1;
	border: none;
	border-radius: 4px;
	background: transparent;
	color: inherit;
	opacity: 0.7;
	cursor: pointer;
	box-shadow: none;
}

.gx-hint-close:hover {
	opacity: 1;
	background: rgba(127, 127, 127, 0.2);
}

/* Genesis-animation text link */
.gx-genesis-row {
	margin-top: 6px;
	text-align: center;
}

.gx-textlink {
	font-size: 13px;
	background: transparent;
	border: none;
	box-shadow: none;
	color: inherit;
	opacity: 0.65;
	cursor: pointer;
	text-decoration: underline;
	padding: 2px 4px;
}

.gx-textlink:hover {
	opacity: 1;
}

.gx-section-body {
	padding-top: 2px;
}

/* Color theme + Import + Shuffle share one row: the select flexes, buttons size to their label. */
.gx-color-row { align-items: center; }
.gx-color-row .gx-theme-select { flex: 1; min-width: 0; margin-top: 0; }
.gx-color-row button { flex: 0 0 auto; white-space: nowrap; }

.gx-theme-select {
	width: 100%;
	margin-top: 8px;
	font-size: 13px;
	padding: 3px 6px;
	border-radius: 6px;
	background: rgba(127, 127, 127, 0.12);
	border: 1px solid rgba(127, 127, 127, 0.25);
	color: inherit;
	cursor: pointer;
}

.gx-theme-select option {
	color: var(--text-normal, #e8ecf6);
	background: var(--background-primary, #090C15);
}

/* ---------- M4 mobile ---------- */

.gx-mask-btn {
	font-size: 15px;
	padding: 8px 18px;
	border-radius: 8px;
	background: rgba(127, 155, 255, 0.2);
	border: 1px solid rgba(127, 155, 255, 0.5);
	color: #e8ecf6;
	cursor: pointer;
}

/* ---------- Panel v4 (v0.3 rework): header / sections / preset cards / nav blocks / footer ---------- */
.gx-head-spacer { flex: 1; }
.galaxy-panel-header { position: relative; flex: none; }
/* Drag the panel's right edge to resize its width */
.gx-resizer { position: absolute; top: 0; right: 0; width: 8px; height: 100%; cursor: ew-resize; z-index: 30; }
.gx-resizer:hover { background: linear-gradient(to right, transparent, rgba(127, 155, 255, 0.25)); }
.gx-ico {
	width: 24px;
	height: 24px;
	margin-left: 5px;
	border-radius: 7px;
	font-size: 14px;
	line-height: 1;
	background: rgba(127, 127, 127, 0.12);
	border: 1px solid rgba(127, 127, 127, 0.25);
	color: inherit;
	cursor: pointer;
	box-shadow: none;
}
.gx-ico:hover { background: rgba(127, 155, 255, 0.2); }
.gx-ico:disabled { opacity: 0.35; cursor: default; pointer-events: none; }
/* The one way to hide an element that stays in the DOM. */
.gx-hidden { display: none !important; }

/* Appearance & color block: same body padding as a section, without the collapsible header. */
.gx-static-section { margin-top: 6px; }
/* Heading row for a static (non-collapsible) section — mirrors .gx-zone-section > summary. */
.gx-static-head {
	display: flex;
	align-items: center;
	font-size: 12px;
	font-weight: 300;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(150, 160, 185, 0.7);
	border-bottom: 1px solid rgba(140, 150, 180, 0.14);
	padding: 0 2px 5px;
	margin-top: 14px;
}

.gx-zone-h {
	margin-top: 14px;
	font-size: 12px;
	font-weight: 300;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(150, 160, 185, 0.7);
	border-bottom: 1px solid rgba(140, 150, 180, 0.14);
	padding-bottom: 4px;
}

/* preset picker: one row — dropdown (built-ins + "My presets" group) + Reset + Save */
.gx-preset-host { margin-top: 10px; }
.gx-preset-row { align-items: center; }
.gx-preset-row .gx-preset-select { flex: 1; min-width: 0; margin-top: 0; }
.gx-preset-row button { flex: 0 0 auto; white-space: nowrap; }

/* Save-preset naming dialog (plain DOM, not Obsidian's Modal — see ControlPanel.openSavePresetDialog) */
.gx-modal-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(5, 7, 14, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
}
.gx-modal {
	width: min(320px, 90vw);
	background: #12141f;
	border: 1px solid rgba(140, 160, 210, 0.25);
	border-radius: 10px;
	padding: 16px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.gx-modal-title { font-size: 14px; font-weight: 400; color: #eaf0ff; margin-bottom: 10px; }
.gx-modal-input {
	width: 100%;
	font-size: 13px;
	padding: 6px 8px;
	border-radius: 6px;
	background: rgba(127, 127, 127, 0.12);
	border: 1px solid rgba(127, 127, 127, 0.3);
	color: #eaf0ff;
}
.gx-modal-input:focus { border-color: rgba(127, 155, 255, 0.6); outline: none; }
.gx-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.gx-modal-actions button { font-size: 13px; padding: 5px 14px; border-radius: 6px; cursor: pointer; box-shadow: none; }
.gx-modal-actions button:not(.gx-textlike) { background: rgba(127, 155, 255, 0.3); border: 1px solid rgba(127, 155, 255, 0.5); color: #fff; }
.gx-modal-actions button:not(.gx-textlike):hover { background: rgba(127, 155, 255, 0.45); }
.gx-modal-actions button.gx-textlike { border: 1px solid rgba(127, 127, 127, 0.25); }
.gx-modal-actions button.gx-modal-danger { color: #ff9a9a; border-color: rgba(255, 120, 120, 0.4); margin-right: auto; }
.gx-modal-actions button.gx-modal-danger:hover { background: rgba(255, 120, 120, 0.14); }
.gx-modal-hint { font-size: 12px; color: rgba(150, 160, 185, 0.65); margin-top: 6px; line-height: 1.35; }


/* section markers */
.gx-sec-head-spacer { flex: 1; }
.gx-sec-action { margin-left: 4px; border: 0; background: transparent; color: #ffb95c; font-size: 12px; cursor: pointer; box-shadow: none; }
.gx-sec-action:hover { text-decoration: underline; }

.gx-textlike { background: transparent; color: rgba(210, 215, 235, 0.85); }
.gx-textlike:hover { color: #fff; }

/* note filter (#11) — clickable folder legend (primary) */
.gx-folders { margin-top: 2px; }
.gx-folder {
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 3px 6px;
	border-radius: 6px;
	cursor: pointer;
	font-size: 13.5px;
	user-select: none;
}
.gx-folder:hover { background: rgba(127, 155, 255, 0.16); }
.gx-folder-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	flex: none;
	background: var(--gx-folder-color, #9aa4b2);
	box-shadow: 0 0 6px var(--gx-folder-color, #9aa4b2);
}
.gx-folder-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gx-folder-count { font-size: 12px; color: rgba(150, 160, 185, 0.6); font-variant-numeric: tabular-nums; }
.gx-folder-solo { font-size: 11.5px; color: #7f9bff; opacity: 0; padding-left: 2px; }
.gx-folder:hover .gx-folder-solo { opacity: 1; }
.gx-folder.is-off { opacity: 0.38; }
.gx-folder.is-off .gx-folder-dot { background: transparent; box-shadow: none; border: 1px solid rgba(150, 160, 185, 0.7); }

/* Tag controls: vertically-stacked pill switches (Show/Hide, Show colors, Show hubs). */
.gx-toggle-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 5px 0;
	font-size: 13px;
}
.gx-toggle-label { flex: 1; }
.gx-toggle-switch {
	flex: none;
	position: relative;
	width: 34px;
	height: 18px;
	padding: 0;
	border-radius: 999px;
	border: 1px solid rgba(140, 160, 210, 0.25);
	background: rgba(140, 150, 180, 0.16);
	cursor: pointer;
	box-shadow: none;
	transition: background-color 0.12s, border-color 0.12s;
}
.gx-toggle-switch:hover { background: rgba(140, 150, 180, 0.26); }
.gx-toggle-switch.is-on {
	background: rgba(127, 155, 255, 0.5);
	border-color: rgba(127, 155, 255, 0.65);
}
.gx-toggle-thumb {
	position: absolute;
	top: 2px;
	left: 2px;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: #e8ecf6;
	transition: transform 0.15s ease;
}
.gx-toggle-switch.is-on .gx-toggle-thumb {
	transform: translateX(16px);
	background: #fff;
}

/* Tag Lens: two-column checkbox list. Tags reuse the existing tag-node colors from the graph — no separate color system. */
.gx-tags {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px 10px;
	margin-top: 8px;
	max-height: 300px;
	overflow-y: auto;
}
.gx-tag-check {
	display: flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
	padding: 3px 0;
	font-size: 12.5px;
	line-height: 1.25;
	cursor: pointer;
}
.gx-tag-check input[type='checkbox'] { flex: none; margin: 0; cursor: pointer; }
.gx-tag-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gx-tag-count { color: rgba(150, 160, 185, 0.65); font-variant-numeric: tabular-nums; }
.gx-theme-light .gx-zone-section > summary {
	color: rgba(79, 91, 111, 0.78);
	border-bottom-color: rgba(72, 81, 98, 0.15);
}
.gx-theme-light .gx-zone-section > summary:hover { color: rgba(45, 55, 72, 0.94); }
.gx-theme-light .gx-tag-count { color: rgba(79, 91, 111, 0.72); }

/* Text-query escape hatch (secondary): only for cross-cutting patterns the legend cannot express */

.gx-filter { position: relative; margin-top: 7px; }
.gx-filter-input {
	width: 100%;
	/* Padding + border must fit inside the panel width, or the field overflows it. */
	box-sizing: border-box;
	font-family: var(--font-monospace);
	font-size: 13.5px;
	/* Explicit, not `inherit` — the toolbar sets no color, so inherited text lands near-black
	   on the dark fill and typed queries are invisible until selected. */
	color: #e8ecf6;
	background: rgba(0, 0, 0, 0.28);
	border: 1px solid rgba(140, 160, 210, 0.16);
	border-radius: 8px;
	padding: 6px 24px 6px 9px;
	outline: none;
}
.gx-filter-input::placeholder { color: rgba(150, 160, 185, 0.5); }
.gx-filter-input:focus { border-color: rgba(127, 155, 255, 0.55); background: rgba(0, 0, 0, 0.4); }
.gx-filter-clear {
	position: absolute;
	right: 4px;
	top: 50%;
	transform: translateY(-50%);
	width: 17px;
	height: 17px;
	border: 0;
	border-radius: 4px;
	background: transparent;
	box-shadow: none;
	color: rgba(150, 160, 185, 0.7);
	cursor: pointer;
	font-size: 12px;
	line-height: 1;
	padding: 0;
}
.gx-filter-clear:hover { background: rgba(127, 155, 255, 0.16); color: inherit; }
.gx-filter-none { font-size: 12.5px; color: #ffb95c; margin-top: 6px; line-height: 1.35; }

/* persistent help popover */

/* ---------- standalone-only shim UI (shim/obsidian.ts): SuggestModal / Notice ----------
   These stand in for Obsidian's own Modal/Notice chrome (which ships its own CSS in the
   real app) — without explicit position/z-index here they render unstyled in normal document
   flow and end up invisible behind the fixed-position canvas. */

.gx-shim-modal-bg {
	position: fixed;
	inset: 0;
	z-index: 100;
	background: rgba(5, 7, 12, 0.6);
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding-top: 12vh;
}
.gx-shim-modal {
	width: 480px;
	max-width: calc(100vw - 40px);
	max-height: 60vh;
	display: flex;
	flex-direction: column;
	background: #0c1120;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 10px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
	overflow: hidden;
}
.gx-shim-modal input {
	flex: none;
	padding: 12px 14px;
	background: transparent;
	border: 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	color: #e8ecf6;
	font-size: 14px;
	box-shadow: none;
}
.gx-shim-modal input:focus { outline: none; }
.gx-shim-modal-list {
	flex: 1;
	overflow-y: auto;
	padding: 6px;
}
.gx-shim-modal-item {
	padding: 7px 10px;
	border-radius: 6px;
	cursor: pointer;
	color: #dbe2f2;
	font-size: 13px;
}
.gx-shim-modal-item:hover { background: rgba(127, 155, 255, 0.16); }

.gx-shim-notice {
	position: fixed;
	left: 50%;
	bottom: 24px;
	transform: translateX(-50%);
	z-index: 102;
	max-width: calc(100vw - 40px);
	background: #0c1120;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 8px;
	padding: 10px 16px;
	color: #e8ecf6;
	font-size: 13px;
	box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6);
}

/* ---------- generated-dataset announcement strip ---------- */
/* Non-modal, bottom-center: it must be visible with every drawer closed, and must never
   steal the pointer from the graph beyond its own bounds. */
.gx-gen-strip {
	position: fixed;
	left: 50%;
	bottom: 18px;
	transform: translateX(-50%);
	z-index: 40;
	display: flex;
	align-items: center;
	gap: 12px;
	max-width: min(760px, calc(100vw - 32px));
	padding: 9px 12px;
	border-radius: 10px;
	border: 1px solid rgba(127, 155, 255, 0.45);
	background: rgba(10, 14, 26, 0.92);
	color: #dfe6ff;
	font-size: 13px;
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
}

/* `display: flex` above outranks the UA's `[hidden] { display: none }`, so without this the
   strip's own `strip.hidden = true` leaves an empty padding-and-border pill parked at the
   bottom of the screen whenever there is nothing to announce. */
.gx-gen-strip[hidden] {
	display: none;
}

.gx-gen-strip.is-invalid {
	border-color: rgba(255, 140, 120, 0.6);
	color: #ffd9d2;
}

.gx-gen-text {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.gx-gen-actions {
	display: flex;
	gap: 6px;
	flex: 0 0 auto;
}

.gx-gen-actions button {
	font-size: 12.5px;
	padding: 3px 10px;
	border-radius: 7px;
	border: 1px solid rgba(127, 155, 255, 0.5);
	background: rgba(127, 155, 255, 0.18);
	color: inherit;
	cursor: pointer;
	box-shadow: none;
}

.gx-gen-actions button:hover:not(:disabled) { background: rgba(127, 155, 255, 0.32); }
.gx-gen-actions button:disabled { opacity: 0.5; cursor: default; }

/* Section heading inside the Data drawer: the picker's optgroup-style labels and the
   "Tag controls" heading above the moved Filter/tag block. */
.gx-dataset-group {
	margin: 10px 0 4px;
	font-size: 11.5px;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(150, 160, 185, 0.7);
}

/* Overview: Accessible inspector tabs and scrollable structured data in both themes. */
.gx-inspector-tabs { display: flex; flex: none; gap: 4px; padding: 8px 14px; border-bottom: 1px solid rgba(150,160,185,.25); }
.gx-inspector-tab { flex: 1; padding: 7px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: inherit; cursor: pointer; }
.gx-inspector-tab[aria-selected="true"] { background: rgba(127,155,255,.18); border-color: rgba(127,155,255,.5); }
.gx-inspector-tab:focus-visible { outline: 2px solid #7f9bff; }
.gx-inspector-pane { overflow: auto; gap: 8px; }
.gx-inspector-pane[hidden] { display: none; }
.gx-inspector-pane h3 { margin: 8px 0 0; font-size: 13px; }
.gx-inspector-fields { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 12px; }
.gx-inspector-fields th, .gx-inspector-fields td { padding: 5px; border-bottom: 1px solid rgba(150,160,185,.18); vertical-align: top; text-align: left; overflow-wrap: anywhere; white-space: pre-wrap; }
.gx-inspector-fields th { width: 29%; font-weight: 500; opacity: .8; }
.gx-inspector-raw pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 11px; }
.gx-inspector-raw summary, .gx-inspector-edges summary { cursor: pointer; font-size: 12px; padding: 5px 0; }
.gx-inspector-edges table { margin: 8px 0; }
.gx-pane-file .gx-source-status { margin: 0; }
.gx-pane-file .gx-source-content { min-height: 160px; }

/* Overview: Match settings and source-panel typography to Execution Viewer; font comes from typography.json. */
.galaxy-panel,
.gx-source-panel {
	font-family: var(--gx-panel-font);
}

:is(.galaxy-panel, .gx-source-panel) :is(button, input, select, textarea),
.gx-source-path {
	font-family: inherit;
}
