/* Star Map Studio (extension package). Modal chrome (backdrop, frame,
   header, footer, close, scrollbars, selects, labels) comes from the
   editor's modal design - the dialog mounts inside #wpie-root. Only
   studio-specific parts live here (wpiestar- prefix so Map Studio and
   this pack can coexist). */

.wpiestar-dialog {
	width: min( 1060px, 96vw );
	height: min( 720px, 92vh );
}

.wpiestar-body {
	display: flex;
	flex: 1;
	min-height: 0;
}

.wpiestar-view {
	position: relative;
	display: grid;
	flex: 1;
	place-items: center;
	min-width: 0;
	background:
		repeating-conic-gradient(
			rgba( 128, 128, 128, 0.07 ) 0 25%,
			transparent 0 50%
		)
		0 0 / 22px 22px;
}

.wpiestar-view canvas {
	background: transparent;
}

.wpiestar-empty {
	position: absolute;
	max-width: 300px;
	padding: 14px 18px;
	font-size: 13px;
	line-height: 1.5;
	color: var( --ed-text, #e6e8ee );
	text-align: center;
	pointer-events: none;
	background: var( --ed-panel, #1d2126 );
	border: 1px solid var( --ed-border, #333a44 );
	border-radius: 8px;
	box-shadow: 0 10px 30px rgba( 0, 0, 0, 0.3 );
}

.wpiestar-status {
	position: absolute;
	bottom: 14px;
	left: 50%;
	display: none;
	max-width: 78%;
	padding: 7px 14px;
	font-size: 11px;
	line-height: 1.4;
	color: var( --ed-text, #e6e8ee );
	text-align: center;
	pointer-events: none;
	background: var( --ed-panel, #1d2126 );
	border: 1px solid var( --ed-border, #333a44 );
	border-radius: 999px;
	box-shadow: 0 8px 24px rgba( 0, 0, 0, 0.3 );
	transform: translateX( -50% );
}

.wpiestar-status.on {
	display: block;
}

.wpiestar-status.err {
	color: #f28b82;
	border-color: rgba( 242, 139, 130, 0.5 );
}

.wpiestar-side {
	display: flex;
	flex: none;
	flex-direction: column;
	gap: 10px;
	width: 332px;
	padding: 12px 14px;
	overflow-x: hidden;
	overflow-y: auto;
	font-size: 12px;
	border-left: 1px solid var( --ed-border, #333a44 );
}

/* The side is a flex column: without this its section cards keep their
   default flex-shrink and get compressed to fit the panel height instead
   of overflowing, so overflow-y: auto never triggers and the scrollbar
   never appears. Pinning the direct children to their natural height lets
   the column overflow and scroll. */
.wpiestar-side > * {
	flex-shrink: 0;
}

.wpiestar-section {
	padding-top: 8px;
	border-top: 1px solid var( --ed-border, rgba( 128, 128, 128, 0.15 ) );
}

.wpiestar-section:first-child {
	padding-top: 0;
	border-top: 0;
}

.wpiestar-label {
	display: block;
	margin-bottom: 6px;
}

.wpiestar-card {
	background: var( --ed-panel-alt, rgba( 255, 255, 255, 0.03 ) );
	border: 1px solid var( --ed-border, #333a44 );
	border-radius: 10px;
	overflow: hidden;
}

.wpiestar-card-head {
	display: flex;
	gap: 8px;
	align-items: center;
	padding: 10px 12px 4px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var( --ed-text-dim, #b9c0cc );
}

.wpiestar-card-head svg { flex: none; opacity: 0.85; }

.wpiestar-card-body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 8px 12px 12px;
}

#wpie-root .wpiestar-check {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	cursor: pointer;
}

#wpie-root .wpiestar-check input {
	width: 15px;
	height: 15px;
	accent-color: var( --accent, #3b66ff );
}


.wpiestar-search {
	position: relative;
}

.wpiestar-search input,
.wpiestar-text-row input {
	width: 100%;
	padding: 7px 9px;
	font-size: 12px;
	color: inherit;
	background: var( --ed-bg, #14171c );
	border: 1px solid var( --ed-border, #333a44 );
	border-radius: 6px;
	outline: none;
}

.wpiestar-search input:focus,
.wpiestar-text-row input:focus {
	border-color: var( --ed-accent, #3b82f6 );
}

.wpiestar-results {
	position: absolute;
	top: calc( 100% + 4px );
	right: 0;
	left: 0;
	z-index: 5;
	max-height: 210px;
	overflow-y: auto;
	background: var( --ed-panel, #1d2126 );
	border: 1px solid var( --ed-border, #333a44 );
	border-radius: 8px;
	box-shadow: 0 12px 34px rgba( 0, 0, 0, 0.5 );
}

.wpiestar-result {
	display: block;
	width: 100%;
	padding: 7px 10px;
	color: inherit;
	text-align: left;
	cursor: pointer;
	background: none;
	border: 0;
}

.wpiestar-result:hover {
	background: rgba( 128, 128, 128, 0.14 );
}

.wpiestar-result small {
	display: block;
	overflow: hidden;
	color: var( --ed-text-muted, #9aa1ab );
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wpiestar-coords {
	margin-top: 5px;
	font-size: 11px;
	color: var( --ed-text-muted, #9aa1ab );
}

.wpiestar-row {
	display: grid;
	grid-template-columns: 78px 1fr auto;
	gap: 8px;
	align-items: center;
	margin: 5px 0;
}

.wpiestar-row > span {
	overflow: hidden;
	white-space: nowrap;
}

.wpiestar-row input[type='range'] {
	width: 100%;
	accent-color: var( --ed-accent, #3b82f6 );
}

.wpiestar-row input[type='date'],
.wpiestar-row input[type='time'] {
	grid-column: 2 / 4;
	padding: 6px 8px;
	font-size: 12px;
	color: inherit;
	background: var( --ed-bg, #14171c );
	border: 1px solid var( --ed-border, #333a44 );
	border-radius: 6px;
	outline: none;
}

.wpiestar-row output {
	min-width: 48px;
	font-size: 11px;
	color: var( --ed-text-muted, #9aa1ab );
	text-align: right;
}

.wpiestar-check {
	display: flex;
	gap: 7px;
	align-items: center;
	margin: 4px 0;
	cursor: pointer;
}

.wpiestar-check input {
	accent-color: var( --ed-accent, #3b82f6 );
}

.wpiestar-themes {
	display: grid;
	grid-template-columns: repeat( 4, 1fr );
	gap: 6px;
}

.wpiestar-theme {
	position: relative;
	height: 34px;
	overflow: hidden;
	cursor: pointer;
	border: 1px solid var( --ed-border, #333a44 );
	border-radius: 6px;
}

.wpiestar-theme.sel {
	border-color: var( --ed-accent, #3b82f6 );
	box-shadow: 0 0 0 1px var( --ed-accent, #3b82f6 );
}

.wpiestar-shaperow {
	margin: 6px 0;
}

.wpiestar-shaperow > span {
	display: block;
	margin-bottom: 6px;
	font-size: 11px;
	color: var( --ed-text-muted, #9aa1ab );
}

/* Full-width five-column grid so all ten shape tiles stay visible in two
   tidy rows; a single non-wrapping flex row overflowed and was clipped by
   the panel's overflow-x: hidden (only five showed). */
.wpiestar-shapes {
	display: grid;
	grid-template-columns: repeat( 5, 1fr );
	gap: 6px;
	justify-items: center;
}

/* On-chart text placement: compact 3x3 alignment grid. */
.wpiestar-anchorrow {
	margin: 6px 0;
}

.wpiestar-anchorrow > span {
	display: block;
	margin-bottom: 6px;
	font-size: 11px;
	color: var( --ed-text-muted, #9aa1ab );
}

.wpiestar-anchors {
	display: grid;
	grid-template-columns: repeat( 3, 1fr );
	gap: 5px;
	max-width: 122px;
}

.wpiestar-anchor {
	display: grid;
	place-items: center;
	height: 30px;
	color: var( --ed-text-muted, #9aa1ab );
	cursor: pointer;
	background: none;
	border: 1px solid var( --ed-border, #333a44 );
	border-radius: 6px;
}

.wpiestar-anchor:hover {
	color: inherit;
}

.wpiestar-anchor.sel {
	color: var( --ed-accent, #3b82f6 );
	border-color: var( --ed-accent, #3b82f6 );
	box-shadow: 0 0 0 1px var( --ed-accent, #3b82f6 );
}

.wpiestar-shape {
	display: grid;
	flex: none;
	place-items: center;
	width: 32px;
	height: 28px;
	color: var( --ed-text-muted, #9aa1ab );
	cursor: pointer;
	background: none;
	border: 1px solid var( --ed-border, #333a44 );
	border-radius: 6px;
}

.wpiestar-shape:hover {
	color: inherit;
}

.wpiestar-shape.sel {
	color: var( --ed-accent, #3b82f6 );
	border-color: var( --ed-accent, #3b82f6 );
	box-shadow: 0 0 0 1px var( --ed-accent, #3b82f6 );
}

.wpiestar-reset {
	padding: 1px 7px;
	font-size: 11px;
	color: var( --ed-text-muted, #9aa1ab );
	cursor: pointer;
	background: none;
	border: 1px solid var( --ed-border, #333a44 );
	border-radius: 5px;
}

.wpiestar-reset:hover {
	color: inherit;
	border-color: var( --ed-accent, #3b82f6 );
}

.wpiestar-swatch {
	display: inline-flex;
}

.wpiestar-attr {
	margin-top: auto;
	padding-top: 8px;
	font-size: 10px;
	color: var( --ed-text-muted, #9aa1ab );
}

.wpiestar-text-row {
	margin: 6px 0;
}

.wpiestar-text-row > span {
	display: block;
	margin-bottom: 3px;
	font-size: 11px;
	color: var( --ed-text-muted, #9aa1ab );
}

/* v2.0 - foil / gradient swatches for the constellation lines */

.wpiestar-gradrow {
	margin: 6px 0;
}

.wpiestar-gradlbl {
	display: block;
	margin-bottom: 4px;
	font-size: 11px;
	color: var( --ed-text-muted, #9aa1ab );
}

.wpiestar-grads {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.wpiestar-grad {
	flex: none;
	width: 42px;
	height: 20px;
	font-size: 10px;
	color: var( --ed-text-muted, #9aa1ab );
	cursor: pointer;
	background: none;
	border: 1px solid var( --ed-border, #333a44 );
	border-radius: 5px;
}

.wpiestar-grad.sel {
	color: var( --ed-accent, #3b82f6 );
	border-color: var( --ed-accent, #3b82f6 );
	box-shadow: 0 0 0 1px var( --ed-accent, #3b82f6 );
}
