/* Chaos Art studio - only the layout, canvas and special grids live here;
   chrome and controls style themselves through the shared dsm kit. */

#wpie-root .wpiechaos-dialog {
	width: min(1860px, 98vw);
	max-width: min(1860px, 98vw);
}

#wpie-root .wpiechaos-body {
	display: flex;
	gap: 14px;
	min-height: 460px;
	max-height: 64vh;
}

/* Left: styles and the one-of-a-kind note. */
#wpie-root .wpiechaos-left {
	width: 230px;
	flex: none;
	display: flex;
	flex-direction: column;
	gap: 12px;
	overflow-y: auto;
}

#wpie-root .wpiechaos-left > *,
#wpie-root .wpiechaos-side > * {
	flex-shrink: 0;
}

#wpie-root .wpiechaos-styles {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

#wpie-root .wpiechaos-style {
	display: grid;
	grid-template-columns: 44px 1fr;
	grid-template-rows: auto auto;
	column-gap: 10px;
	align-items: center;
	text-align: left;
	padding: 8px;
	border: 1px solid var(--ed-border, #333a46);
	border-radius: 10px;
	background: var(--ed-panel, #1b1e26);
	color: inherit;
	cursor: pointer;
}

#wpie-root .wpiechaos-style.is-on {
	border-color: var(--accent, #3b66ff);
	box-shadow: 0 0 0 1px var(--accent, #3b66ff);
}

#wpie-root .wpiechaos-style-art {
	grid-row: 1 / span 2;
	width: 44px;
	height: 44px;
	border-radius: 8px;
}

#wpie-root .wpiechaos-style-name {
	font-weight: 600;
	font-size: 12px;
}

#wpie-root .wpiechaos-style-blurb {
	font-size: 10.5px;
	opacity: 0.65;
	line-height: 1.3;
}

#wpie-root .wpiechaos-note {
	font-size: 11px;
	line-height: 1.45;
	opacity: 0.75;
}

/* Middle: the stage, the transport, the moments. */
#wpie-root .wpiechaos-mid {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

#wpie-root .wpiechaos-view {
	position: relative;
	flex: 1;
	min-height: 320px;
	border-radius: 12px;
	background: #07080c;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

#wpie-root .wpiechaos-canvas {
	display: block;
	touch-action: none;
	border-radius: 4px;
}

#wpie-root .wpiechaos-hint {
	position: absolute;
	bottom: 10px;
	left: 50%;
	transform: translateX(-50%);
	background: rgba(10, 12, 16, 0.55);
	color: rgba(255, 255, 255, 0.82);
	font-size: 10px;
	padding: 4px 11px;
	border-radius: 20px;
	pointer-events: none;
	white-space: nowrap;
}

/* The entropy field. */
#wpie-root .wpiechaos-field {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	background: radial-gradient(ellipse at center, rgba(30, 38, 66, 0.92), rgba(7, 8, 12, 0.97));
	cursor: crosshair;
	z-index: 2;
	padding: 24px;
	text-align: center;
}

#wpie-root .wpiechaos-field-title {
	font-size: 18px;
	font-weight: 600;
	color: #e8ecf6;
}

#wpie-root .wpiechaos-field-sub {
	font-size: 12px;
	color: rgba(232, 236, 246, 0.7);
	max-width: 420px;
	line-height: 1.5;
}

#wpie-root .wpiechaos-meter {
	width: 260px;
	height: 6px;
	flex: none;
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.12);
	overflow: hidden;
}

#wpie-root .wpiechaos-meter-fill {
	height: 100%;
	width: 0;
	border-radius: 4px;
	background: linear-gradient(90deg, #3b66ff, #8f7bff, #ff6ec7);
	transition: width 0.2s;
}

#wpie-root .wpiechaos-sparks {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	opacity: 0.8;
	z-index: 0;
}

/* The words and the meter stand ABOVE the sparks, never behind them. */
#wpie-root .wpiechaos-field-title,
#wpie-root .wpiechaos-field-sub,
#wpie-root .wpiechaos-meter {
	position: relative;
	z-index: 1;
}

/* Transport. */
#wpie-root .wpiechaos-transport {
	display: flex;
	gap: 8px;
	align-items: center;
	flex: none;
}

#wpie-root .wpiechaos-transport .wpiechaos-start {
	min-width: 150px;
}

/* Moment picker. */
#wpie-root .wpiechaos-moments {
	flex: none;
}

#wpie-root .wpiechaos-title {
	font-size: 15px;
	font-weight: 600;
	margin-bottom: 2px;
}

#wpie-root .wpiechaos-bio {
	font-size: 10.5px;
	opacity: 0.65;
	margin-bottom: 8px;
}

#wpie-root .wpiechaos-moments-title {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	opacity: 0.7;
	margin-bottom: 6px;
}

#wpie-root .wpiechaos-strip {
	display: flex;
	gap: 6px;
	overflow-x: auto;
	padding-bottom: 4px;
}

#wpie-root .wpiechaos-moment {
	flex: none;
	width: 92px;
	height: 56px;
	padding: 0;
	border: 2px solid var(--ed-border, #333a46);
	border-radius: 6px;
	overflow: hidden;
	background: #10131a;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

#wpie-root .wpiechaos-moment img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

#wpie-root .wpiechaos-moment.is-on {
	border-color: var(--accent, #3b66ff);
}

#wpie-root .wpiechaos-moment.is-live span {
	font-size: 10px;
	color: var(--ed-text-dim, #b9c0cc);
	padding: 0 6px;
	text-align: center;
}

/* Right: dials. */
#wpie-root .wpiechaos-side {
	width: 280px;
	flex: none;
	display: flex;
	flex-direction: column;
	gap: 12px;
	overflow-y: auto;
}

#wpie-root .wpiechaos-left .dsm-card-head,
#wpie-root .wpiechaos-side .dsm-card-head {
	color: var(--ed-text-dim, #b9c0cc);
}

#wpie-root .wpiechaos-left .dsm-card-head svg,
#wpie-root .wpiechaos-side .dsm-card-head svg {
	opacity: 0.85;
}

#wpie-root .wpiechaos-dots {
	display: flex;
	gap: 5px;
	margin-top: 8px;
}

#wpie-root .wpiechaos-dot {
	width: 16px;
	height: 16px;
	flex: none;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.18);
}

#wpie-root .wpiechaos-customrow {
	display: flex;
	gap: 8px;
	margin-top: 8px;
}

#wpie-root .wpiechaos-colorhost {
	flex: none;
}

#wpie-root .wpiechaos-filmrow {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

/* Foot status. */
#wpie-root .wpiechaos-status {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

#wpie-root .wpiechaos-status.is-bad {
	color: #ff7a7a;
}
