/* Demo bar. Fixed colours on purpose: it must look the same in every style variation. */
.wpruby-demo-bar {
	--wpruby-demo-bg: #14161a;
	--wpruby-demo-fg: #f3f4f6;
	--wpruby-demo-muted: #9ca3af;
	--wpruby-demo-line: #2c3038;
	--wpruby-demo-accent: #f5b301;
	--wpruby-demo-accent-fg: #14161a;

	position: relative;
	z-index: 100000;
	background: var(--wpruby-demo-bg);
	color: var(--wpruby-demo-fg);
	font: 500 14px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.wpruby-demo-bar *,
.wpruby-demo-bar *::before,
.wpruby-demo-bar *::after {
	box-sizing: border-box;
}

.wpruby-demo-bar__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 20px;
	max-width: 1440px;
	margin: 0 auto;
	padding: 8px 16px;
}

.wpruby-demo-bar__brand {
	margin: 0;
	white-space: nowrap;
}

.wpruby-demo-bar__brand span {
	color: var(--wpruby-demo-muted);
	margin-left: 4px;
}

.wpruby-demo-bar__demos {
	flex: 1 1 auto;
	min-width: 0;
}

.wpruby-demo-bar__demos ul {
	display: flex;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-x: auto;
	scrollbar-width: none;
}

.wpruby-demo-bar__demos a {
	display: block;
	padding: 6px 10px;
	border-radius: 6px;
	color: var(--wpruby-demo-muted);
	text-decoration: none;
	white-space: nowrap;
}

.wpruby-demo-bar__demos a:hover,
.wpruby-demo-bar__demos a[aria-current="page"] {
	background: var(--wpruby-demo-line);
	color: var(--wpruby-demo-fg);
}

.wpruby-demo-bar__style {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
}

.wpruby-demo-bar__style label {
	color: var(--wpruby-demo-muted);
}

.wpruby-demo-bar select,
.wpruby-demo-bar__apply {
	min-height: 32px;
	padding: 4px 8px;
	border: 1px solid var(--wpruby-demo-line);
	border-radius: 6px;
	background: var(--wpruby-demo-bg);
	color: var(--wpruby-demo-fg);
	font: inherit;
	cursor: pointer;
}

.wpruby-demo-bar__style.is-enhanced .wpruby-demo-bar__apply {
	display: none;
}

.wpruby-demo-bar__buy {
	padding: 6px 14px;
	border-radius: 6px;
	background: var(--wpruby-demo-accent);
	color: var(--wpruby-demo-accent-fg);
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
}

.wpruby-demo-bar__buy:hover {
	filter: brightness(1.08);
}

.wpruby-demo-bar a:focus-visible,
.wpruby-demo-bar select:focus-visible,
.wpruby-demo-bar button:focus-visible {
	outline: 2px solid var(--wpruby-demo-accent);
	outline-offset: 2px;
}

/*
 * Phones: two rows. Style picker and Buy (which names the theme) on the first,
 * the demos scrolling on the second. The brand and label stay for screen readers.
 */
@media (max-width: 781px) {
	.wpruby-demo-bar__inner {
		gap: 6px 12px;
		padding: 6px 16px;
	}

	.wpruby-demo-bar__brand,
	.wpruby-demo-bar__style label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}

	.wpruby-demo-bar__style {
		flex: 1 1 0;
		min-width: 0;
	}

	.wpruby-demo-bar select {
		width: 100%;
		max-width: 220px;
	}

	.wpruby-demo-bar__demos {
		order: 3;
		flex-basis: 100%;
		margin: 0 -16px;
	}

	.wpruby-demo-bar__demos ul {
		padding: 0 12px;
	}
}

/* Checkout: the "orders can't be placed" note above the Checkout block. */
.wpruby-demo-checkout-notice {
	margin: 0 0 1.5em;
	padding: 12px 16px;
	border-left: 4px solid #f5b301;
	border-radius: 4px;
	background: #fff8e1;
	color: #3d3200;
	font-size: 15px;
}
