/* Photo gallery (scripts/gallery.js) */
.g-root {
	--g-bg: #111;
	--g-panel: #1c1a1f;
	--g-line: #333;
	--g-text: #eee;
	--g-dim: #999;
	--g-accent: #DAA520; /* goldenrod, as the page buttons */
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	background: var(--g-bg);
	color: var(--g-text);
	font-family: "Segoe UI Light", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
	text-align: left;
}
.g-root * { z-index: auto; box-sizing: border-box; }
.g-status { padding: 40px; font-size: large; color: var(--g-dim); text-align: center; }

.g-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	padding: 8px 12px 8px 120px; /* room for the close button of the page */
	background: var(--g-panel);
	border-bottom: 1px solid var(--g-line);
}
.g-title { font-size: x-large; text-transform: uppercase; margin-right: auto; }
.g-count { color: var(--g-dim); font-variant-numeric: tabular-nums; }
.g-field { display: flex; align-items: center; gap: 6px; color: var(--g-dim); }
.g-root input, .g-root select {
	font: inherit;
	color: var(--g-text);
	background: #000;
	border: 1px solid var(--g-line);
	border-radius: 6px;
	padding: 4px 8px;
}
.g-search { width: 180px; }

.g-btn {
	font: inherit;
	color: var(--g-text);
	background: #000;
	border: 1px solid var(--g-line);
	border-radius: 6px;
	padding: 4px 10px;
	cursor: pointer;
}
.g-btn:focus-visible { background: var(--g-accent); color: #000; }
/* Touch screens keep the last tapped button "hovered"; it would look like an on state. */
@media (hover: hover) { .g-btn:hover { background: var(--g-accent); color: #000; } }
.g-views { display: flex; }
.g-view { border-radius: 0; }
.g-view:first-child { border-radius: 6px 0 0 6px; }
.g-view:last-child { border-radius: 0 6px 6px 0; border-left: none; }
.g-view.g-on, .g-filtertoggle.g-on { background: var(--g-accent); color: #000; }
.g-filtertoggle { display: none; }

.g-body { flex: 1; display: flex; min-height: 0; position: relative; }
.g-side {
	width: 250px;
	flex: none;
	overflow-y: auto;
	padding: 8px 10px 20px;
	background: var(--g-panel);
	border-right: 1px solid var(--g-line);
}
.g-clear { width: 100%; margin: 4px 0 8px; }
.g-clear:disabled { opacity: .4; cursor: default; background: #000; color: var(--g-text); }
.g-facet { border-bottom: 1px solid var(--g-line); padding: 6px 0; }
.g-facet summary { cursor: pointer; font-size: large; padding: 2px 0; }
.g-badge {
	margin-left: 8px;
	padding: 0 7px;
	border-radius: 10px;
	background: var(--g-accent);
	color: #000;
	font-size: small;
}
.g-value { display: flex; align-items: center; gap: 6px; padding: 1px 0 1px 4px; cursor: pointer; }
.g-value:hover { color: var(--g-accent); }
.g-value input { accent-color: var(--g-accent); margin: 0; }
.g-vname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-vcount { color: var(--g-dim); font-size: small; margin-left: 8px; font-variant-numeric: tabular-nums; }
.g-child { padding-left: 24px; }
.g-open {
	background: none;
	border: none;
	color: var(--g-dim);
	cursor: pointer;
	font: inherit;
	padding: 0 2px 0 6px;
}
.g-open:hover { color: var(--g-accent); }
.g-more {
	background: none;
	border: none;
	color: var(--g-accent);
	cursor: pointer;
	font: inherit;
	font-size: small;
	padding: 4px;
}

.g-stage { flex: 1; min-width: 0; position: relative; overflow: hidden; }
.g-canvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	touch-action: none;
	cursor: grab;
	user-select: none;
}
.g-tip {
	position: absolute;
	max-width: 280px;
	padding: 3px 8px;
	border-radius: 4px;
	background: rgba(0, 0, 0, .85);
	border: 1px solid var(--g-line);
	font-size: small;
	pointer-events: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.g-tip[hidden] { display: none; }
.g-controls {
	position: absolute;
	left: 12px;
	bottom: 12px;
	display: flex;
	gap: 6px;
}
.g-controls .g-btn { min-width: 38px; height: 38px; font-size: large; background: rgba(0, 0, 0, .7); }

.g-info {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: 300px;
	overflow-y: auto;
	background: rgba(28, 26, 31, .94);
	border-left: 1px solid var(--g-line);
}
.g-info[hidden] { display: none; }
.g-infonav {
	position: sticky;
	top: 0;
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 10px 12px;
	background: var(--g-panel);
	border-bottom: 1px solid var(--g-line);
}
.g-infonav .g-btn { min-width: 34px; }
.g-iclose { margin-left: auto; }
.g-infobody { padding: 12px 16px 16px; }
.g-iname { font-size: x-large; }
.g-isub { color: var(--g-dim); font-size: small; margin-top: 2px; }
.g-info dl { margin: 16px 0; }
.g-info dt { color: var(--g-dim); font-size: small; margin-top: 10px; }
.g-info dd { margin: 2px 0 0; display: flex; flex-wrap: wrap; gap: 4px; }
/* Several values: a dot between them, so "Sixth Floor Museum · From Top" does not read as one name. */
.g-info dd > * + *::before { content: '·'; margin-right: 4px; color: var(--g-dim); }
.g-link {
	background: none;
	border: none;
	padding: 0;
	font: inherit;
	color: var(--g-accent);
	cursor: pointer;
	text-align: left;
}
.g-link:hover { text-decoration: underline; }
.g-ipos { color: var(--g-dim); font-size: small; font-variant-numeric: tabular-nums; }

@media (max-width: 760px) {
	.g-bar { padding-left: 12px; padding-top: 44px; }
	.g-title { font-size: large; width: 100%; }
	.g-search { width: 100%; }
	.g-filtertoggle { display: inline-block; }
	.g-side { display: none; position: absolute; top: 0; bottom: 0; left: 0; z-index: 5; width: 85%; }
	.g-root.g-showfilters .g-side { display: block; }
	.g-info { top: auto; left: 0; width: auto; height: 40%; border-left: none; border-top: 1px solid var(--g-line); }
	/* The zoom buttons stay above the picture panel instead of under it. */
	.g-stage:has(> .g-info:not([hidden])) .g-controls { bottom: calc(40% + 12px); }
}
