/*
	APP Skyhotel Checkin – màn hình khởi động + hộp thoại OTA (file cố định trong APP, không OTA)
	Chỉ dùng CSS thuần, không framework. Màu nền trùng màn hình splash của APP (#c9433d) để chuyển cảnh liền mạch.
*/
:root {
	--sbc-ota-red: #c9433d;
	--sbc-ota-red-dark: #a3322d;
	--sbc-ota-text: #1f2933;
	--sbc-ota-muted: #67727e;
	--sbc-ota-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html, body {
	margin: 0;
	min-height: 100%;
	background: #f4f5f7;
	-webkit-text-size-adjust: 100%;
}

/* ===== Màn hình khởi động ===== */
.sbc-startup {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: env(safe-area-inset-top) 24px env(safe-area-inset-bottom);
	background: radial-gradient(120% 90% at 50% 20%, #d9554e 0%, var(--sbc-ota-red) 45%, var(--sbc-ota-red-dark) 100%);
	color: #fff;
	font-family: var(--sbc-ota-font);
	transition: opacity .35s ease, visibility .35s;
}

.sbc-startup.is-hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.sbc-startup-center {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: min(280px, 100%);
	animation: sbc-ota-rise .6s cubic-bezier(.2, .8, .2, 1) both;
}

.sbc-startup-logo {
	width: 96px;
	height: 96px;
	border-radius: 26px;
	background: #fff;
	color: var(--sbc-ota-red);
	display: grid;
	place-items: center;
	box-shadow: 0 18px 40px rgba(80, 10, 6, .28);
	animation: sbc-ota-breathe 2.4s ease-in-out infinite;
}

.sbc-startup-logo svg {
	width: 66px;
	height: 66px;
	fill: currentColor;
}

.sbc-startup-logo .check {
	fill: none;
	stroke: #fff;
	stroke-width: 2.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.sbc-startup-name {
	margin-top: 24px;
	font-size: 20px;
	font-weight: 800;
	letter-spacing: 2px;
}

.sbc-startup-name span {
	margin-left: 8px;
	font-weight: 400;
	letter-spacing: 0;
	opacity: .85;
}

/* Thanh tiến trình: chạy vô hạn khi chưa biết tiến độ, có % khi đang tải file */
.sbc-startup-progress {
	position: relative;
	width: 100%;
	height: 4px;
	margin-top: 34px;
	border-radius: 4px;
	background: rgba(255, 255, 255, .25);
	overflow: hidden;
}

.sbc-startup-bar {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 35%;
	border-radius: 4px;
	background: #fff;
	animation: sbc-ota-indeterminate 1.2s ease-in-out infinite;
}

.sbc-startup-bar.is-determinate {
	animation: none;
	transition: width .25s ease;
}

.sbc-startup-text {
	min-height: 20px;
	margin-top: 14px;
	font-size: 14px;
	text-align: center;
	opacity: .92;
}

.sbc-startup-version {
	position: absolute;
	bottom: calc(18px + env(safe-area-inset-bottom));
	font-size: 12px;
	opacity: .6;
}

/* ===== Hộp thoại ===== */
.sbc-ota-dialog {
	position: fixed;
	inset: 0;
	z-index: 10001;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(20, 8, 6, .45);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
	font-family: var(--sbc-ota-font);
	animation: sbc-ota-fade .2s ease both;
}

.sbc-ota-dialog[hidden] {
	display: none;
}

.sbc-ota-dialog-card {
	width: min(340px, 100%);
	padding: 28px 24px 22px;
	border-radius: 22px;
	background: #fff;
	color: var(--sbc-ota-text);
	text-align: center;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
	animation: sbc-ota-pop .28s cubic-bezier(.2, .9, .3, 1.2) both;
}

.sbc-ota-dialog-icon {
	width: 58px;
	height: 58px;
	margin: 0 auto 16px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: #fdecea;
	color: var(--sbc-ota-red);
}

.sbc-ota-dialog-icon.is-info {
	background: #e8f5ee;
	color: #1f8a4c;
}

.sbc-ota-dialog-icon svg {
	width: 28px;
	height: 28px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.sbc-ota-dialog-title {
	margin: 0 0 8px;
	font-size: 19px;
	line-height: 1.3;
}

.sbc-ota-dialog-text {
	margin: 0;
	font-size: 15px;
	line-height: 1.5;
	color: var(--sbc-ota-muted);
}

.sbc-ota-dialog-detail {
	margin: 10px 0 0;
	font-size: 11px;
	color: #9aa3ad;
	word-break: break-word;
}

.sbc-ota-dialog-detail:empty {
	display: none;
}

.sbc-ota-dialog-button {
	width: 100%;
	min-height: 50px;
	margin-top: 22px;
	border: 0;
	border-radius: 14px;
	background: var(--sbc-ota-red);
	color: #fff;
	font: 650 16px var(--sbc-ota-font);
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.sbc-ota-dialog-button:active {
	background: var(--sbc-ota-red-dark);
	transform: scale(.98);
}

@keyframes sbc-ota-indeterminate {
	0% { left: -35%; }
	100% { left: 100%; }
}

@keyframes sbc-ota-breathe {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.05); }
}

@keyframes sbc-ota-rise {
	from { opacity: 0; transform: translateY(14px); }
	to { opacity: 1; transform: none; }
}

@keyframes sbc-ota-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes sbc-ota-pop {
	from { opacity: 0; transform: scale(.9); }
	to { opacity: 1; transform: none; }
}

/* ===== Máy tính bảng / màn hình rộng (iPad, tablet Android) ===== */
@media (min-width: 700px) and (min-height: 600px) {
	.sbc-startup-center {
		width: 380px;
	}

	.sbc-startup-logo {
		width: 128px;
		height: 128px;
		border-radius: 34px;
	}

	.sbc-startup-logo svg {
		width: 88px;
		height: 88px;
	}

	.sbc-startup-name {
		margin-top: 30px;
		font-size: 26px;
		letter-spacing: 3px;
	}

	.sbc-startup-progress {
		height: 5px;
		margin-top: 42px;
	}

	.sbc-startup-text {
		margin-top: 18px;
		font-size: 17px;
	}

	.sbc-startup-version {
		font-size: 13px;
	}

	.sbc-ota-dialog-card {
		width: 420px;
		padding: 36px 32px 28px;
		border-radius: 26px;
	}

	.sbc-ota-dialog-icon {
		width: 68px;
		height: 68px;
	}

	.sbc-ota-dialog-icon svg {
		width: 32px;
		height: 32px;
	}

	.sbc-ota-dialog-title {
		font-size: 22px;
	}

	.sbc-ota-dialog-text {
		font-size: 17px;
	}

	.sbc-ota-dialog-detail {
		font-size: 12px;
	}

	.sbc-ota-dialog-button {
		min-height: 56px;
		margin-top: 26px;
		font-size: 17px;
	}
}

/* Điện thoại xoay ngang (màn hình thấp) */
@media (max-height: 480px) {
	.sbc-startup-logo {
		width: 72px;
		height: 72px;
		border-radius: 20px;
	}

	.sbc-startup-logo svg {
		width: 50px;
		height: 50px;
	}

	.sbc-startup-name {
		margin-top: 14px;
	}

	.sbc-startup-progress {
		margin-top: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sbc-startup-logo, .sbc-startup-center, .sbc-ota-dialog, .sbc-ota-dialog-card {
		animation: none;
	}
}
