/* Template Showcase — preview simulator
   Standalone styles for the /?demo=… device previewer. Loaded outside the
   theme, so this file is self-contained (its own reset + layout). */

* {
	box-sizing: border-box;
}

html,
body {
	height: 100%;
}

body.tshow-prev {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	background: #e8eaed;
	color: #111827;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

/* ---------- Header (50px) ---------- */
.tshow-prev__bar {
	flex: 0 0 50px;
	height: 50px;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 12px;
	padding: 0 14px;
	background: #ffffff;
	border-bottom: 1px solid #e2e5ea;
	box-shadow: 0 1px 3px rgba( 17, 24, 39, 0.06 );
	z-index: 2;
}

/* Left — logo links home */
.tshow-prev__brand {
	display: flex;
	align-items: center;
	min-width: 0;
}

.tshow-prev__logo {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	color: #111827;
	max-width: 100%;
}

.tshow-prev__logo img {
	display: block;
	width: 28px;
	height: 28px;
	border-radius: 6px;
	object-fit: cover;
}

.tshow-prev__logo-text {
	font-weight: 700;
	font-size: 0.95rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Center — device switchers */
.tshow-prev__devices {
	display: flex;
	align-items: center;
	gap: 4px;
	justify-self: center;
	background: #f1f3f5;
	border-radius: 999px;
	padding: 3px;
}

.tshow-prev__device {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 32px;
	padding: 0;
	border: none;
	border-radius: 999px;
	background: transparent;
	color: #6b7280;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.tshow-prev__device:hover {
	color: #111827;
}

.tshow-prev__device.is-active {
	background: #ffffff;
	color: #2563eb;
	box-shadow: 0 1px 2px rgba( 17, 24, 39, 0.15 );
}

.tshow-prev__device:focus-visible {
	outline: 2px solid #2563eb;
	outline-offset: 2px;
}

/* Right — template name (hidden on small screens) */
.tshow-prev__meta {
	justify-self: end;
	min-width: 0;
	display: flex;
	align-items: center;
}

.tshow-prev__name {
	font-size: 0.85rem;
	color: #6b7280;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 240px;
}

/* ---------- Stage + iframe ---------- */
.tshow-prev__stage {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	align-items: stretch;
	justify-content: center;
	padding: 0;
	overflow: auto;
}

.tshow-prev__frame-wrap {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: stretch;
	justify-content: center;
	transition: padding 0.25s ease;
}

.tshow-prev__frame {
	width: 100%;
	height: 100%;
	border: 0;
	background: #fff;
	display: block;
	transition: max-width 0.25s ease, box-shadow 0.25s ease, border-radius 0.25s ease;
}

/* Desktop: fill the stage edge-to-edge. */
.tshow-prev__stage[data-device="desktop"] .tshow-prev__frame {
	max-width: none;
}

/* Tablet: 820px-wide device viewport, centered with a little breathing room. */
.tshow-prev__stage[data-device="tablet"] .tshow-prev__frame-wrap,
.tshow-prev__stage[data-device="mobile"] .tshow-prev__frame-wrap {
	padding: 20px 16px;
	align-items: flex-start;
}

.tshow-prev__stage[data-device="tablet"] .tshow-prev__frame {
	max-width: 820px;
	border-radius: 14px;
	box-shadow: 0 10px 40px rgba( 17, 24, 39, 0.22 );
	height: 100%;
}

/* Mobile: 390px-wide device viewport. */
.tshow-prev__stage[data-device="mobile"] .tshow-prev__frame {
	max-width: 390px;
	border-radius: 22px;
	box-shadow: 0 10px 40px rgba( 17, 24, 39, 0.22 );
	height: 100%;
}

@media ( max-width: 600px ) {
	.tshow-prev__name {
		display: none;
	}
}
