/**
 * Live Demo chrome — loaded only on demo sessions /demo/.
 * Intentionally separate from style.css so marketing home.php is unaffected.
 */

.wb-demo-banner {
	position: sticky;
	top: 0;
	z-index: 10000;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 10px 12px;
	background: #0f172a;
	color: #e2e8f0;
	font-size: 13px;
	line-height: 1.4;
	border-bottom: 2px solid var(--ac2, #10b981);
	box-sizing: border-box;
	width: 100%;
	max-width: 100vw;
	overflow: visible;
}

.wb-demo-banner__top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
}

.wb-demo-banner__copy {
	margin: 0;
	flex: 1 1 auto;
	min-width: 0;
}

.wb-demo-banner strong {
	color: #6ee7b7;
}

.wb-demo-banner__hint {
	color: #94a3b8;
}

.wb-demo-banner__meta {
	color: #94a3b8;
}

.wb-demo-banner__nav {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: stretch;
	width: 100%;
}

.wb-demo-banner__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	padding: 10px 12px;
	border-radius: 10px;
	font-weight: 700;
	font-size: 13px;
	color: #0f172a;
	background: #6ee7b7;
	border: 0;
	cursor: pointer;
	box-sizing: border-box;
	white-space: nowrap;
}

.wb-demo-banner__btn--ghost {
	color: #e2e8f0;
	background: transparent;
	border: 1px solid #475569;
	font-weight: 600;
}

.wb-demo-banner__exit {
	flex-shrink: 0;
	color: #94a3b8;
	text-decoration: underline;
	font-size: 13px;
	padding: 2px 0;
	line-height: 1.4;
}

.wb-demo-banner__switch {
	position: relative;
	flex: 1 1 100%;
	min-width: 0;
}

.wb-demo-banner__switch > summary.wb-demo-banner__btn {
	width: 100%;
}

.wb-demo-banner summary {
	list-style: none;
	cursor: pointer;
}

.wb-demo-banner summary::-webkit-details-marker {
	display: none;
}

/* Mobile: language panel flows in-document so nothing clips off-canvas */
.wb-demo-banner__menu {
	position: static;
	width: 100%;
	margin-top: 8px;
	min-width: 0;
	max-width: 100%;
	background: #1e293b;
	border: 1px solid #334155;
	border-radius: 12px;
	padding: 8px;
	box-sizing: border-box;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 6px;
	box-shadow: none;
	z-index: 1;
}

.wb-demo-banner__menu-label {
	grid-column: 1 / -1;
	margin: 0 0 2px;
	padding: 2px 6px;
	color: #94a3b8;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.wb-demo-banner__menu a {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 10px 8px;
	border-radius: 8px;
	color: #e2e8f0;
	text-decoration: none;
	font-size: 13px;
	font-weight: 600;
	background: rgba(15, 23, 42, 0.45);
	min-width: 0;
}

.wb-demo-banner__menu a.is-active {
	color: #6ee7b7;
	outline: 1px solid rgba(110, 231, 183, 0.45);
}

.wb-demo-banner__switch:not([open]) > .wb-demo-banner__menu {
	display: none;
}

/* Field role: office + language side by side when space allows */
.wb-demo-banner__nav > .wb-demo-banner__btn {
	flex: 1 1 calc(50% - 4px);
}

.wb-demo-banner__nav > .wb-demo-banner__switch {
	flex: 1 1 calc(50% - 4px);
}

@media (max-width: 639px) {
	.wb-demo-banner__nav > .wb-demo-banner__btn,
	.wb-demo-banner__nav > .wb-demo-banner__switch {
		flex: 1 1 100%;
	}

	.wb-demo-banner__switch--primary > summary.wb-demo-banner__btn {
		padding: 12px 14px;
		font-size: 14px;
	}
}

@media (min-width: 768px) {
	.wb-demo-banner {
		flex-direction: row;
		flex-wrap: wrap;
		align-items: center;
		justify-content: space-between;
		gap: 10px 16px;
		padding: 8px 16px;
	}

	.wb-demo-banner__top {
		flex: 1 1 240px;
		align-items: center;
	}

	.wb-demo-banner__nav {
		width: auto;
		flex: 0 1 auto;
		justify-content: flex-end;
	}

	.wb-demo-banner__nav > .wb-demo-banner__btn,
	.wb-demo-banner__nav > .wb-demo-banner__switch {
		flex: 0 1 auto;
	}

	.wb-demo-banner__switch {
		flex: 0 1 auto;
	}

	.wb-demo-banner__switch > summary.wb-demo-banner__btn {
		width: auto;
	}

	.wb-demo-banner__btn {
		padding: 6px 12px;
	}

	/* Desktop: compact dropdown, stay inside viewport */
	.wb-demo-banner__menu {
		position: absolute;
		left: auto;
		right: 0;
		top: calc(100% + 6px);
		width: min(280px, calc(100vw - 24px));
		margin-top: 0;
		display: block;
		max-height: min(70vh, 360px);
		overflow-y: auto;
		box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
		z-index: 10001;
	}

	.wb-demo-banner__menu-label {
		display: block;
	}

	.wb-demo-banner__menu a {
		display: block;
		background: transparent;
	}

	.wb-demo-banner__switch:not([open]) > .wb-demo-banner__menu {
		display: none;
	}
}

/* Demo hub page */
.wb-demo-hub__pages {
	display: grid;
	gap: 8px;
	margin-top: 1rem;
}

@media (min-width: 640px) {
	.wb-demo-hub__pages {
		grid-template-columns: 1fr 1fr;
	}
}

.wb-demo-hub__page {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 10px 14px;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	text-decoration: none;
	color: #0f172a;
	font-size: 14px;
	font-weight: 600;
	background: #fff;
	box-sizing: border-box;
	max-width: 100%;
}

.wb-demo-hub__page:hover {
	border-color: #34d399;
	background: #ecfdf5;
}

.wb-demo-hub__page span {
	color: #64748b;
	font-weight: 500;
	font-size: 12px;
}
