/*
 * Create with AI. Builds on the Image Studio styles (.wps-*); only the Create
 * layout lives here.
 */
.wpsc-layout {
	display: grid;
	grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
	gap: 16px;
	align-items: start;
	margin-top: 12px;
}

.wpsc-form,
.wpsc-output {
	display: grid;
	gap: 12px;
	min-width: 0;
}

.wpsc-types {
	display: grid;
	gap: 8px;
}

.wpsc-type {
	display: grid;
	grid-template-columns: auto 1fr;
	column-gap: 8px;
	align-items: start;
	padding: 10px 12px;
	border: 1px solid var(--wps-border);
	border-radius: 4px;
	background: #fff;
	cursor: pointer;
}

.wpsc-type input {
	grid-row: span 2;
	margin-top: 2px;
}

.wpsc-type .description {
	grid-column: 2;
	font-size: 12px;
}

.wpsc-type.is-active {
	border-color: var(--wps-accent);
	box-shadow: 0 0 0 1px var(--wps-accent);
	background: #f0f6fc;
}

.wpsc-placement select,
.wpsc-describe select,
.wpsc-describe input[type="text"],
.wpsc-describe textarea {
	width: 100%;
	max-width: 100%;
}

.wpsc-placement .wps-row input[type="number"] {
	width: 96px;
}

.wpsc-size {
	margin: 8px 0 0;
}

.wpsc-style,
.wpsc-product {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin-top: 8px;
}

.wpsc-style img,
.wpsc-product img {
	width: 56px;
	height: 56px;
	object-fit: cover;
	border: 1px solid var(--wps-border);
	border-radius: 3px;
}

.wpsc-today {
	margin: 8px 0 0;
}

.wpsc-results .wps-strip {
	flex-wrap: wrap;
}

.wpsc-stage {
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 320px;
	background: var(--wps-soft);
	background-image: linear-gradient(45deg, #eee 25%, transparent 25%), linear-gradient(-45deg, #eee 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #eee 75%), linear-gradient(-45deg, transparent 75%, #eee 75%);
	background-size: 16px 16px;
	background-position: 0 0, 0 8px, 8px -8px, -8px 0;
	border-radius: 4px;
	overflow: hidden;
}

.wpsc-stage img,
.wpsc-canvas {
	display: block;
	max-width: 100%;
	max-height: 70vh;
	height: auto;
}

.wpsc-stage-info {
	margin: 8px 0;
}

.wpsc-actions {
	flex-wrap: wrap;
	gap: 8px;
}

.wpsc-edit {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid var(--wps-border);
}

.wpsc-edit-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 8px 16px;
}

.wpsc-versions {
	flex-wrap: wrap;
	gap: 6px;
	margin: 8px 0;
}

@media (max-width: 960px) {
	.wpsc-layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.wpsc-stage {
		min-height: 200px;
	}
}

.wpsc-banner {
	margin: 12px 0 0;
}

.wpsc-layer {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	padding: 10px;
	border: 1px dashed var(--wps-border);
	border-radius: 4px;
}

.wpsc-layer .description {
	flex: 1 1 100%;
	margin: 0;
}

.wpsc-layer-thumb,
.wps-tile.is-checker {
	background-color: #fff;
	background-image: linear-gradient(45deg, #e6e6e6 25%, transparent 25%), linear-gradient(-45deg, #e6e6e6 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e6e6e6 75%), linear-gradient(-45deg, transparent 75%, #e6e6e6 75%);
	background-size: 12px 12px;
	background-position: 0 0, 0 6px, 6px -6px, -6px 0;
}

.wpsc-layer-thumb {
	display: inline-flex;
	border: 1px solid var(--wps-border);
	border-radius: 3px;
}

.wpsc-layer-thumb img {
	width: 72px;
	height: 72px;
	object-fit: contain;
}

.wpsc-pick-head {
	display: flex;
	gap: 8px;
	align-items: center;
	margin-bottom: 8px;
}

.wpsc-pick-head.is-finding {
	display: block;
}

.wpsc-finder-title {
	margin: 0 0 6px;
}

.wpsc-finder .wps-pick-list {
	max-height: 32vh;
}

/* Messages in a tile grid span the whole row instead of one narrow column. */
.wps-pick-grid > p {
	grid-column: 1 / -1;
	margin: 0;
}

.wpsc-photos .wps-tile img {
	width: 72px;
	height: 72px;
	object-fit: cover;
}

.wpsc-mode {
	display: inline-flex;
	gap: 0;
	margin: 12px 0 0;
	border: 1px solid var(--wps-border);
	border-radius: 4px;
	overflow: hidden;
}

.wpsc-mode[hidden] {
	display: none;
}

.wpsc-mode-tab {
	padding: 6px 18px;
	border: 0;
	background: #fff;
	color: inherit;
	font: inherit;
	cursor: pointer;
}

.wpsc-mode-tab + .wpsc-mode-tab {
	border-left: 1px solid var(--wps-border);
}

.wpsc-mode-tab.is-active {
	background: var(--wp-admin-theme-color, #2271b1);
	color: #fff;
}

.wpsc-mode-tab:focus-visible {
	outline: 2px solid var(--wp-admin-theme-color, #2271b1);
	outline-offset: -2px;
}

.wpsc-vgrid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 10px 14px;
	align-items: start;
}

.wpsc-vstart {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.wpsc-vstart img {
	width: 96px;
	height: 96px;
	object-fit: cover;
	border: 1px solid var(--wps-border);
	border-radius: 3px;
}

.wpsc-vstage video {
	display: block;
	max-width: 100%;
	max-height: 60vh;
	margin: 0 auto;
	background: #000;
}

.wpsc-vextra:empty {
	display: none;
}

.wpsc-vwrap {
	position: relative;
}

.wpsc-step {
	padding: 0;
}

.wpsc-step > summary {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 2px 10px;
	padding: 12px 36px 12px 16px;
	position: relative;
	cursor: pointer;
	list-style: none;
}

.wpsc-step > summary::-webkit-details-marker {
	display: none;
}

.wpsc-step > summary::after {
	content: "";
	position: absolute;
	top: 18px;
	right: 16px;
	width: 7px;
	height: 7px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.15s;
}

.wpsc-step[open] > summary::after {
	transform: rotate(-135deg);
	top: 21px;
}

.wpsc-step > summary:focus-visible {
	outline: 2px solid var(--wp-admin-theme-color, #2271b1);
	outline-offset: -2px;
}

.wpsc-step-title {
	margin: 0;
	font-size: 14px;
}

.wpsc-step-summary {
	flex: 1 1 100%;
	color: #50575e;
	font-size: 13px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.wpsc-step[open] .wpsc-step-summary {
	display: none;
}

.wpsc-step-summary.is-warning {
	color: #b32d2e;
}

.wpsc-step-body {
	padding: 0 16px 16px;
}

.wpsc-required {
	color: #b32d2e;
	font-weight: 400;
}

/* Display-only type cards ("typeExtras" filter): visible, never selectable. */
.wpsc-type.is-display-only {
	cursor: default;
	background: #f6f7f7;
	color: #50575e;
}

.wpsc-type.is-display-only input {
	opacity: 0.5;
}

.wpsc-type-badge {
	display: inline-block;
	margin-left: 6px;
	padding: 0 6px;
	border-radius: 3px;
	font-size: 11px;
	font-weight: 600;
	line-height: 18px;
	vertical-align: middle;
	background: #f0f6fc;
	color: #2271b1;
}

.wpsc-type-link {
	grid-column: 2;
	margin-top: 4px;
}
