/* Live Demo Top Bar Styles */
#templately-live-demo-bar {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 72px;
	background: #f2f5f7;
	box-shadow: 0px 1px 0px #e5e7eb;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 32px;
	padding: 0 30px;
	box-sizing: border-box;
	font-family: 'Inter', sans-serif;
	transition: transform 150ms ease-in-out;
	transform: translateY(0);
}

#templately-live-demo-bar.hidden {
	transform: translateY(-100%);
}

/* Loader Overlay */
#templately-iframe-loader {
	position: fixed;
	top: 72px;
	left: 0;
	width: 100%;
	height: calc(100% - 72px);
	background: #f2f5f7;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 999998;
	transition: opacity 300ms ease-in-out;
}

#templately-iframe-loader.loaded {
	opacity: 0;
	pointer-events: none;
}

#templately-iframe-loader img {
	max-width: 200px;
	height: auto;
}

.templately-bar-logo-wrapper {
	display: flex;
	flex-direction: row;
	align-items: center;
	column-gap: 32px;
	row-gap: 4px;
}

/* Logo */
.templately-bar-logo svg {
	height: 32px;
	width: auto;
	display: block;
}

/* Responsive Controls */
.templately-responsive-controls {
	display: flex;
	gap: 12px;
}

.device-btn {
	background: #ffffff;
	color: #737985;
	border: none;
	padding: 0;
	cursor: pointer;
	width: 40px;
	height: 40px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.2s;
}

.device-btn:hover {
	background: #fafbfc !important;
	color: #737985 !important;
	border: none !important;
	padding: 0 !important;
	cursor: pointer !important;
	width: 40px !important;
	height: 40px !important;
	border-radius: 8px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
}

.device-btn svg {
	width: 40px;
	height: 40px;
	display: block;
}

.device-btn.active {
	background: #fafbfc !important;
	color: #5632d1 !important;
}

/* Actions */
.templately-bar-actions {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 16px;
}

.btn-buy-item {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 40px;
	padding: 0 20px;
	background: #5633d1;
	color: #fafbfc;
	font-weight: 500;
	font-size: 16px;
	border-radius: 4px;
	text-decoration: none;
	box-sizing: border-box;
	transition: background-color 0.2s;
	box-shadow: 0 0 0 4px rgba(190, 169, 255, 0.3);
	white-space: nowrap;
}

.btn-buy-item:hover {
	background: #4328a3;
	color: white;
}

.btn-item-status {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 32px;
	padding: 0 8px;
	background: transparent;
	color: #535865;
	border: 1px solid #e4e7eb;
	border-radius: 32px;
	font-weight: 500;
	font-size: 14px;
	text-decoration: none;
	box-sizing: border-box;
	white-space: nowrap;
}

/* Device Wrapper Styles */
#templately-live-demo-wrapper {
	background: #f2f5f7;
}

/* Desktop: full width */
#templately-live-demo-wrapper.device-desktop #templately-live-demo-iframe {
	width: 100%;
	margin: 0 auto;
}

/* Tablet: 768px centered */
#templately-live-demo-wrapper.device-tablet #templately-live-demo-iframe {
	width: 768px;
	max-width: 100%;
	margin: 0 auto;
	border-left: 1px solid #e5e7eb;
	border-right: 1px solid #e5e7eb;
	display: block;
}

/* Mobile: 375px centered */
#templately-live-demo-wrapper.device-mobile #templately-live-demo-iframe {
	width: 375px;
	max-width: 100%;
	margin: 0 auto;
	border-left: 1px solid #e5e7eb;
	border-right: 1px solid #e5e7eb;
	display: block;
}

@media (max-width: 575.98px) {
	.templately-bar-logo-wrapper {
		flex-direction: column;
		align-items: flex-start;
	}

	/* Responsive Controls */
	.templately-responsive-controls {
		gap: 4px;
	}

	.device-btn {
		width: 28px;
		height: 28px;
		border-radius: 4px;
	}

	.device-btn:hover {
		width: 28px !important;
		height: 28px !important;
		border-radius: 4% !important;
	}

	.device-btn svg {
		width: 28px;
		height: 28px;
	}

	.btn-buy-item {
		height: 32px;
		padding: 0 8px;
		font-size: 12px;
	}

	.btn-item-status {
		height: 28px;
		font-size: 12px;
	}
}
