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

.wpieta-dialog { width: min( 1060px, 96vw ); height: min( 720px, 92vh ); }
.wpieta-body { display: flex; flex: 1; min-height: 0; }
.wpieta-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;
}
.wpieta-view canvas { max-width: calc( 100% - 36px ); max-height: calc( 100% - 36px ); box-shadow: 0 10px 30px rgba( 0, 0, 0, 0.35 ); }
.wpieta-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% );
}
.wpieta-status.on { display: block; }
.wpieta-status.err { color: #f28b82; border-color: rgba( 242, 139, 130, 0.5 ); }
.wpieta-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 );
}
.wpieta-side > * { flex-shrink: 0; }
.wpieta-card {
	background: var( --ed-panel-alt, rgba( 255, 255, 255, 0.03 ) );
	border: 1px solid var( --ed-border, #333a44 ); border-radius: 10px; overflow: hidden;
}
.wpieta-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 );
}
.wpieta-card-head svg { flex: none; opacity: 0.85; }
.wpieta-card-body { display: flex; flex-direction: column; gap: 8px; padding: 8px 12px 12px; }
.wpieta-wide { width: 100%; }
.wpieta-info { font-size: 11px; color: var( --ed-text-muted, #9aa1ab ); }
.wpieta-cards { display: grid; grid-template-columns: repeat( 2, 1fr ); gap: 8px; }
.wpieta-tcard {
	display: flex; flex-direction: column; gap: 4px; padding: 6px; cursor: pointer;
	background: var( --ed-bg, #14171c ); border: 1px solid var( --ed-border, #333a44 ); border-radius: 8px;
}
.wpieta-tcard:hover { border-color: var( --ed-text-muted, #9aa1ab ); }
.wpieta-tcard.sel { border-color: var( --ed-accent, #3b82f6 ); box-shadow: 0 0 0 1px var( --ed-accent, #3b82f6 ); }
.wpieta-tthumb { width: 100%; border-radius: 4px; }
.wpieta-tlabel {
	overflow: hidden; font-size: 10.5px; color: var( --ed-text-dim, #b9c0cc );
	text-align: center; text-overflow: ellipsis; white-space: nowrap;
}
.wpieta-row { display: grid; grid-template-columns: 92px 1fr auto; gap: 8px; align-items: center; margin: 2px 0; }
.wpieta-row > span { overflow: hidden; white-space: nowrap; }
.wpieta-row input[type='range'] { width: 100%; accent-color: var( --ed-accent, #3b82f6 ); }
.wpieta-row output { min-width: 40px; font-size: 11px; color: var( --ed-text-muted, #9aa1ab ); text-align: right; }
#wpie-root .wpieta-check { display: inline-flex; gap: 7px; align-items: center; cursor: pointer; }
#wpie-root .wpieta-check input { width: 15px; height: 15px; accent-color: var( --accent, #3b66ff ); }
.wpieta-pals { display: flex; flex-wrap: wrap; gap: 6px; }
.wpieta-pal { flex: none; width: 42px; height: 20px; cursor: pointer; border: 1px solid var( --ed-border, #333a44 ); border-radius: 5px; }
.wpieta-pal.sel { border-color: var( --ed-accent, #3b82f6 ); box-shadow: 0 0 0 1px var( --ed-accent, #3b82f6 ); }
.wpieta-customrow { grid-template-columns: 92px 1fr auto; }
.wpieta-customs { display: inline-flex; gap: 6px; align-items: center; }
.wpieta-reset {
	padding: 3px 10px; font-size: 11px; color: var( --ed-text-muted, #9aa1ab ); cursor: pointer;
	background: none; border: 1px solid var( --ed-border, #333a44 ); border-radius: 6px;
}
.wpieta-reset:hover { color: inherit; }
.wpieta-text-row { margin: 6px 0; }
.wpieta-text-row > span { display: block; margin-bottom: 3px; font-size: 11px; color: var( --ed-text-muted, #9aa1ab ); }
.wpieta-names, .wpieta-input {
	width: 100%; padding: 7px 9px; font-size: 12px; color: inherit; resize: vertical;
	background: var( --ed-bg, #14171c ); border: 1px solid var( --ed-border, #333a44 );
	border-radius: 6px; outline: none;
}
.wpieta-text-row .wpie-font-mount { width: 100%; }
.wpieta-postlist { display: flex; flex-direction: column; gap: 3px; margin-top: 5px; }
.wpieta-postitem {
	padding: 6px 9px; overflow: hidden; font-size: 12px; color: inherit; text-align: left;
	text-overflow: ellipsis; white-space: nowrap; cursor: pointer;
	background: var( --ed-bg, #14171c ); border: 1px solid var( --ed-border, #333a44 ); border-radius: 6px;
}
.wpieta-postitem:hover { border-color: var( --ed-accent, #3b82f6 ); }

/* v3: reveal-animation buttons side by side. */
#wpie-root .wpieta-btnrow {
	display: flex;
	gap: 8px;
	margin-top: 6px;
}
#wpie-root .wpieta-btnrow .ai-btn {
	flex: 1;
}
