/*
 * HanoPalais — the one search component (templates/parts/search-shell.php).
 * Owner feedback FB-01/02/03 (2026-09). Same geometry on the homepage hero,
 * the property band and /dat-phong/, in every stay mode. Nothing in this file
 * is keyed on a stay mode except label text, which the script swaps.
 */

.hnp-search {
	--hs-ink: var(--hnp-color-ink, #0e1a26);
	--hs-text: var(--hnp-color-text, #1b232c);
	--hs-muted: var(--hnp-color-muted, #4f5b66);
	--hs-line: rgba(14, 26, 38, 0.12);
	--hs-sand: var(--hnp-color-sand, #efe9df);
	--hs-accent: var(--hnp-color-accent-text, #7d5636);
	--hs-gold: var(--hnp-color-accent, #b08968);
	--hs-radius: 16px;
	position: relative;
	width: 100%;
	max-width: 1080px;
	margin-inline: auto;
	font-family: var(--hnp-font-body, 'Open Sans', system-ui, sans-serif);
	color: var(--hs-text);
	text-align: left;
}

.hnp-search *,
.hnp-search__pop * { box-sizing: border-box; }

.hnp-search__form { margin: 0; display: grid; gap: 10px; }

/* --- stay modes: one pill row, identical everywhere ------------------- */
.hnp-search__modes {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	border: 0;
}
.hnp-search__mode { position: relative; margin: 0; cursor: pointer; }
.hnp-search__mode input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.hnp-search__mode span {
	display: inline-flex;
	align-items: center;
	min-height: 36px;
	padding: 0 16px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.92);
	border: 1px solid var(--hs-line);
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--hs-text);
	white-space: nowrap;
	transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.hnp-search__mode input:checked + span { background: var(--hs-ink); border-color: var(--hs-ink); color: #fff; }
.hnp-search__mode input:focus-visible + span { outline: 2px solid var(--hs-gold); outline-offset: 2px; }
.hnp-search__mode:hover input:not(:checked) + span { border-color: var(--hs-ink); }
.hnp-search__hint { font-size: 0.8125rem; color: var(--hs-muted); padding-inline: 6px; }

/* --- the bar ----------------------------------------------------------- */
.hnp-search__bar {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.8fr) auto;
	align-items: stretch;
	background: #fff;
	border: 1px solid var(--hs-line);
	border-radius: var(--hs-radius);
	box-shadow: 0 10px 30px -18px rgba(14, 26, 38, 0.35);
	padding: 6px;
	gap: 0;
	min-height: 72px;
}

.hnp-search__field {
	all: unset;
	box-sizing: border-box;
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
	min-height: 58px;
	padding: 8px 16px;
	border-radius: 12px;
	cursor: pointer;
	transition: background-color .15s ease;
	font-family: inherit;
}
.hnp-search__field + .hnp-search__field::before {
	content: '';
	position: absolute;
	left: 0;
	top: 14px;
	bottom: 14px;
	width: 1px;
	background: var(--hs-line);
}
.hnp-search__field:hover:not(:disabled),
.hnp-search__field.is-active { background: var(--hs-sand); }
.hnp-search__field.is-active::before,
.hnp-search__field.is-active + .hnp-search__field::before,
.hnp-search__field:hover::before,
.hnp-search__field:hover + .hnp-search__field::before { opacity: 0; }
.hnp-search__field:focus-visible { outline: 2px solid var(--hs-gold); outline-offset: -2px; }
.hnp-search__field:disabled { cursor: default; }

.hnp-search__icon {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	fill: none;
	stroke: var(--hs-accent);
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.hnp-search__text { display: grid; gap: 2px; min-width: 0; }
.hnp-search__label {
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--hs-muted);
	white-space: nowrap;
	line-height: 1.2;
}
.hnp-search__value {
	font-size: 0.9375rem;
	font-weight: 700;
	color: var(--hs-ink);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.3;
}
.hnp-search__value.is-empty { color: var(--hs-muted); font-weight: 500; }

.hnp-search__submit {
	all: unset;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 58px;
	margin-left: 6px;
	padding: 0 26px;
	border-radius: 12px;
	background: var(--hs-ink);
	color: #fff;
	font-family: inherit;
	font-size: 0.9375rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color .15s ease, transform .15s ease;
}
.hnp-search__submit .hnp-search__icon { stroke: currentColor; }
.hnp-search__submit:hover { background: #24313d; }
.hnp-search__submit:active { transform: translateY(1px); }
.hnp-search__submit:focus-visible { outline: 2px solid var(--hs-gold); outline-offset: 2px; }
.hnp-search__spinner {
	display: none;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: hnp-search-spin .7s linear infinite;
}
.hnp-search.is-busy .hnp-search__spinner { display: inline-block; }
.hnp-search.is-busy .hnp-search__submit .hnp-search__icon { display: none; }
@keyframes hnp-search-spin { to { transform: rotate(360deg); } }

.hnp-search__error {
	margin: 0;
	padding: 8px 14px;
	border-radius: 10px;
	background: #fff4f1;
	color: var(--hnp-color-danger, #a13a2c);
	font-size: 0.875rem;
	font-weight: 600;
}

/* --- popover ----------------------------------------------------------- */
.hnp-search__backdrop {
	position: fixed;
	inset: 0;
	z-index: 100040;
	background: rgba(14, 26, 38, 0.45);
}
.hnp-search__pop {
	position: absolute;
	z-index: 100050;
	top: 0;
	left: 0;
	width: 380px;
	max-width: calc(100vw - 24px);
	background: #fff;
	color: var(--hnp-color-text, #1b232c);
	border-radius: 16px;
	box-shadow: 0 24px 60px -20px rgba(14, 26, 38, 0.45), 0 0 0 1px rgba(14, 26, 38, 0.06);
	padding: 18px 20px 16px;
	font-family: var(--hnp-font-body, 'Open Sans', system-ui, sans-serif);
	text-align: left;
	outline: none;
}
.hnp-search__pop[data-picker="in"],
.hnp-search__pop[data-picker="out"] { width: 760px; }
.hnp-search__pop[data-picker="who"] { width: 340px; }

.hnp-search__pophead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.hnp-search__poptitle { margin: 0; font-size: 1rem; font-weight: 700; color: var(--hnp-color-ink, #0e1a26); }
.hnp-search__close {
	all: unset;
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	margin: -10px -10px -10px 0;
	border-radius: 50%;
	cursor: pointer;
}
.hnp-search__close svg,
.hnp-search__calnav svg,
.hnp-search__timeshead svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hnp-search__close:hover { background: var(--hnp-color-sand, #efe9df); }
.hnp-search__close:focus-visible { outline: 2px solid var(--hnp-color-accent, #b08968); }

.hnp-search__popfoot {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px solid rgba(14, 26, 38, 0.1);
}
.hnp-search__ghost,
.hnp-search__confirm {
	all: unset;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 22px;
	border-radius: 999px;
	font-family: inherit;
	font-size: 0.9375rem;
	font-weight: 700;
	cursor: pointer;
}
.hnp-search__ghost { border: 1px solid rgba(14, 26, 38, 0.2); color: var(--hnp-color-ink, #0e1a26); }
.hnp-search__ghost:hover { border-color: var(--hnp-color-ink, #0e1a26); }
.hnp-search__confirm { background: var(--hnp-color-ink, #0e1a26); color: #fff; }
.hnp-search__confirm:disabled { background: #d5d8dc; color: #6b737b; cursor: not-allowed; }
.hnp-search__ghost:focus-visible,
.hnp-search__confirm:focus-visible { outline: 2px solid var(--hnp-color-accent, #b08968); outline-offset: 2px; }

/* property list */
.hnp-search__places { list-style: none; margin: 0 -8px; padding: 0; max-height: min(420px, 60vh); overflow: auto; }
.hnp-search__place {
	all: unset;
	box-sizing: border-box;
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 2px 10px;
	width: 100%;
	min-height: 48px;
	padding: 9px 12px;
	border-radius: 10px;
	cursor: pointer;
	font-family: inherit;
}
.hnp-search__place:hover:not(:disabled) { background: var(--hnp-color-sand, #efe9df); }
.hnp-search__place[aria-pressed="true"] { background: var(--hnp-color-ink, #0e1a26); color: #fff; }
.hnp-search__place[aria-pressed="true"] .hnp-search__placesub { color: rgba(255, 255, 255, 0.75); }
.hnp-search__place:focus-visible { outline: 2px solid var(--hnp-color-accent, #b08968); outline-offset: -2px; }
.hnp-search__place:disabled { cursor: not-allowed; opacity: 0.6; }
.hnp-search__placename { font-size: 0.9375rem; font-weight: 600; grid-column: 1; }
.hnp-search__placesub { font-size: 0.8125rem; color: var(--hnp-color-muted, #4f5b66); grid-column: 1; }
.hnp-search__soon {
	grid-column: 2;
	grid-row: 1 / span 2;
	align-self: center;
	font-size: 0.75rem;
	font-weight: 700;
	padding: 3px 8px;
	border-radius: 999px;
	background: var(--hnp-color-sand, #efe9df);
	color: var(--hnp-color-accent-text, #7d5636);
}

/* calendar + time slots */
.hnp-search__when { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; }
.hnp-search__when > .hnp-search__note,
.hnp-search__when > .hnp-search__confirm { grid-column: 1 / -1; justify-self: start; }
.hnp-search__note { margin: 0 0 10px; font-size: 0.875rem; color: var(--hnp-color-muted, #4f5b66); }
.hnp-search__calhead { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.hnp-search__month { margin: 0 auto 0 0; font-weight: 700; font-size: 0.9375rem; }
.hnp-search__calnav {
	all: unset;
	display: inline-grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	cursor: pointer;
	color: var(--hnp-color-ink, #0e1a26);
}
.hnp-search__calnav:hover:not(:disabled) { background: var(--hnp-color-sand, #efe9df); }
.hnp-search__calnav:disabled { opacity: 0.3; cursor: default; }
.hnp-search__calnav:focus-visible { outline: 2px solid var(--hnp-color-accent, #b08968); }
.hnp-search__days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.hnp-search__dow { text-align: center; font-size: 0.75rem; font-weight: 700; color: var(--hnp-color-muted, #4f5b66); padding: 6px 0; }
.hnp-search__day {
	all: unset;
	box-sizing: border-box;
	display: grid;
	place-items: center;
	height: 40px;
	border-radius: 10px;
	font-family: inherit;
	font-size: 0.875rem;
	font-weight: 500;
	cursor: pointer;
	color: var(--hnp-color-ink, #0e1a26);
}
.hnp-search__day:hover:not(:disabled) { background: var(--hnp-color-sand, #efe9df); }
.hnp-search__day.is-today { color: var(--hnp-color-accent-text, #7d5636); font-weight: 800; }
.hnp-search__day.is-start { box-shadow: inset 0 0 0 1px var(--hnp-color-accent, #b08968); }
.hnp-search__day[aria-pressed="true"] { background: var(--hnp-color-ink, #0e1a26); color: #fff; }
.hnp-search__day:disabled { color: #b7bcc1; cursor: not-allowed; }
.hnp-search__day:focus-visible { outline: 2px solid var(--hnp-color-accent, #b08968); outline-offset: 1px; }

.hnp-search__timeshead { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; min-height: 40px; font-weight: 700; font-size: 0.9375rem; }
.hnp-search__timeshead svg { color: var(--hnp-color-accent-text, #7d5636); }
.hnp-search__slots {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 8px;
	max-height: 292px;
	overflow: auto;
	padding: 2px;
	position: relative;
}
.hnp-search__slot {
	all: unset;
	box-sizing: border-box;
	display: grid;
	place-items: center;
	min-height: 40px;
	border: 1px solid rgba(14, 26, 38, 0.14);
	border-radius: 10px;
	font-family: inherit;
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
}
.hnp-search__slot:hover:not(:disabled) { border-color: var(--hnp-color-ink, #0e1a26); }
.hnp-search__slot[aria-pressed="true"] { background: var(--hnp-color-ink, #0e1a26); border-color: var(--hnp-color-ink, #0e1a26); color: #fff; }
.hnp-search__slot:disabled { background: #f4f5f6; color: #b7bcc1; border-color: transparent; cursor: not-allowed; }
.hnp-search__slot:focus-visible { outline: 2px solid var(--hnp-color-accent, #b08968); outline-offset: 1px; }
.hnp-search__slotnote { grid-column: 1 / -1; margin: 0; font-size: 0.8125rem; color: var(--hnp-color-muted, #4f5b66); }
.hnp-search__slots:has(.hnp-search__slotnote) .hnp-search__slot { display: none; }

/* guests */
.hnp-search__stepper { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.hnp-search__steplabel { display: grid; gap: 2px; }
.hnp-search__steplabel span { font-size: 0.8125rem; color: var(--hnp-color-muted, #4f5b66); }
.hnp-search__stepctl { display: inline-flex; align-items: center; gap: 12px; }
.hnp-search__step {
	all: unset;
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid rgba(14, 26, 38, 0.2);
	font-size: 1.25rem;
	cursor: pointer;
}
.hnp-search__step:hover:not(:disabled) { border-color: var(--hnp-color-ink, #0e1a26); }
.hnp-search__step:disabled { opacity: 0.35; cursor: not-allowed; }
.hnp-search__step:focus-visible { outline: 2px solid var(--hnp-color-accent, #b08968); outline-offset: 2px; }
.hnp-search__count { min-width: 28px; text-align: center; font-size: 1.125rem; font-weight: 700; }

/* --- per-surface grounds (colour only; geometry is shared) -------------- */
.hnp-search--property .hnp-search__mode span { background: rgba(255, 255, 255, 0.1); color: #fff; border-color: rgba(255, 255, 255, 0.28); }
.hnp-search--property .hnp-search__mode input:checked + span { background: #fff; color: var(--hs-ink); border-color: #fff; }
.hnp-search--property .hnp-search__hint { color: rgba(255, 255, 255, 0.72); }
.hnp-search--property .hnp-search__field:disabled .hnp-search__value { color: var(--hs-ink); }

/* Pinned (homepage / property): the stay-mode row folds away, the bar stays. */
.hnps-searchbar.is-pinned .hnp-search__modes,
.hnps-roomsearch.is-pinned .hnp-search__modes { display: none; }
.hnps-searchbar.is-pinned .hnp-search__bar,
.hnps-roomsearch.is-pinned .hnp-search__bar { min-height: 56px; padding: 4px; box-shadow: none; }
.hnps-searchbar.is-pinned .hnp-search__field,
.hnps-roomsearch.is-pinned .hnp-search__field,
.hnps-searchbar.is-pinned .hnp-search__submit,
.hnps-roomsearch.is-pinned .hnp-search__submit { min-height: 46px; }

html.hnp-search-lock,
html.hnp-search-lock body { overflow: hidden !important; }

/* --- tablet ------------------------------------------------------------- */
@media (max-width: 1023px) {
	.hnp-search__bar { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.hnp-search__submit { grid-column: 1 / -1; margin: 6px 0 0; }
	.hnp-search__field { padding-inline: 12px; }
	.hnp-search__pop[data-picker="in"],
	.hnp-search__pop[data-picker="out"] { width: 700px; }
	.hnps-searchbar.is-pinned .hnp-search__bar,
	.hnps-roomsearch.is-pinned .hnp-search__bar { grid-template-columns: repeat(4, minmax(0, 1fr)) auto; }
	.hnps-searchbar.is-pinned .hnp-search__submit,
	.hnps-roomsearch.is-pinned .hnp-search__submit { grid-column: auto; margin: 0 0 0 6px; padding: 0 16px; }
	.hnps-searchbar.is-pinned .hnp-search__submit span:not(.hnp-search__spinner),
	.hnps-roomsearch.is-pinned .hnp-search__submit span:not(.hnp-search__spinner) { display: none; }
	.hnps-searchbar.is-pinned .hnp-search__icon:not(.hnp-search__submit .hnp-search__icon),
	.hnps-roomsearch.is-pinned .hnp-search__icon:not(.hnp-search__submit .hnp-search__icon) { display: none; }
}

/* --- phone: 2x2 fields + full-width action; pickers become a bottom sheet */
@media (max-width: 767px) {
	.hnp-search__modes { flex-wrap: nowrap; }
	.hnp-search__mode { flex: 1 1 0; }
	.hnp-search__mode span { width: 100%; justify-content: center; padding: 0 8px; min-height: 40px; }
	.hnp-search__hint { display: none; }
	.hnp-search__bar { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 4px; border-radius: 14px; }
	.hnp-search__field { min-height: 56px; padding: 8px 12px; gap: 8px; }
	.hnp-search__field--where { grid-column: 1 / -1; }
	.hnp-search__field + .hnp-search__field::before { display: none; }
	.hnp-search__field--in,
	.hnp-search__field--out { border-top: 1px solid var(--hs-line); border-radius: 0; }
	.hnp-search__field--out { border-left: 1px solid var(--hs-line); }
	.hnp-search__field--who { grid-column: 1 / -1; border-top: 1px solid var(--hs-line); border-radius: 0 0 10px 10px; }
	.hnp-search__icon { width: 18px; height: 18px; }
	.hnp-search__submit { grid-column: 1 / -1; min-height: 50px; margin: 4px 0 0; }

	.hnp-search__pop,
	.hnp-search__pop[data-picker] {
		position: fixed !important;
		top: auto !important;
		left: 0 !important;
		right: 0;
		bottom: 0;
		width: 100%;
		max-width: none;
		max-height: 88vh;
		max-height: 88dvh;
		overflow: auto;
		border-radius: 18px 18px 0 0;
		padding: 16px 16px calc(14px + env(safe-area-inset-bottom, 0px));
	}
	.hnp-search__popfoot { position: sticky; bottom: calc(-14px - env(safe-area-inset-bottom, 0px)); background: #fff; margin-inline: -16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
	.hnp-search__popfoot > * { flex: 1 1 0; }
	.hnp-search__when { grid-template-columns: 1fr; gap: 16px; }
	.hnp-search__slots { max-height: none; overflow: visible; }
	.hnp-search__places { max-height: none; }

	.hnps-searchbar.is-pinned .hnp-search__bar,
	.hnps-roomsearch.is-pinned .hnp-search__bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
	.hnp-search *, .hnp-search__pop * { transition: none !important; animation: none !important; }
}

/* --- /dat-phong/: the shared search as the results band ------------------ */
.hnp-summary.hnp-summary--shared {
	display: block;
	padding: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
}
.hnp-summary--shared .hnp-search { max-width: none; }
.hnp-summary--shared .hnp-search__modes { padding-top: 4px; }

/* A search that ran is a search you can see (FB-07). */
.hnp-results--refreshing #hnp-grid,
.hnp-results--refreshing .hnp-results__header { opacity: 0.45; transition: opacity .15s ease; }
.hnp-results--refreshed .hnp-results__summary { animation: hnp-search-flash 1.6s ease both; }
@keyframes hnp-search-flash {
	0%, 35% { background: rgba(176, 137, 104, 0.22); }
	100% { background: transparent; }
}
.hnp-results__summary { border-radius: 6px; padding: 2px 6px; margin-inline: -6px; }

/* --- hardening against theme button styles (Astra paints button:hover/focus) */
.hnp-search [hidden],
.hnp-search__pop[hidden],
.hnp-search__pop [hidden],
.hnp-search__backdrop[hidden] { display: none !important; }
.hnp-search button.hnp-search__field:focus,
.hnp-search button.hnp-search__field:hover,
.hnp-search__pop button.hnp-search__calnav:focus,
.hnp-search__pop button.hnp-search__calnav:hover,
.hnp-search__pop button.hnp-search__close:focus,
.hnp-search__pop button.hnp-search__day:focus,
.hnp-search__pop button.hnp-search__slot:focus,
.hnp-search__pop button.hnp-search__place:focus,
.hnp-search__pop button.hnp-search__step:focus,
.hnp-search__pop button.hnp-search__ghost:focus { background-color: transparent; color: inherit; box-shadow: none; }
.hnp-search button.hnp-search__field:hover:not(:disabled),
.hnp-search button.hnp-search__field.is-active,
.hnp-search__pop button.hnp-search__calnav:hover:not(:disabled),
.hnp-search__pop button.hnp-search__close:hover,
.hnp-search__pop button.hnp-search__day:hover:not(:disabled),
.hnp-search__pop button.hnp-search__place:hover:not(:disabled) { background-color: var(--hnp-color-sand, #efe9df); }
.hnp-search__pop button.hnp-search__day[aria-pressed="true"],
.hnp-search__pop button.hnp-search__slot[aria-pressed="true"],
.hnp-search__pop button.hnp-search__place[aria-pressed="true"] { background-color: var(--hnp-color-ink, #0e1a26); color: #fff; }
.hnp-search button.hnp-search__submit:focus,
.hnp-search button.hnp-search__submit:hover,
.hnp-search__pop button.hnp-search__confirm:focus,
.hnp-search__pop button.hnp-search__confirm:hover { background-color: #24313d; color: #fff; }
.hnp-search__pop button.hnp-search__confirm:disabled { background-color: #d5d8dc; color: #6b737b; }
.hnp-search__pop button.hnp-search__slot:disabled { background-color: #f4f5f6; }

/* the stay hint stays legible over a photograph — as helper TEXT, not a pill (FRD F-006: a chip with the pills' shape read as a
   fourth, disabled stay option) */
.hnp-search--home .hnp-search__hint {
	padding: 0 4px;
	border-radius: 0;
	background: none;
	color: rgba(255, 255, 255, 0.92);
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}
.hnp-search--home .hnp-search__hint::before { content: "— "; opacity: 0.7; }

/* /dat-phong/: the band sits in the page container, not edge to edge */
.hnp-summary.hnp-summary--shared .hnp-summary__shared {
	max-width: var(--hnp-container, 1240px);
	margin-inline: auto;
	padding: 12px var(--hnp-gutter, 20px) 8px;
}

/* After a search, the line under the count states what was searched, at every width. */
.hnp-results.hnp-results--refreshed .hnp-results__header { height: auto; min-height: 46px; }
.hnp-results.hnp-results--refreshed .hnp-results__header .hnp-results__summary { display: block; }
.hnp-results--refreshed .hnp-results__count { animation: hnp-search-flash 1.6s ease both; border-radius: 6px; }

/* T-0726 (EXC-P7 A4, C04 → C08) — /dat-phong/ with a complete window in the URL: room-results.php renders the count bar VISIBLE with
   its server-built summary and adds .hnp-results--reserve. Hold the post-answer layout (the .hnp-results--refreshed rules above) from
   first paint, and keep the phone toolbar's row while the script has not run yet, so the cards never move.
   hnp-booking.js removes the class in the same frame wherever it hides the bar (error, long stay, no window). */
.hnp-results.hnp-results--reserve .hnp-results__header { height: auto; min-height: 46px; }
.hnp-results.hnp-results--reserve .hnp-results__header .hnp-results__summary { display: block; }
/* the availability line's row (filled by hanopalais-availability.js; measured 26 px at 390 and 1440) */
.hnp-results.hnp-results--reserve .hnp-results__availsum:empty { min-height: 1.6em; min-height: 1lh; }
/* while the availability script re-asks it removes its line (showSummary) and adds it back with the answer: keep its row
   (measured 52 px at 390 and at 1440 on the T-0726 clone probe) as space above the search line, so nothing moves either way */
.hnp-results.hnp-results--reserve .hnp-results__count + .hnp-results__summary { margin-top: 52px; }
@media (max-width: 767px) {
	body.hnps-chrome .hnp-results.hnp-results--reserve .hnp-toolbar[hidden] { display: flex !important; visibility: hidden; } /* beats .hnp-results [hidden] { display: none !important } */
}

/* /dat-phong/ band: docks under the header (measured into --hnp-search-dock by
   hanopalais-search.js), never under it; on a phone a 4-field band is too tall
   to follow the reader, so it stays in the flow. */
.hnp--collapsed .hnp-summary.hnp-summary--shared,
.hnp-summary.hnp-summary--shared {
	position: sticky;
	top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--hnp-search-dock, 77px));
	z-index: 30;
	background: var(--hnp-color-bg, #fbfaf7);
	box-shadow: 0 10px 24px -22px rgba(14, 26, 38, 0.5);
}
@media (max-width: 767px) {
	.hnp--collapsed .hnp-summary.hnp-summary--shared,
	.hnp-summary.hnp-summary--shared { position: relative; top: auto; box-shadow: none; }
}
/* (a phone band is in the flow: no dock offset — it shifted the band 61px onto the results, CFB-001) */

/* CFB-001 — the booking page title: above the sticky band, on the search column's left edge. */
.hnp-results__titlebar {
	max-width: var(--hnp-container, 1240px);
	margin-inline: auto;
	padding: 28px var(--hnp-gutter, 20px) 0;
}
.hnp-results__titlebar h1.hnp-results__title {
	margin: 0;
	font-family: var(--hnp-font-display, var(--hnp-font-body, 'Open Sans', system-ui, sans-serif));
	font-size: clamp(1.5rem, 1.2rem + 1vw, 2.125rem);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.01em;
	color: var(--hnp-color-ink, #0e1a26);
}
@media (max-width: 767px) {
	.hnp-results__titlebar { padding-top: 18px; }
}

/* T-0792 (FBW2310 B-4, hnp-c08-web) — /dat-phong/ base cards at 700–1023 px (one column, no filter rail): 752–837 px tall, because the
   card stacked a 2:1 photo band (359 px at 768), the facts, then a centred wrapping price row. Now the card reads like the Base-page
   room card (T-0761): photo | facts side by side, then ONE decision row — status on top, the eyebrow + price on the left, the action on
   the right beside the price; every other line (stay notice, tax, price-table link, request / slot notes) takes a full row under it.
   Scoped to #hnp-grid so it is the last word over the class rules of hanopalais-rooms.css / hanopalais-v4.css / hnp-booking.css for this
   range only; < 700 and ≥ 1024 are untouched. Nothing is hidden: the same lines, the same words, the same prices. */
@media (min-width: 700px) and (max-width: 1023px) {
	#hnp-grid .hnps-room.hnps-result .hnps-room__body {
		display: grid;
		grid-template-columns: 240px minmax(0, 1fr);
		grid-template-areas: "media info" "side side";
		column-gap: 20px;
		row-gap: 14px;
		align-items: start;
		min-height: 0;
		padding: 16px;
	}
	#hnp-grid .hnps-room.hnps-result .hnps-room__media { grid-area: media; width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: var(--hnp-radius-medium, 12px); overflow: hidden; }
	#hnp-grid .hnps-room.hnps-result .hnps-room__info { grid-area: info; min-width: 0; padding: 0; }
	#hnp-grid .hnps-room.hnps-result .hnps-room__side {
		grid-area: side;
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		column-gap: 20px;
		row-gap: 4px;
		align-items: center;
		justify-content: stretch;
		margin: 0;
		padding: 12px 0 0;
		border-top: 1px solid var(--hnps-line, rgba(14, 26, 38, 0.12));
		border-left: 0;
		text-align: left;
	}
	#hnp-grid .hnps-room.hnps-result .hnps-room__side > * { grid-column: 1 / -1; order: 0; margin: 0; justify-self: start; text-align: left; align-items: flex-start; }
	#hnp-grid .hnps-room.hnps-result .hnps-room__side > .hnps-result__avail { grid-row: 1; }
	#hnp-grid .hnps-room.hnps-result .hnps-room__side > .hnps-result__from { grid-column: 1; grid-row: 2; }
	#hnp-grid .hnps-room.hnps-result .hnps-room__side > .hnps-room__price { grid-column: 1; grid-row: 3; justify-content: flex-start; }
	#hnp-grid .hnps-room.hnps-result .hnps-room__side > .hnps-room__cta { grid-column: 2; grid-row: 2 / span 2; justify-self: end; align-self: center; width: auto; min-width: 160px; max-width: 15rem; white-space: normal; height: auto; text-align: center; }
}

/* FBW0311 T3 — "Phòng bạn đã chọn": the room chosen on the Base page stays visible while the dates are picked (dark band). */
.hnp-search__pick { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 12px; padding: 10px 14px; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 10px; background: rgba(255, 255, 255, 0.08); color: #fff; font-size: 0.9375rem; line-height: 1.4; }
.hnp-search__pick[hidden] { display: none; }
.hnp-search__pick-label { color: rgba(255, 255, 255, 0.78); }
.hnp-search__pick strong { font-weight: 600; }
.hnp-search__pick-clear { margin-left: auto; min-height: 32px; padding: 4px 10px; border: 1px solid rgba(255, 255, 255, 0.45); border-radius: 999px; background: transparent; color: #fff; font: inherit; font-size: 0.8125rem; cursor: pointer; }
.hnp-search__pick-clear:hover { background: rgba(255, 255, 255, 0.14); }
.hnp-search__pick-clear:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.hnp-search__popsub { margin: -6px 0 10px; padding: 0; font-size: 0.875rem; font-weight: 600; color: var(--hs-ink, #0e1a26); }
.hnp-search__popsub[hidden] { display: none; }
.hnps-room.is-picked { box-shadow: 0 0 0 2px var(--hnp-color-accent, #b08968); border-radius: 12px; }

/* T-0911 C08: pinned (sticky white) bar — the chosen-room line was white-on-white (invisible, 88px of dead height). Compact, dark-on-light. */
.hnps-roomsearch.is-pinned .hnp-search__pick { margin: 0 0 6px; padding: 5px 12px; border-color: rgba(14, 26, 38, 0.18); background: rgba(14, 26, 38, 0.04); color: var(--hs-ink, #0e1a26); font-size: 0.875rem; }
.hnps-roomsearch.is-pinned .hnp-search__pick-label { color: rgba(14, 26, 38, 0.66); }
.hnps-roomsearch.is-pinned .hnp-search__pick-clear { min-height: 28px; border-color: rgba(14, 26, 38, 0.35); color: var(--hs-ink, #0e1a26); }
.hnps-roomsearch.is-pinned .hnp-search__pick-clear:hover { background: rgba(14, 26, 38, 0.08); }
.hnps-roomsearch.is-pinned .hnp-search__pick-clear:focus-visible { outline-color: var(--hs-ink, #0e1a26); }
