.sqrs {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
	gap: 28px;
	max-width: 980px;
	margin: 16px 0;
	padding: 24px;
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	box-sizing: border-box;
	font-size: 14px;
	line-height: 1.5;
	color: #1d2327;
}
.sqrs *, .sqrs *::before, .sqrs *::after { box-sizing: border-box; }

@media (max-width: 782px) {
	.sqrs { padding: 16px; }
}

.sqrs__field { margin-bottom: 16px; }
.sqrs__label { display: block; font-weight: 600; margin-bottom: 6px; }
.sqrs__optional { font-weight: 400; color: #646970; }
.sqrs__input {
	width: 100%;
	max-width: 100%;
	padding: 8px 10px;
	font-size: 14px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	background: #fff;
	color: inherit;
	font-family: inherit;
}
.sqrs textarea.sqrs__input { resize: vertical; min-height: 56px; }
.sqrs__custom { margin-top: 8px; max-width: 180px; }
.sqrs__hint { margin: 6px 0 0; font-size: 12.5px; color: #646970; }
.sqrs__hint:empty { display: none; }
.sqrs__center { text-align: center; }

.sqrs__row--3 { display: grid; grid-template-columns: auto auto 1fr; gap: 16px; align-items: start; }
@media (max-width: 600px) { .sqrs__row--3 { grid-template-columns: 1fr 1fr; } .sqrs__row--3 > :last-child { grid-column: 1 / -1; } }
.sqrs input[type="color"] { width: 64px; height: 38px; padding: 2px; border: 1px solid #8c8f94; border-radius: 4px; background: #fff; cursor: pointer; }

.sqrs__more { margin: 4px 0 20px; padding: 12px 14px; border: 1px solid #dcdcde; border-radius: 6px; background: #f6f7f7; }
.sqrs__more summary { cursor: pointer; font-weight: 600; }
.sqrs__more[open] summary { margin-bottom: 14px; }
.sqrs__check { display: flex; gap: 8px; align-items: center; }

.sqrs__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sqrs__btn { cursor: pointer; }
.sqrs__btn[disabled] { cursor: not-allowed; }
.sqrs__status { min-height: 1.5em; margin: 10px 0 0; }
.sqrs__status.is-error { color: #b32d2e; }

.sqrs__preview-wrap { align-self: start; position: sticky; top: 48px; }
.sqrs__preview {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 300px;
	padding: 16px;
	border: 1px dashed #c3c4c7;
	border-radius: 8px;
	background: #f6f7f7;
}
.sqrs__preview svg { display: block; width: 100%; max-width: 320px; height: auto; box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
/* Checkerboard so a transparent background is visible */
.sqrs__preview.is-transparent svg {
	box-shadow: none;
	background: repeating-conic-gradient(#e0e0e0 0% 25%, #fff 0% 50%) 50% / 16px 16px;
}
.sqrs__empty { margin: 0; color: #646970; text-align: center; }

/* Buttons on the public site (wp-admin already styles .button) */
body:not(.wp-admin) .sqrs .sqrs__btn {
	padding: 8px 14px;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	color: #1d2327;
	background: #fff;
	border: 1px solid #1d2327;
	border-radius: 4px;
}
body:not(.wp-admin) .sqrs .sqrs__btn.button-primary { color: #fff; background: #1d2327; }
body:not(.wp-admin) .sqrs .sqrs__btn[disabled] { opacity: .45; }
