/* Native field grouping and status feedback. Primitive visuals compile from components/ui/. */

.sgui-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.sgui-field > span {
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.5;
	color: var(--wp--custom--ui--muted-foreground);
}

textarea.sgui-control {
	resize: vertical;
	min-height: 7rem;
}

/* Native select: no system arrow (it sits off the field's text edge); the chevron is the shadcn one, drawn as a background,
   the empty choice reads like a placeholder. */
select.sgui-control {
	padding-right: 2.25rem;
	background-repeat: no-repeat;
	background-position: right .75rem center;
	background-size: 1rem;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b6f76' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

select.sgui-control:has( option[value=""]:checked ) { color: var(--wp--custom--ui--muted-foreground); }

/* .sgui-notice */
.sgui-notice { margin: 1rem 0 0; }

.sgui-notice.is-ok {
	background: color-mix(in srgb, var(--wp--custom--status--ok) 12%, #fff);
	color: var(--wp--custom--status--ok-text);
}

.sgui-notice.is-err, .sgui-notice.is-error {
	background: color-mix(in srgb, var(--wp--custom--status--err) 10%, #fff);
	color: var(--wp--custom--status--err-text);
	display: flex;
	align-items: center;
	gap: 0.55rem;
}

.sgui-notice.is-err::before, .sgui-notice.is-error::before {
	content: "!";
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	border-radius: 999px;
	background: var(--wp--custom--status--err);
	color: #fff;
	font-weight: 600;
	font-size: 0.8rem;
}

.sgui-notice[hidden] {
	display: none;
}
