/* Photo Mosaic (extension package). Modal chrome comes from the
   editor's dsm design system - only studio-specific parts live here. */

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

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

.wpiemos-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;
}

.wpiemos-view canvas {
	max-width: calc( 100% - 36px );
	max-height: calc( 100% - 36px );
	box-shadow: 0 10px 30px rgba( 0, 0, 0, 0.35 );
}

.wpiemos-status {
	position: absolute;
	bottom: 14px;
	left: 50%;
	display: none;
	max-width: 78%;
	padding: 7px 14px;
	font-size: 11px;
	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;
	transform: translateX( -50% );
}

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

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

.wpiemos-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 );
}

.wpiemos-side > * {
	flex-shrink: 0;
}

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

.wpiemos-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 );
}

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

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

.wpiemos-wide {
	width: 100%;
}

.wpiemos-info {
	font-size: 11px;
	color: var( --ed-text-muted, #9aa1ab );
}

.wpiemos-row {
	display: grid;
	grid-template-columns: 92px 1fr auto;
	gap: 8px;
	align-items: center;
	margin: 2px 0;
}

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

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

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

.wpiemos-tilebtns {
	display: flex;
	gap: 8px;
	align-items: center;
}

.wpiemos-tilebtns .ai-btn {
	flex: 1;
}

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

.wpiemos-reset:hover {
	color: inherit;
}

.wpiemos-strip {
	display: flex;
	flex-wrap: wrap;
	gap: 3px;
	align-items: center;
}

.wpiemos-thumb {
	border-radius: 3px;
}

.wpiemos-more {
	padding-left: 4px;
	font-size: 11px;
	color: var( --ed-text-muted, #9aa1ab );
}
