.twp-showdemo-active {
	padding-bottom: 76px !important;
}

.twp-showdemo-bar {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 20;
	padding: 10px;
}

.twp-showdemo-bar__inner {
	display: flex;
	gap: 20px;
	width: min(1200px, 100%);
	margin: 0 auto;
}

.twp-showdemo-bar__item {
	display: flex;
	flex: 1 1 0;
	align-items: center;
	justify-content: center;
	min-width: 0;
	min-height: 46px;
	padding: 9px 14px;
	color: #fff !important;
	font: 600 15px/1.25 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	text-align: center;
	text-decoration: none !important;
	background: var(--twp-showdemo-color, #f59e0b);
	border-radius: 8px;
	box-shadow: 0 5px 14px color-mix(in srgb, var(--twp-showdemo-color, #f59e0b) 28%, transparent);
	transition: filter 160ms ease, transform 160ms ease;
}

.twp-showdemo-bar__item:hover,
.twp-showdemo-bar__item:focus-visible {
	color: #fff !important;
	filter: brightness(0.92);
	transform: translateY(-1px);
}

.twp-showdemo-bar__item span:first-child {
	flex: 0 0 auto;
	margin-right: 7px;
}

body.twp-showdemo-popup-open {
	overflow: hidden;
}

.twp-showdemo-popup[hidden] {
	display: none !important;
}

.twp-showdemo-popup {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: grid;
	align-items: center;
	justify-items: center;
	padding: 24px;
	overflow: auto;
	background: rgba(15, 23, 42, 0.72);
	opacity: 0;
	transition: opacity 180ms ease;
}

.twp-showdemo-popup.is-visible {
	opacity: 1;
}

.twp-showdemo-popup__dialog {
	position: relative;
	width: min(850px, 100%);
	max-height: calc(100vh - 48px);
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
	outline: none;
	overflow: visible;
	transform: translateY(10px) scale(0.985);
	transition: transform 180ms ease;
}

.twp-showdemo-popup.is-visible .twp-showdemo-popup__dialog {
	transform: translateY(0) scale(1);
}

.twp-showdemo-popup__close {
	position: absolute;
	top: -16px;
	right: -16px;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	color: #fff;
	font: 400 30px/1 Arial, sans-serif;
	background: #111827;
	border: 2px solid #fff;
	border-radius: 999px;
	box-shadow: 0 5px 18px rgba(0, 0, 0, 0.28);
	cursor: pointer;
	appearance: none;
}

.twp-showdemo-popup__close:hover,
.twp-showdemo-popup__close:focus-visible {
	color: #fff;
	background: #dc2626;
	outline: 3px solid rgba(255, 255, 255, 0.82);
	outline-offset: 2px;
}

.twp-showdemo-popup__link {
	display: block;
	border-radius: inherit;
	outline-offset: 4px;
}

.twp-showdemo-popup__image {
	display: block;
	width: 100%;
	height: auto;
	max-height: calc(100vh - 48px);
	object-fit: contain;
	border-radius: inherit;
}

.twp-showdemo-flatsome-popup {
	padding: 0 !important;
	overflow: hidden;
	border-radius: 14px;
}

.twp-showdemo-flatsome-popup .twp-showdemo-popup__link,
.twp-showdemo-flatsome-popup .twp-showdemo-popup__image {
	margin: 0;
	border-radius: inherit;
}

@media (max-width: 640px) {
	.twp-showdemo-active {
		padding-bottom: 70px !important;
	}

	.twp-showdemo-bar {
		padding: 8px;
	}

	.twp-showdemo-bar__item--desktop {
		display: none;
	}

	.twp-showdemo-bar__item {
		min-height: 46px;
		font-size: 14px;
	}

	.twp-showdemo-popup {
		padding: 18px;
	}

	.twp-showdemo-popup__dialog {
		max-height: calc(100vh - 36px);
	}

	.twp-showdemo-popup__close {
		top: -12px;
		right: -10px;
	}

	.twp-showdemo-popup__image {
		max-height: calc(100vh - 36px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.twp-showdemo-bar__item,
	.twp-showdemo-popup,
	.twp-showdemo-popup__dialog {
		transition: none;
	}
}

/* Popup mặc định ID 18: không có nút đóng và không thể bấm nền để thoát. */
.twp-showdemo-popup--forced .twp-showdemo-popup__dialog {
	cursor: default;
}

.twp-showdemo-popup--forced .twp-showdemo-popup__link {
	cursor: pointer;
}
