:root {
	--sw-demo-white: #fff;
	--sw-demo-bg: #eef2ff;
	--sw-demo-dark: #0f172a;
	--sw-demo-text: #1f2937;
	--sw-demo-muted: #64748b;
	--sw-demo-border: rgba(148, 163, 184, 0.32);
	--sw-demo-gradient: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
	--sw-demo-bar-height: 74px;
}

* {
	box-sizing: border-box;
}

html,
body {
	width: 100%;
	min-width: 320px;
	height: 100%;
	padding: 0;
	margin: 0;
	overflow: hidden;
	background: #e2e8f0;
	color: var(--sw-demo-text);
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.subliweb-demo-preview {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.subliweb-demo-bar {
	position: relative;
	z-index: 2;
	display: grid;
	grid-template-columns: minmax(150px, 0.9fr) minmax(120px, 1fr) auto minmax(150px, 0.8fr);
	gap: 18px;
	align-items: center;
	min-height: var(--sw-demo-bar-height);
	padding: 14px 22px;
	background: rgba(255, 255, 255, 0.94);
	border-bottom: 1px solid var(--sw-demo-border);
	box-shadow: 0 16px 44px rgba(15, 23, 42, 0.12);
	backdrop-filter: blur(18px);
}

.subliweb-demo-brand {
	display: inline-flex;
	min-width: 0;
	flex-direction: column;
	gap: 2px;
	color: var(--sw-demo-dark);
	text-decoration: none;
}

.subliweb-demo-brand span {
	font-size: 18px;
	font-weight: 900;
	line-height: 1;
	letter-spacing: -0.04em;
	text-transform: uppercase;
}

.subliweb-demo-brand small {
	color: var(--sw-demo-muted);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.subliweb-demo-title {
	overflow: hidden;
	color: var(--sw-demo-muted);
	font-size: 14px;
	font-weight: 800;
	text-align: center;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.subliweb-demo-devices {
	display: inline-flex;
	gap: 6px;
	justify-content: center;
	padding: 5px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 999px;
}

.subliweb-demo-devices button {
	min-height: 36px;
	padding: 0 14px;
	color: var(--sw-demo-muted);
	font: inherit;
	font-size: 13px;
	font-weight: 900;
	background: transparent;
	border: 0;
	border-radius: 999px;
	cursor: pointer;
	transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.subliweb-demo-devices button.is-active {
	color: #fff;
	background: var(--sw-demo-gradient);
	box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
}

.subliweb-demo-devices button:focus-visible,
.subliweb-demo-cta:focus-visible,
.subliweb-demo-brand:focus-visible {
	outline: 3px solid rgba(37, 99, 235, 0.28);
	outline-offset: 3px;
}

.subliweb-demo-cta {
	justify-self: end;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 0 18px;
	color: #fff;
	font-size: 13px;
	font-weight: 950;
	text-decoration: none;
	text-transform: uppercase;
	background: var(--sw-demo-gradient);
	border-radius: 999px;
	box-shadow: 0 14px 32px rgba(37, 99, 235, 0.24);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.subliweb-demo-cta:hover {
	transform: translateY(-1px);
	box-shadow: 0 18px 40px rgba(37, 99, 235, 0.32);
}

.subliweb-demo-stage {
	display: flex;
	flex: 1 1 auto;
	align-items: stretch;
	justify-content: center;
	min-height: 0;
	padding: 18px;
	background:
		radial-gradient(circle at 10% 0, rgba(56, 189, 248, 0.22), transparent 32%),
		radial-gradient(circle at 90% 0, rgba(124, 58, 237, 0.20), transparent 30%),
		#e2e8f0;
}

.subliweb-demo-frame-shell {
	width: 100%;
	height: calc(100vh - var(--sw-demo-bar-height) - 36px);
	overflow: hidden;
	background: #fff;
	border: 1px solid rgba(148, 163, 184, 0.42);
	border-radius: 18px;
	box-shadow: 0 24px 60px rgba(15, 23, 42, 0.20);
	transition: width 0.24s ease, max-width 0.24s ease, border-radius 0.24s ease;
}

.subliweb-demo-frame {
	display: block;
	width: 100%;
	height: 100%;
	background: #fff;
	border: 0;
}

body[data-device="tablet"] .subliweb-demo-frame-shell {
	width: min(820px, 100%);
}

body[data-device="mobile"] .subliweb-demo-frame-shell {
	width: min(390px, 100%);
	border-radius: 28px;
}

@media (max-width: 767px) {
	:root {
		--sw-demo-bar-height: 72px;
	}

	.subliweb-demo-bar {
		grid-template-columns: minmax(0, 1fr) auto;
		gap: 10px;
		min-height: var(--sw-demo-bar-height);
		padding: 10px 12px;
	}

	.subliweb-demo-title,
	.subliweb-demo-devices {
		display: none;
	}

	.subliweb-demo-brand span {
		font-size: 16px;
	}

	.subliweb-demo-brand small {
		font-size: 10px;
	}

	.subliweb-demo-cta {
		min-height: 40px;
		padding: 0 13px;
		font-size: 11px;
		white-space: nowrap;
	}

	.subliweb-demo-stage {
		padding: 0;
	}

	.subliweb-demo-frame-shell,
	body[data-device="tablet"] .subliweb-demo-frame-shell,
	body[data-device="mobile"] .subliweb-demo-frame-shell {
		width: 100%;
		height: calc(100vh - var(--sw-demo-bar-height));
		border: 0;
		border-radius: 0;
		box-shadow: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	* {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}
