/* tzhm-mobile.css — Mobile + Facebook ad conversion optimization v1.1.0
 * Loaded on all TZHM pages. Mobile-first: rules without media queries apply
 * to mobile, then breakpoints override for desktop.
 *
 * Goals:
 *   1. Single-tap booking flow from FB ad
 *   2. Sticky bottom CTA bar (always-visible book button)
 *   3. Big touch targets (min 48px)
 *   4. Fast loading (no decorative images on mobile)
 *   5. WhatsApp instant-book as primary CTA
 */

/* -------- Mobile-first base overrides -------- */
@media (max-width: 768px) {
	.tzhm-page,
	.tzhm-scope { padding-bottom: 80px; /* leave room for sticky bar */ }

	.tzhm-container { padding: 12px; }

	/* Search widget — stack vertically, big inputs */
	.tzhm-search {
		grid-template-columns: 1fr !important;
		padding: 14px;
		gap: 8px;
	}
	.tzhm-search .tzhm-field input,
	.tzhm-search .tzhm-field select {
		font-size: 16px; /* prevents iOS auto-zoom */
		min-height: 48px;
		padding: 12px 14px;
	}
	.tzhm-search .tzhm-btn { min-height: 52px; font-size: 16px; }

	/* Card grid: single column on phones, big touch */
	.tzhm-grid {
		grid-template-columns: 1fr !important;
		gap: 14px;
	}
	.tzhm-card { border-radius: 16px; }
	.tzhm-card__media { aspect-ratio: 16/10; }
	.tzhm-card__title { font-size: 17px; }
	.tzhm-card__price b { font-size: 20px; }
	.tzhm-card__heart {
		width: 44px; height: 44px; font-size: 22px;
	}

	/* Hotel detail — stack everything */
	.tzhm-detail { grid-template-columns: 1fr !important; gap: 14px; }
	.tzhm-bookbox {
		position: static;
		order: -1; /* show price box ABOVE description on mobile */
	}
	.tzhm-gallery {
		grid-template-columns: 1fr 1fr;
		grid-template-rows: 1fr;
		aspect-ratio: 16/9;
	}
	.tzhm-gallery img:first-child { grid-row: span 1; grid-column: span 2; }
	.tzhm-gallery img:nth-child(n+4) { display: none; }

	/* Room cards — vertical stack */
	.tzhm-room {
		grid-template-columns: 1fr !important;
		text-align: left;
	}
	.tzhm-room__img { aspect-ratio: 16/9; max-width: 100%; }
	.tzhm-room .tzhm-btn { width: 100%; min-height: 50px; }

	/* Form fields — bigger */
	.tzhm-form { padding: 18px; margin: 12px; border-radius: 14px; }
	.tzhm-form input, .tzhm-form select, .tzhm-form textarea {
		font-size: 16px !important; min-height: 48px;
	}
	.tzhm-form .tzhm-btn { min-height: 52px; font-size: 16px; }

	/* Owner dashboard — collapsible */
	.tzhm-owner-tabs { -webkit-overflow-scrolling: touch; }
	.tzhm-owner-tabs a { padding: 12px 14px; }

	/* Calendar — smaller cells */
	.tzhm-calendar { gap: 3px; }
	.tzhm-cal-day { min-height: 60px; padding: 4px; font-size: 11px; }
	.tzhm-cal-day .p { font-size: 11px; }

	/* Tables — horizontally scroll instead of breaking */
	.tzhm-table {
		display: block;
		overflow-x: auto;
		white-space: nowrap;
		font-size: 13px;
	}
}

/* -------- Sticky mobile bottom CTA bar (only on hotel detail / list pages) -------- */
.tzhm-mobile-cta {
	display: none;
	position: fixed;
	left: 0; right: 0; bottom: 0;
	background: #fff;
	padding: 10px 12px;
	box-shadow: 0 -4px 16px -2px rgba(10,18,38,.15);
	z-index: 9999;
	gap: 8px;
	border-top: 1px solid var(--tzhm-ink-200);
}
.tzhm-mobile-cta__price {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding-right: 4px;
}
.tzhm-mobile-cta__price small { font-size: 11px; color: var(--tzhm-ink-500); line-height: 1; }
.tzhm-mobile-cta__price b { font-size: 18px; color: var(--tzhm-blue-700); line-height: 1.2; }
.tzhm-mobile-cta__btn {
	flex: 1;
	display: flex; align-items: center; justify-content: center;
	gap: 6px;
	min-height: 48px;
	border-radius: 12px;
	font-weight: 700;
	font-size: 15px;
	text-decoration: none;
	border: none;
	cursor: pointer;
}
.tzhm-mobile-cta__btn--wa { background: #25D366; color: #fff; }
.tzhm-mobile-cta__btn--wa:hover { background: #1ea952; color: #fff; }
.tzhm-mobile-cta__btn--book { background: var(--tzhm-yellow-400); color: var(--tzhm-ink-900); }
.tzhm-mobile-cta__btn--book:hover { background: var(--tzhm-yellow-500); }

@media (max-width: 768px) {
	.tzhm-mobile-cta { display: flex; }
}

/* -------- Fast Book landing page (FB ad target) -------- */
.tzhm-fastbook {
	max-width: 480px;
	margin: 0 auto;
	background: #fff;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}
.tzhm-fastbook__hero {
	position: relative;
	aspect-ratio: 16/10;
	background: var(--tzhm-ink-200);
	overflow: hidden;
}
.tzhm-fastbook__hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tzhm-fastbook__hero::after {
	content: '';
	position: absolute; inset: 0;
	background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.6));
}
.tzhm-fastbook__hero-text {
	position: absolute;
	bottom: 14px; left: 14px; right: 14px;
	color: #fff;
	z-index: 1;
}
.tzhm-fastbook__hero-text h1 {
	margin: 0; font-size: 22px; font-weight: 700;
	font-family: var(--tzhm-font-bn);
	text-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.tzhm-fastbook__hero-text small { color: #fff; opacity: .9; font-size: 13px; }

.tzhm-fastbook__body { padding: 18px; flex: 1; display: flex; flex-direction: column; gap: 14px; }
.tzhm-fastbook__price {
	background: var(--tzhm-blue-50);
	padding: 14px 16px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.tzhm-fastbook__price small { color: var(--tzhm-ink-500); font-size: 12px; display: block; }
.tzhm-fastbook__price b { font-size: 26px; color: var(--tzhm-blue-700); }
.tzhm-fastbook__price .star { color: var(--tzhm-yellow-500); }

.tzhm-fastbook__form { display: grid; gap: 10px; }
.tzhm-fastbook__form label { font-size: 12px; color: var(--tzhm-ink-500); font-weight: 600; text-transform: uppercase; letter-spacing: .3px; }
.tzhm-fastbook__form input,
.tzhm-fastbook__form select {
	width: 100%;
	padding: 12px 14px;
	border: 1.5px solid var(--tzhm-ink-200);
	border-radius: 10px;
	font-size: 16px;
	min-height: 48px;
	font-family: inherit;
}
.tzhm-fastbook__form input:focus,
.tzhm-fastbook__form select:focus {
	outline: none;
	border-color: var(--tzhm-blue-500);
	box-shadow: 0 0 0 3px var(--tzhm-blue-100);
}

.tzhm-fastbook__cta {
	display: grid;
	grid-template-columns: 1fr;
	gap: 10px;
	margin-top: 4px;
}
.tzhm-fastbook__cta button {
	min-height: 56px;
	border-radius: 12px;
	border: none;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-family: var(--tzhm-font-bn);
}
.tzhm-fastbook__cta .wa { background: #25D366; color: #fff; }
.tzhm-fastbook__cta .wa:hover { background: #1ea952; }
.tzhm-fastbook__cta .pay { background: var(--tzhm-blue-700); color: #fff; }
.tzhm-fastbook__cta .pay:hover { background: var(--tzhm-blue-800); }

.tzhm-fastbook__trust {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	justify-content: center;
	font-size: 12px;
	color: var(--tzhm-ink-500);
	padding: 8px 0;
	font-family: var(--tzhm-font-bn);
}
.tzhm-fastbook__trust span { display: flex; align-items: center; gap: 4px; }
.tzhm-fastbook__trust .ok { color: var(--tzhm-mint-500); font-weight: 700; }

/* Loading skeleton for FB ad clicks (perceived performance) */
.tzhm-skeleton {
	background: linear-gradient(90deg, #edf1f8 0%, #f6f8fc 50%, #edf1f8 100%);
	background-size: 200% 100%;
	animation: tzhm-shimmer 1.4s infinite linear;
	border-radius: 8px;
}
@keyframes tzhm-shimmer {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}
