/* MoveCast standalone — แถบด้านบนแยกจาก iframe ไม่ทับ QR */

*,
*::before,
*::after {
	box-sizing: border-box;
}

:root {
	--movecast-bar-h: 52px;
}

html,
body.movecast-shell {
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
	background: #0a0f0d;
	color: #f5f5f5;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	-webkit-font-smoothing: antialiased;
}

.movecast-bar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: var(--movecast-bar-h);
	padding: 6px max(12px, env(safe-area-inset-right, 0px)) 6px max(12px, env(safe-area-inset-left, 0px));
	padding-top: max(6px, env(safe-area-inset-top, 0px));
	background: linear-gradient(180deg, rgba(15, 92, 48, 0.98) 0%, rgba(10, 15, 13, 0.97) 100%);
	border-bottom: 2px solid rgba(255, 213, 79, 0.45);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.movecast-bar-title {
	flex: 1;
	min-width: 0;
	padding-right: 8px;
	color: rgba(255, 255, 255, 0.72);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.3;
	text-align: right;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.movecast-page {
	position: fixed;
	top: var(--movecast-bar-h);
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	margin: 0;
	padding: 0;
	overflow: hidden;
	background: #000;
}

.movecast-iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	margin: 0;
	padding: 0;
	background: #000;
}

.movecast-exit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	flex-shrink: 0;
	min-height: 40px;
	min-width: 148px;
	padding: 8px 16px;
	background: linear-gradient(135deg, #ffd54f 0%, #ffc107 100%);
	color: #0a0f0d;
	text-decoration: none;
	font-size: 15px;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: 0.01em;
	border: 2px solid rgba(255, 255, 255, 0.85);
	border-radius: 10px;
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
	transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
	-webkit-tap-highlight-color: transparent;
}

.movecast-exit-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	font-size: 17px;
	line-height: 1;
	background: rgba(10, 15, 13, 0.12);
	border-radius: 7px;
	flex-shrink: 0;
}

.movecast-exit-text {
	white-space: nowrap;
}

.movecast-exit:hover,
.movecast-exit:focus {
	filter: brightness(1.06);
	color: #0a0f0d;
	outline: none;
	box-shadow: 0 5px 16px rgba(255, 213, 79, 0.45);
	transform: translateY(-1px);
}

.movecast-exit:active {
	transform: translateY(0);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

@media (max-width: 520px) {
	:root {
		--movecast-bar-h: 48px;
	}

	.movecast-bar-title {
		display: none;
	}

	.movecast-exit {
		min-width: 0;
		width: 100%;
		max-width: 220px;
		font-size: 14px;
		padding: 8px 14px;
	}
}

@supports (height: 100dvh) {
	body.movecast-shell {
		height: 100dvh;
	}

	.movecast-page {
		height: calc(100dvh - var(--movecast-bar-h));
	}
}
