/* Select demo switcher panel. Deliberately independent of the site's own
   look (fonts, colours, radius), so it reads the same whatever is previewed. */

.art-select-demo {
	--art-select-demo-bg: #ffffff;
	--art-select-demo-border: #d7dbe0;
	--art-select-demo-ink: #1d2327;
	--art-select-demo-muted: #50575e;
	--art-select-demo-focus: #2271b1;
	background: var(--art-select-demo-bg);
	border: 1px solid var(--art-select-demo-border);
	border-radius: 10px;
	bottom: 16px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
	color: var(--art-select-demo-ink);
	font: 400 14px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	left: 16px;
	letter-spacing: normal;
	max-height: calc(100vh - 32px);
	overflow: auto;
	position: fixed;
	text-transform: none;
	width: 340px;
	z-index: 100000;
}

.art-select-demo * {
	box-sizing: border-box;
	font-family: inherit;
	letter-spacing: normal;
	text-transform: none;
}

.art-select-demo__toggle {
	align-items: center;
	background: none;
	border: 0;
	border-radius: 10px;
	color: inherit;
	cursor: pointer;
	display: flex;
	font-size: 14px;
	font-weight: 700;
	justify-content: space-between;
	min-height: 44px;
	padding: 10px 14px;
	width: 100%;
}

.art-select-demo__chevron {
	border-bottom: 2px solid currentColor;
	border-right: 2px solid currentColor;
	height: 8px;
	transform: rotate(45deg);
	transition: transform 0.2s;
	width: 8px;
}

.art-select-demo[data-collapsed="true"] {
	width: auto;
}

.art-select-demo[data-collapsed="true"] .art-select-demo__chevron {
	transform: rotate(-135deg);
}

.art-select-demo[data-collapsed="true"] .art-select-demo__body {
	display: none;
}

.art-select-demo__body {
	border-top: 1px solid var(--art-select-demo-border);
	padding: 12px 14px 14px;
}

.art-select-demo__grid {
	display: grid;
	gap: 10px 12px;
	grid-template-columns: 1fr 1fr;
	margin-top: 10px;
}

.art-select-demo__field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

/* The design and font pickers have the longest labels - give them the full row. */
.art-select-demo__field--design,
.art-select-demo__grid > .art-select-demo__field:first-child {
	grid-column: 1 / -1;
}

.art-select-demo__field label {
	color: var(--art-select-demo-muted);
	font-size: 12px;
	font-weight: 600;
}

.art-select-demo select,
.art-select-demo input[type="color"] {
	background: #ffffff;
	border: 1px solid var(--art-select-demo-border);
	border-radius: 6px;
	color: var(--art-select-demo-ink);
	font-size: 13px;
	height: 36px;
	margin: 0;
	max-width: 100%;
	padding: 0 8px;
	width: 100%;
}

.art-select-demo input[type="color"] {
	cursor: pointer;
	padding: 3px;
}

.art-select-demo__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 14px;
}

.art-select-demo__button {
	background: #ffffff;
	border: 1px solid var(--art-select-demo-ink);
	border-radius: 6px;
	color: var(--art-select-demo-ink);
	cursor: pointer;
	flex: 1 1 auto;
	font-size: 13px;
	font-weight: 600;
	min-height: 36px;
	padding: 6px 10px;
}

.art-select-demo__button--primary {
	background: var(--art-select-demo-ink);
	color: #ffffff;
}

.art-select-demo__button:hover {
	background: #f0f0f1;
}

.art-select-demo__button--primary:hover {
	background: #000000;
}

.art-select-demo button:focus-visible,
.art-select-demo select:focus-visible,
.art-select-demo input:focus-visible {
	outline: 2px solid var(--art-select-demo-focus);
	outline-offset: 2px;
}

.art-select-demo__status {
	color: var(--art-select-demo-muted);
	font-size: 12px;
	margin: 8px 0 0;
	min-height: 1em;
}

.art-select-demo[aria-busy="true"] .art-select-demo__body {
	opacity: 0.6;
	pointer-events: none;
}

@media (max-width: 600px) {
	.art-select-demo {
		border-radius: 10px 10px 0 0;
		bottom: 0;
		left: 0;
		max-height: 70vh;
		width: 100%;
	}

	.art-select-demo[data-collapsed="true"] {
		left: 16px;
		width: auto;
	}
}

/* While the pop-out controller is open the on-site panel steps aside. */
.art-select-demo[data-remote="true"] {
	display: none;
}

.art-select-demo__button--popout {
	flex-basis: 100%;
}

/* =========================================================
   Pop-out controller window
   ========================================================= */

.art-select-demo-controller {
	background: #f0f0f1;
	margin: 0;
	padding: 16px;
}

.art-select-demo--controller {
	border-radius: 10px;
	box-shadow: none;
	left: auto;
	max-height: none;
	position: static;
	width: auto;
}

.art-select-demo__heading {
	font-size: 16px;
	font-weight: 700;
	margin: 0;
	padding: 14px 14px 4px;
}

.art-select-demo__hint {
	color: var(--art-select-demo-muted);
	font-size: 12px;
	margin: 0;
	padding: 0 14px 12px;
}

/* Drag the on-site panel by its title bar (see the script). */
.art-select-demo:not(.art-select-demo--controller) .art-select-demo__toggle {
	cursor: grab;
	touch-action: none;
	user-select: none;
}

.art-select-demo[data-dragging="true"] {
	opacity: 0.92;
	transition: none;
}

.art-select-demo[data-dragging="true"] .art-select-demo__toggle {
	cursor: grabbing;
}

@media (max-width: 600px) {
	.art-select-demo:not(.art-select-demo--controller) .art-select-demo__toggle {
		cursor: pointer;
		touch-action: auto;
	}
}
