/**
 * HanoPalais booking search — mobile-first.
 *
 * Colours are declared as custom properties on .hnp so a theme (or a later
 * Elementor global) can override the palette without touching this file. The
 * defaults follow the navy / champagne-gold palette the site already uses.
 */

.hnp,
.hnp-results {
	/* Mapped onto the shared design system when the site plugin is present;
	   the fallbacks keep the form usable on its own. */
	--hnp-navy: var(--hnp-color-ink, #0e1a26);
	--hnp-navy-soft: var(--hnp-color-ink-2, #24313d);
	--hnp-gold: var(--hnp-color-accent-text, #7d5636);
	--hnp-gold-soft: var(--hnp-color-accent-soft, rgba(176, 137, 104, 0.14));
	--hnp-ivory: var(--hnp-color-bg, #fbfaf7);
	--hnp-surface: var(--hnp-color-surface, #ffffff);
	--hnp-text: var(--hnp-color-text, #1b232c);
	--hnp-muted: var(--hnp-color-muted, #5b6773);
	--hnp-line: var(--hnp-color-border, rgba(14, 26, 38, 0.12));
	--hnp-danger: var(--hnp-color-danger, #a13a2c);
	--hnp-success: var(--hnp-color-success, #1f6b4a);
	--hnp-radius: var(--hnp-radius-md, 6px);
	--hnp-radius-sm: var(--hnp-radius-sm, 2px);
	--hnp-gap: 16px;
	--hnp-shadow: none;

	box-sizing: border-box;
	color: var(--hnp-text);
	font-family: inherit;
}

/* Several rules below set display on elements the script toggles with the
   hidden attribute, which would otherwise lose to them. */
.hnp [hidden],
.hnp-results [hidden] {
	display: none !important;
}

.hnp *,
.hnp *::before,
.hnp *::after,
.hnp-results *,
.hnp-results *::before,
.hnp-results *::after {
	box-sizing: inherit;
}

.hnp__head {
	margin: 0 0 20px;
	max-width: 640px;
}

.hnp .hnp__title {
	margin: 0 0 8px;
	font-family: var(--hnp-font-display, inherit);
	font-size: clamp(1.75rem, 3.2vw, 2.5rem);
	line-height: 1.15;
	letter-spacing: -0.01em;
	color: var(--hnp-navy);
}

.hnp__lead {
	margin: 0;
	font-size: 1rem;
	line-height: 1.6;
	color: var(--hnp-muted);
}

/* ------------------------------------------------------------------ banners */

.hnp-banner {
	margin: 0 0 var(--hnp-gap);
	padding: 12px 16px;
	border-radius: var(--hnp-radius-sm);
	font-size: 0.875rem;
	line-height: 1.5;
}

/* Demo-data notice: a quiet caption, not a warning box. */
.hnp-banner--dev {
	padding: 0;
	background: transparent;
	color: var(--hnp-muted);
	font-size: 0.8125rem;
}

.hnp-banner--dev strong {
	display: inline-block;
	margin-right: 8px;
	padding: 3px 8px;
	border-radius: var(--hnp-radius-sm);
	background: var(--hnp-gold-soft);
	color: var(--hnp-gold);
	letter-spacing: 0.08em;
	font-size: 0.6875rem;
}

.hnp-banner--info {
	background: var(--hnp-gold-soft);
	border: 1px solid var(--hnp-gold);
	color: var(--hnp-navy);
	margin-top: var(--hnp-gap);
}

/* --------------------------------------------------------------------- form */

.hnp-form {
	background: var(--hnp-surface);
	border: 1px solid var(--hnp-line);
	border-radius: var(--hnp-radius);
	box-shadow: var(--hnp-shadow);
	padding: 20px;
}

.hnp-form__rental {
	margin: 0 0 20px;
	padding: 0;
	border: 0;
}

.hnp-form__legend {
	padding: 0;
	margin-bottom: 10px;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--hnp-muted);
}

/* One bordered track, three segments, the selected one filled — a control,
   not three buttons. */
.hnp-segmented {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 4px;
	padding: 4px;
	border: 1px solid var(--hnp-line);
	border-radius: var(--hnp-radius);
	background: var(--hnp-ivory);
}

.hnp-segmented__input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.hnp-segmented__label {
	display: flex;
	flex-direction: column;
	gap: 2px;
	justify-content: center;
	min-height: 56px;
	padding: 8px 8px;
	text-align: center;
	border: 1px solid transparent;
	border-radius: calc(var(--hnp-radius) - 2px);
	background: transparent;
	cursor: pointer;
	transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.hnp-segmented__label:hover {
	background: rgba(14, 26, 38, 0.04);
}

.hnp-segmented__name {
	font-weight: 700;
	font-size: 0.9375rem;
	color: var(--hnp-navy);
}

.hnp-segmented__hint {
	font-size: 0.6875rem;
	color: var(--hnp-muted);
	line-height: 1.3;
}

.hnp-segmented__input:checked + .hnp-segmented__label {
	background: var(--hnp-navy);
	box-shadow: 0 1px 0 rgba(14, 26, 38, 0.2);
}

.hnp-segmented__input:checked + .hnp-segmented__label .hnp-segmented__name {
	color: #ffffff;
}

.hnp-segmented__input:checked + .hnp-segmented__label .hnp-segmented__hint {
	color: rgba(255, 255, 255, 0.7);
}

/* ------------------------------------------------------------------ groups */

.hnp-group {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.hnp-group__title {
	margin: 0;
	font-family: var(--hnp-font-display, inherit);
	font-size: 1rem;
	font-weight: 700;
	color: var(--hnp-navy);
}

.hnp-group__fields {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
}

.hnp-group--when .hnp-group__fields {
	grid-template-columns: 1fr 1fr;
}

.hnp-field--times-toggle {
	grid-column: 1 / -1;
	display: none;
}

.hnp .hnp-textbtn,
.hnp .hnp-textbtn:hover,
.hnp .hnp-textbtn:focus {
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	border-radius: 0;
	color: var(--hnp-muted);
	background: transparent;
}

.hnp-textbtn {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 12px;
	padding: 0;
	background: transparent;
	border: 0;
	font: inherit;
	font-size: 0.875rem;
	color: var(--hnp-muted);
	cursor: pointer;
	text-align: left;
}

.hnp-textbtn__action {
	font-weight: 700;
	color: var(--hnp-gold);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Mode-aware fields. Hourly: same-day, so no check-out date. Overnight: times
   tucked behind the summary until "Chỉnh giờ". Daily: everything. */
.hnp-form[data-rental="hourly"] .hnp-field--checkout-date { display: none; }
.hnp-form[data-rental="hourly"] .hnp-field--checkin-date { grid-column: 1 / -1; }
.hnp-form[data-rental="overnight"]:not(.hnp-form--times-open) .hnp-field--checkin-time,
.hnp-form[data-rental="overnight"]:not(.hnp-form--times-open) .hnp-field--checkout-time { display: none; }
.hnp-form[data-rental="overnight"] .hnp-field--times-toggle { display: block; }
.hnp-form[data-rental="overnight"].hnp-form--times-open .hnp-textbtn__action::after { content: " ↑"; }

[data-hnp-label="hourly"] { display: none; }
.hnp-form[data-rental="hourly"] [data-hnp-label="hourly"] { display: inline; }
.hnp-form[data-rental="hourly"] [data-hnp-label="stay"] { display: none; }

.hnp-segmented__input:focus-visible + .hnp-segmented__label {
	outline: 2px solid var(--hnp-navy);
	outline-offset: 2px;
}

.hnp-form__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--hnp-gap);
}

.hnp-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0;
}

.hnp-field__label {
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--hnp-muted);
}

.hnp-field__control {
	width: 100%;
	min-height: 48px;
	padding: 10px 12px;
	font-size: 1rem;
	font-family: inherit;
	color: var(--hnp-text);
	background: var(--hnp-ivory);
	border: 1px solid var(--hnp-line);
	border-radius: var(--hnp-radius-sm);
}

.hnp-field__control:focus-visible,
.hnp-stepper__input:focus-visible {
	outline: 2px solid var(--hnp-gold);
	outline-offset: 1px;
}

.hnp-field__control[readonly] {
	color: var(--hnp-muted);
	background: rgba(10, 21, 37, 0.04);
}


.hnp-stepper {
	display: grid;
	grid-template-columns: 48px 1fr 48px;
	align-items: stretch;
	border: 1px solid var(--hnp-line);
	border-radius: var(--hnp-radius-sm);
	background: var(--hnp-ivory);
	overflow: hidden;
}

.hnp-stepper__btn {
	min-height: 48px;
	font-size: 1.25rem;
	line-height: 1;
	color: var(--hnp-navy);
	background: transparent;
	border: 0;
	cursor: pointer;
}

.hnp-stepper__btn:hover {
	background: var(--hnp-gold-soft);
}

.hnp-stepper__input {
	min-height: 48px;
	text-align: center;
	font-size: 1rem;
	font-family: inherit;
	color: var(--hnp-text);
	background: transparent;
	border: 0;
	border-left: 1px solid var(--hnp-line);
	border-right: 1px solid var(--hnp-line);
	-moz-appearance: textfield;
}

.hnp-stepper__input::-webkit-outer-spin-button,
.hnp-stepper__input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.hnp-form__actions {
	margin: 20px 0 0;
}

.hnp-form__error {
	margin: 12px 0 0;
	padding: 10px 12px;
	border-radius: var(--hnp-radius-sm);
	background: rgba(180, 35, 24, 0.08);
	color: var(--hnp-danger);
	font-size: 0.875rem;
}

/* ------------------------------------------------------------------ buttons */

.hnp .hnp-btn,
.hnp-results .hnp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 48px;
	width: 100%;
	padding: 12px 26px;
	font-family: inherit;
	font-size: 0.875rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	line-height: 1;
	color: #ffffff;
	background: var(--hnp-navy);
	border: 1px solid var(--hnp-navy);
	border-radius: var(--hnp-radius-sm);
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* Doubled class specificity so the theme's own button hover does not win. */
.hnp .hnp-btn.hnp-btn:hover:not(:disabled),
.hnp .hnp-btn.hnp-btn:focus:not(:disabled),
.hnp-results .hnp-btn.hnp-btn:hover:not(:disabled),
.hnp-results .hnp-btn.hnp-btn:focus:not(:disabled) {
	background: var(--hnp-gold);
	border-color: var(--hnp-gold);
	color: var(--hnp-navy);
}

.hnp-btn:focus-visible {
	outline: 2px solid var(--hnp-navy);
	outline-offset: 2px;
}

.hnp-btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.hnp-btn--select {
	min-height: 46px;
	font-size: 0.875rem;
}

.hnp-spinner {
	display: none;
	width: 16px;
	height: 16px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: hnp-spin 0.7s linear infinite;
}

.hnp-form[data-loading="true"] .hnp-spinner {
	display: inline-block;
}

@keyframes hnp-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ------------------------------------------------------------------ results */

.hnp-results {
	margin-top: 28px;
}

.hnp-results__header {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: var(--hnp-gap);
}

.hnp-results__count {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--hnp-navy);
}

.hnp-results__summary {
	margin: 4px 0 0;
	font-size: 0.875rem;
	color: var(--hnp-muted);
}

.hnp-grid,
.hnp-skeletons {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
}

.hnp-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var(--hnp-surface);
	border: 1px solid var(--hnp-line);
	border-radius: var(--hnp-radius);
	box-shadow: var(--hnp-shadow);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hnp-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 26px 50px -26px rgba(10, 21, 37, 0.5);
}

.hnp-card[data-sold-out="true"] {
	opacity: 0.72;
}

.hnp-card__media {
	position: relative;
	aspect-ratio: 4 / 3;
	background: linear-gradient(140deg, var(--hnp-navy) 0%, var(--hnp-navy-soft) 100%);
}

.hnp-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.hnp-card__placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 3rem;
	font-weight: 700;
	color: var(--hnp-gold);
	opacity: 0.65;
}

.hnp-card__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	padding: 6px 12px;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 700;
	background: var(--hnp-surface);
	color: var(--hnp-navy);
	box-shadow: 0 4px 12px rgba(10, 21, 37, 0.2);
}

.hnp-card__badge[data-tone="last"] {
	background: #fff1e6;
	color: #a04100;
}

.hnp-card__badge[data-tone="sold-out"] {
	background: rgba(10, 21, 37, 0.82);
	color: #ffffff;
}

.hnp-card__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 18px 18px 8px;
	flex: 1 1 auto;
}

.hnp-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	font-size: 0.75rem;
	color: var(--hnp-muted);
}

.hnp-card__meta span {
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--hnp-gold-soft);
	color: var(--hnp-navy);
}

.hnp-card__name {
	margin: 0;
	font-size: 1.125rem;
	line-height: 1.3;
	color: var(--hnp-navy);
}

.hnp-card__desc {
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.55;
	color: var(--hnp-muted);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.hnp-card__foot {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 8px 18px 18px;
}

.hnp-card__price {
	display: flex;
	align-items: baseline;
	gap: 6px;
	margin: 0;
}

.hnp-card__amount {
	font-size: 1.375rem;
	font-weight: 700;
	color: var(--hnp-navy);
	white-space: nowrap;
}

.hnp-card__unit {
	font-size: 0.8125rem;
	color: var(--hnp-muted);
}

/* -------------------------------------------------------------------- states */

.hnp-state {
	padding: 32px 20px;
	text-align: center;
	border: 1px dashed var(--hnp-line);
	border-radius: var(--hnp-radius);
	background: var(--hnp-ivory);
}

.hnp-state__title {
	margin: 0 0 6px;
	font-weight: 700;
	color: var(--hnp-navy);
}

.hnp-state__hint {
	margin: 0;
	font-size: 0.875rem;
	color: var(--hnp-muted);
}

.hnp-state--error .hnp-state__title {
	color: var(--hnp-danger);
}

.hnp-skeleton-block,
.hnp-skeleton-line {
	display: block;
	background: linear-gradient(90deg, rgba(10, 21, 37, 0.06) 25%, rgba(10, 21, 37, 0.12) 37%, rgba(10, 21, 37, 0.06) 63%);
	background-size: 400% 100%;
	animation: hnp-shimmer 1.4s ease infinite;
	border-radius: var(--hnp-radius-sm);
}

.hnp-card--skeleton {
	box-shadow: none;
}

.hnp-card--skeleton .hnp-card__media {
	background: none;
}

.hnp-skeleton-block {
	width: 100%;
	height: 100%;
	border-radius: 0;
}

.hnp-skeleton-line {
	height: 14px;
	margin-bottom: 10px;
}

.hnp-skeleton-line--lg {
	height: 20px;
	width: 70%;
}

.hnp-skeleton-line--sm {
	width: 40%;
}

@keyframes hnp-shimmer {
	0% {
		background-position: 100% 50%;
	}
	100% {
		background-position: 0 50%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hnp-card,
	.hnp-btn,
	.hnp-segmented__label {
		transition: none;
	}

	.hnp-skeleton-block,
	.hnp-skeleton-line,
	.hnp-spinner {
		animation: none;
	}
}

/* --------------------------------------------------------------- responsive */

@media (min-width: 600px) {
	.hnp-form {
		padding: 28px;
	}

	.hnp-form__grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 24px;
	}

	.hnp-filters,
	.hnp-group--when,
	.hnp-form__actions {
		grid-column: 1 / -1;
	}

	.hnp-group--when .hnp-group__fields {
		grid-template-columns: repeat(4, 1fr);
	}

	.hnp-form[data-rental="hourly"] .hnp-field--checkin-date { grid-column: span 2; }

	.hnp-form__actions {
		display: flex;
		justify-content: flex-end;
		margin: 0;
	}

	/* Not the site header's "Đặt phòng" (KVA-076): widened to 220px on this page
	   only, it pushed the desktop menu onto two lines at 1024–1365. */
	.hnp-btn--primary:not(.hnp-header__cta) {
		width: auto;
		min-width: 220px;
	}

	.hnp-grid,
	.hnp-skeletons {
		grid-template-columns: repeat(2, 1fr);
	}

	/* The toolbar's row, alignment and sort width are set once in PHASE 3.1
	   against the reference's measured 46px bar. `align-items: flex-end`
	   here let the sort block collapse to its content height of 20 inside a
	   46px bar, and the 220px floor overrode the measured 183. */

	.hnp-card__foot {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}

	.hnp-btn--select {
		width: auto;
		min-width: 150px;
	}
}

@media (min-width: 1024px) {
	/* Row 1: where (full width). Row 2: when · who · search. */
	.hnp-form__grid {
		grid-template-columns: 3fr 1fr auto;
		align-items: end;
	}

	.hnp-group--where,
	.hnp-filters {
		grid-column: 1 / -1;
	}

	.hnp-group--where .hnp-group__fields {
		grid-template-columns: 1fr 2fr;
	}

	.hnp-group--when,
	.hnp-form__actions {
		grid-column: auto;
	}

	.hnp-form__actions .hnp-btn--primary {
		min-width: 180px;
	}

	.hnp-grid,
	.hnp-skeletons {
		grid-template-columns: repeat(3, 1fr);
	}

	/* Three across leaves the footer too narrow for price and button side by
	   side, so the CTA goes full width under the price instead. */
	.hnp-card__foot {
		flex-direction: column;
		align-items: stretch;
	}

	.hnp-btn--select {
		width: 100%;
	}
}


/* ------------------------------------------------- listing rows (v0.3) */

/* Search summary: what was asked, and one control to change it. */
.hnp-summary {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0 0 var(--hnp-gap);
	padding: 14px 16px;
	background: var(--hnp-surface);
	border: 1px solid var(--hnp-line);
	border-radius: var(--hnp-radius);
}
.hnp-results .hnp-btn--ghost,
.hnp-results .hnp-btn--ghost:hover:not(:disabled),
.hnp-results .hnp-btn--ghost:focus:not(:disabled) {
	background: transparent;
	color: var(--hnp-navy);
	border: 1px solid var(--hnp-line);
	min-width: 0;
	width: 100%;
}
.hnp-results .hnp-btn--ghost:hover:not(:disabled) { border-color: var(--hnp-navy); }

/* One column of rows, never a card grid. */
.hnp-grid,
.hnp-skeletons { grid-template-columns: 1fr; gap: 16px; }

.hnp-listing {
	display: grid;
	grid-template-columns: 1fr;
	grid-template-areas: "media" "info" "side";
}

.hnp-listing__media {
	grid-area: media;
	position: relative;
	aspect-ratio: 4 / 3;
	background: linear-gradient(140deg, var(--hnp-navy) 0%, var(--hnp-navy-soft) 100%);
	overflow: hidden;
}

.hnp-listing__media .hnp-card__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.hnp-listing__gallery {
	position: absolute;
	right: 10px;
	bottom: 10px;
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 4px;
	border-radius: 999px;
	background: rgba(14, 26, 38, 0.72);
	color: #ffffff;
	font-size: 0.75rem;
}
.hnp-listing__nav {
	width: 28px;
	height: 28px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
	color: #ffffff;
	font-size: 1.125rem;
	line-height: 1;
	cursor: pointer;
}
.hnp-listing__nav:hover { background: rgba(255, 255, 255, 0.3); }
.hnp-listing__count { min-width: 3.2em; text-align: center; }

.hnp-listing__info {
	grid-area: info;
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 16px 18px 4px;
	min-width: 0;
}

.hnp-listing__info .hnp-card__meta { gap: 6px; }
.hnp-listing__info .hnp-card__meta span { padding: 4px 10px; }
.hnp-card__brand { background: var(--hnp-navy) !important; color: #ffffff !important; }
.hnp-listing__info .hnp-card__name { font-family: var(--hnp-font-display, inherit); font-size: 1.25rem; }
.hnp-card__window { margin: 0; font-size: 0.8125rem; color: var(--hnp-muted); }
.hnp-listing__amenities { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.hnp-listing__amenities li { padding: 4px 10px; border: 1px solid var(--hnp-line); border-radius: 999px; font-size: 0.75rem; color: var(--hnp-text); }
.hnp-listing__info .hnp-card__desc { -webkit-line-clamp: 3; }

/* B4: "Phù hợp với" chips — reference measured 12px/500 label, small
   chips with a "+N" overflow badge, sitting between address and amenities. */
.hnp-listing__suitable { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 0; }
.hnp-card__suitable-label { font-size: 0.75rem; font-weight: 500; letter-spacing: 0.02em; color: var(--hnp-muted); white-space: nowrap; }
.hnp-listing__suitable-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.hnp-listing__suitable-list li { padding: 4px 10px; border: 1px solid var(--hnp-line); border-radius: 999px; font-size: 0.75rem; color: var(--hnp-text); }
.hnps-room__suitable-more { background: var(--hnp-sand, #efe9df); border-color: transparent !important; font-weight: 600; }

.hnp-listing__side {
	grid-area: side;
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 12px 18px 18px;
	border-top: 1px solid var(--hnp-line);
}

.hnp-card__avail { margin: 0; font-size: 0.8125rem; font-weight: 600; color: var(--hnp-muted); }
.hnp-card__avail[data-tone="available"] { color: var(--hnp-success); }
.hnp-card__avail[data-tone="last"] { color: #a04100; }
.hnp-card__avail[data-tone="sold-out"] { color: var(--hnp-danger); }
.hnp-card__avail[data-tone="unknown"] { font-weight: 400; }

.hnp-listing__side .hnp-card__price { flex-wrap: wrap; }
.hnp-card__amount--text { font-size: 1rem; font-weight: 600; white-space: normal; line-height: 1.35; }
.hnp-card__pricenote { margin: 0; font-size: 0.75rem; line-height: 1.45; color: var(--hnp-muted); }
.hnp-listing__side .hnp-btn--select { width: 100%; margin-top: 4px; }

.hnp-card--skeleton .hnp-listing__media { background: none; }
.hnp-card--skeleton .hnp-listing__side { border-top: 0; }

/* The results header sits between the summary and the rows. */
.hnp-results__header { margin-top: 4px; }

@media (min-width: 600px) {
	.hnp-summary { flex-direction: row; align-items: center; justify-content: space-between; }
	.hnp-results .hnp-btn--ghost { width: auto; min-width: 120px; }

	.hnp-listing {
		grid-template-columns: minmax(0, 40%) minmax(0, 1fr);
		grid-template-areas: "media info" "media side";
	}
	.hnp-listing__media { aspect-ratio: auto; min-height: 220px; }
	.hnp-listing__side { border-top: 1px solid var(--hnp-line); }
	.hnp-listing__side .hnp-btn--select { width: auto; min-width: 150px; }
	.hnp-grid, .hnp-skeletons { grid-template-columns: 1fr; }
}

@media (min-width: 1024px) {
	.hnp-summary { position: sticky; top: calc(var(--hnp-header-h, 72px) + 8px); z-index: 3; box-shadow: 0 12px 30px -20px rgba(14, 26, 38, 0.35); }

	.hnp-listing {
		grid-template-columns: minmax(0, 36%) minmax(0, 1fr) 220px;
		grid-template-areas: "media info side";
	}
	.hnp-listing__media { min-height: 240px; }
	.hnp-listing__info { padding: 22px 24px; gap: 10px; }
	.hnp-listing__side { border-top: 0; border-left: 1px solid var(--hnp-line); padding: 22px 22px 22px 22px; justify-content: center; align-items: flex-start; }
	.hnp-listing__side .hnp-card__price { flex-direction: column; align-items: flex-start; gap: 0; }
	.hnp-listing__side .hnp-btn--select { width: 100%; min-width: 0; margin-top: 8px; }
	.hnp-grid, .hnp-skeletons { grid-template-columns: 1fr; }
	.hnp-card__foot { flex-direction: row; }
}

/* Folded search: the intro shrinks so the summary is what the guest sees first. */
.hnp--collapsed .hnp__head { margin-bottom: 8px; }
.hnp--collapsed .hnp__lead { display: none; }


/* ------------------------------------------- property identity in a row */

/* The base number identifies the place for returning guests; it sits on the
   photograph so it reads before the room-class name. */
.hnp-card__base {
	position: absolute;
	left: 12px;
	top: 12px;
	z-index: 1;
	padding: 6px 11px;
	border-radius: var(--hnp-radius-sm);
	background: var(--hnp-navy);
	color: #ffffff;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	line-height: 1;
}

.hnp-card__badge { left: auto; right: 12px; }

.hnp-card__address {
	display: flex;
	align-items: flex-start;
	gap: 7px;
	margin: 0;
	font-size: 0.8125rem;
	line-height: 1.5;
	color: var(--hnp-text);
}

.hnp-card__address .hnp-icon {
	flex: 0 0 auto;
	width: 15px;
	height: 15px;
	margin-top: 2px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.6;
	color: var(--hnp-gold);
}


/* ============================================== search polish + suggestions (v0.7) */

.hnp,
.hnp-results {
	--hnp-radius: var(--hnp-radius-card, 12px);
	--hnp-radius-sm: var(--hnp-radius-control, 8px);
}

.hnp-group__hint {
	margin: -4px 0 12px;
	font-size: 0.8125rem;
	line-height: 1.5;
	color: var(--hnp-muted);
	max-width: 44ch;
}

.hnp-form { border-radius: var(--hnp-radius-panel, 16px); }
.hnp-btn--select { border-radius: var(--hnp-radius-control, 8px); }

/* "Gợi ý cơ sở": real bases, shown until a search runs. */
.hnp-suggest { margin-top: 32px; }
.hnp-suggest__head { margin: 0 0 20px; max-width: 640px; }
.hnp-suggest__eyebrow {
	margin: 0 0 8px;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--hnp-gold);
}
.hnp-results .hnp-suggest__title {
	margin: 0 0 8px;
	font-family: var(--hnp-font-display, inherit);
	font-size: clamp(1.5rem, 2.6vw, 2rem);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.015em;
	color: var(--hnp-navy);
}
.hnp-suggest__lead { margin: 0; font-size: 0.9375rem; line-height: 1.6; color: var(--hnp-muted); }

.hnp-suggest__list {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hnp-suggest__card {
	display: flex;
	flex-direction: column;
	height: 100%;
	border: 1px solid var(--hnp-line);
	border-radius: var(--hnp-radius-card, 12px);
	background: var(--hnp-surface);
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: border-color 200ms ease, transform 200ms ease;
}
.hnp-suggest__card:hover { border-color: var(--hnp-gold); transform: translateY(-3px); }

.hnp-suggest__media { position: relative; aspect-ratio: 4 / 3; background: var(--hnp-gold-soft); }
.hnp-suggest__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.hnp-suggest__media .hnp-card__base { position: absolute; left: 12px; top: 12px; }

.hnp-suggest__body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1 1 auto; }
.hnp-suggest__name { font-family: var(--hnp-font-display, inherit); font-size: 1.0625rem; font-weight: 700; line-height: 1.3; color: var(--hnp-navy); }
.hnp-suggest__address { font-size: 0.875rem; line-height: 1.5; color: var(--hnp-text); }
.hnp-suggest__brand { font-size: 0.8125rem; font-weight: 600; color: var(--hnp-gold); }
.hnp-suggest__cta { margin-top: auto; padding-top: 6px; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--hnp-navy); }

@media (min-width: 600px) { .hnp-suggest__list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .hnp-suggest__list { grid-template-columns: repeat(4, 1fr); } }

/* The summary bar and the listing rows follow the card radius. */
.hnp-summary { border-radius: var(--hnp-radius-card, 12px); }
.hnp-listing { border-radius: var(--hnp-radius-card, 12px); }

/* The theme's paragraph rule outranks a lone class inside the content area,
   so the group title and hint are pinned at class-pair specificity. */
.hnp .hnp-group__title { margin: 0; }
.hnp .hnp-group__hint { margin: -2px 0 0; }


/* ------------------------------------------- unconnected notice (closure) */

.hnp-notice {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px 24px;
	margin: 0 0 20px;
	padding: 16px 20px;
	border: 1px solid var(--hnp-line);
	border-left: 3px solid var(--hnp-gold);
	border-radius: var(--hnp-radius-card, 12px);
	background: var(--hnp-surface);
}

.hnp-notice__body { flex: 1 1 320px; }

.hnp .hnp-notice__title {
	margin: 0 0 4px;
	font-family: var(--hnp-font-display, inherit);
	font-size: 1rem;
	font-weight: 700;
	color: var(--hnp-navy);
}

.hnp .hnp-notice__text {
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.6;
	color: var(--hnp-muted);
	max-width: 68ch;
}

.hnp .hnp-notice__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
}

.hnp-notice .hnp-btn { min-height: 42px; padding: 10px 18px; font-size: 0.8125rem; }
.hnp-notice .hnp-btn--ghost { background: transparent; border-color: var(--hnp-line); color: var(--hnp-navy); }
.hnp-notice .hnp-btn--ghost:hover { border-color: var(--hnp-navy); }

/* Two date fields should fill the "Khi nào" column rather than leaving a
   dead quarter of the panel; the hourly mode already fills all four tracks. */
@media (min-width: 1024px) {
	.hnp-form[data-rental="overnight"] .hnp-group--when .hnp-group__fields,
	.hnp-form[data-rental="daily"] .hnp-group--when .hnp-group__fields {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.hnp-form[data-rental="overnight"] .hnp-field--times-toggle,
	.hnp-form[data-rental="daily"] .hnp-field--times-toggle { grid-column: 1 / -1; }
}

/* The plugin's buttons are full width by default (mobile-first). In the
   notice they are secondary actions and sit on one line from tablet up. */
@media (min-width: 600px) {
	.hnp .hnp-notice .hnp-btn { width: auto; }
	.hnp-notice__actions { justify-content: flex-end; }
}


/* When the site plugin supplies its shared room card (.hnps-room), that card
   carries none of the .hnp-card / .hnp-listing container classes, so nothing
   above lays it out; its own stylesheet (hanopalais-rooms.css) does. */

/* ------------------------------------------------------------ long stay mode
   The fourth mode of the one form: a start day and a duration, no clock, no
   check-out; the base becomes optional; the answer is a shortlist. */
[data-hnp-label="long"] { display: none; }
[data-hnp-label="short"] { display: inline; }
.hnp-field--duration,
.hnp-field--preference { display: none; }
.hnp-form[data-rental="long_stay"] [data-hnp-label="long"] { display: inline; }
.hnp-form[data-rental="long_stay"] [data-hnp-label="short"],
.hnp-form[data-rental="long_stay"] [data-hnp-label="stay"],
.hnp-form[data-rental="long_stay"] [data-hnp-label="hourly"],
.hnp-form[data-rental="long_stay"] .hnp-field--checkin-time,
.hnp-form[data-rental="long_stay"] .hnp-field--checkout-date,
.hnp-form[data-rental="long_stay"] .hnp-field--checkout-time,
.hnp-form[data-rental="long_stay"] .hnp-field--times-toggle { display: none; }
.hnp-form[data-rental="long_stay"] .hnp-field--duration,
.hnp-form[data-rental="long_stay"] .hnp-field--preference { display: flex; }
.hnp-form[data-rental="long_stay"] .hnp-field--preference { grid-column: 1 / -1; }

.hnp-segmented--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) {
	.hnp-segmented--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
	.hnp-form[data-rental="long_stay"] .hnp-group--when .hnp-group__fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* The search summary switches its labels with the mode too. */
[data-hnp-sum-label="long"] { display: none; }
.hnp-summary[data-rental="long_stay"] [data-hnp-sum-label="long"] { display: inline; }
.hnp-summary[data-rental="long_stay"] [data-hnp-sum-label="short"] { display: none; }

/* -------------------------------------------------------- controlled filters
   Suitable-for chips: a checkbox each, styled as a pill. */
.hnp-field--suitable { border: 0; padding: 0; margin: 0; min-width: 0; grid-column: 1 / -1; }
.hnp-field--suitable > legend { padding: 0; float: left; width: 100%; }
.hnp-picks { display: flex; flex-wrap: wrap; gap: 8px; clear: both; padding-top: 6px; }
.hnp-pick { position: relative; display: inline-flex; }
.hnp-pick__input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.hnp-pick__label {
	display: inline-flex;
	align-items: center;
	min-height: 36px;
	padding: 6px 14px;
	border: 1px solid var(--hnp-line);
	border-radius: 999px;
	background: #fff;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--hnp-navy);
	transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.hnp-pick__input:checked + .hnp-pick__label { background: var(--hnp-navy); border-color: var(--hnp-navy); color: #fff; }
.hnp-pick__input:focus-visible + .hnp-pick__label { outline: 2px solid var(--hnp-navy); outline-offset: 2px; }

/* ------------------------------------------------------- long-stay shortlist */
.hnp-longstay { margin-top: 8px; }
.hnp-longstay__head { max-width: 62ch; margin-bottom: 20px; }
.hnp-longstay__eyebrow { margin: 0 0 6px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--hnp-gold); }
.hnp-longstay__title { margin: 0 0 8px; font-size: clamp(1.25rem, 2.4vw, 1.625rem); line-height: 1.2; color: var(--hnp-navy); }
.hnp-longstay__lead { margin: 0; color: var(--hnp-muted); line-height: 1.55; }
.hnp-longstay__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 16px; }
.hnp-longstay__amenities { display: block; margin-top: 4px; font-size: 0.8125rem; color: var(--hnp-muted); }
.hnp-longstay__none { margin: 8px 0 0; padding: 16px; border: 1px dashed var(--hnp-line); border-radius: 12px; color: var(--hnp-muted); }
.hnp-longstay__consult { margin-top: 24px; padding: 22px; border-radius: 16px; background: var(--hnp-navy); color: #fff; }
.hnp-longstay__consult-title { margin: 0 0 6px; font-weight: 700; font-size: 1.0625rem; }
.hnp-longstay__consult-text { margin: 0 0 14px; color: rgba(255, 255, 255, 0.82); line-height: 1.55; }
.hnp-longstay__actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.hnp-longstay__consult .hnp-btn--ghost { border-color: rgba(255, 255, 255, 0.4); color: #fff; background: transparent; }
.hnp-longstay__consult .hnp-btn--ghost:hover { border-color: #fff; }
@media (min-width: 640px) {
	.hnp-longstay__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hnp .hnp-longstay__consult .hnp-btn { width: auto; }
}
@media (min-width: 1024px) {
	.hnp-longstay__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* --------------------------------------------------------- no-result recovery */
.hnp-recover { margin-top: 18px; text-align: left; }
.hnp-recover__actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; justify-content: center; }
.hnp .hnp-recover__actions .hnp-btn { width: auto; min-height: 42px; padding: 10px 18px; font-size: 0.8125rem; }
.hnp-recover__actions .hnp-btn--ghost { background: transparent; border-color: var(--hnp-line); color: var(--hnp-navy); }
.hnp-recover__title { margin: 0 0 10px; font-weight: 700; color: var(--hnp-navy); text-align: center; }
.hnp-recover__list { list-style: none; margin: 0 auto; padding: 0; max-width: 640px; display: grid; gap: 8px; }
.hnp-recover__item { display: grid; grid-template-columns: 1fr; gap: 2px 12px; padding: 12px 14px; border: 1px solid var(--hnp-line); border-radius: 12px; background: #fff; }
.hnp-recover__name { font-weight: 700; color: var(--hnp-navy); }
.hnp-recover__address { font-size: 0.8125rem; color: var(--hnp-muted); }
.hnp-recover__go { margin-top: 6px; justify-self: start; }
.hnp-recover__support { margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; font-size: 0.875rem; color: var(--hnp-muted); }
.hnp-recover__support a { color: var(--hnp-navy); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 640px) {
	.hnp-recover__item { grid-template-columns: 1fr auto; align-items: center; }
	.hnp-recover__address { grid-column: 1; }
	.hnp-recover__go { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
}

/* The selection notice now carries the channels that work today. */
.hnp-banner__text { margin: 0; }
.hnp-banner__actions { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0 0; }
.hnp-banner__link { font-weight: 700; color: inherit; text-decoration: underline; text-underline-offset: 3px; }
/* On the navy consultation panel the primary action is inverted so it reads. */
.hnp .hnp-longstay__consult .hnp-btn--primary { background: #fff; border-color: #fff; color: var(--hnp-navy); }
.hnp .hnp-longstay__consult .hnp-btn--primary:hover { background: var(--hnp-ivory); }
@media (min-width: 640px) {
	.hnp .hnp-longstay__consult .hnp-btn--primary,
	.hnp .hnp-longstay__consult .hnp-btn--ghost { width: auto; }
}

/* ------------------------------------------------------------------ filters
   Booking/search alignment pass (2026-09): brand/area/suitable-for, split
   out of "Ở đâu" into their own compact block — filters on a search input,
   not another question to answer before you can search. Collapsed behind
   "Lọc" below tablet width; always open above it. Same fields, same names,
   same hnp-booking.js handlers — only the wrapper and the toggle are new. */
.hnp-filters { margin: -4px 0 var(--hnp-gap); }
.hnp-filters__toggle {
	display: none;
	align-items: center;
	gap: 8px;
	width: auto;
	margin: 0 0 12px;
	padding: 9px 16px;
	border: 1px solid var(--hnp-line);
	border-radius: 999px;
	background: #fff;
	font: inherit;
	font-size: 0.8125rem;
	font-weight: 700;
	color: var(--hnp-navy);
	cursor: pointer;
}
.hnp-filters__toggle .hnp-icon { width: 16px; height: 16px; }
.hnp-filters__toggle:focus-visible { outline: 2px solid var(--hnp-navy); outline-offset: 2px; }
.hnp-filters__toggle[aria-expanded="true"] { background: var(--hnp-navy); border-color: var(--hnp-navy); color: #fff; }
.hnp-filters__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--hnp-gold);
	color: var(--hnp-navy);
	font-size: 0.6875rem;
}
.hnp-filters__panel { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: flex-start; }
.hnp-filters__panel .hnp-field--brand,
.hnp-filters__panel .hnp-field--area { flex: 1 1 200px; min-width: 0; margin: 0; }
.hnp-filters__panel .hnp-field--suitable { flex: 1 1 100%; }
.hnp-filters__panel .hnp-field--price { flex: 1 1 100%; }

@media (max-width: 767px) {
	.hnp-filters__toggle { display: inline-flex; }
	.hnp-filters__panel { flex-direction: column; gap: var(--hnp-gap); }
	.hnp-filters__panel[data-hnp-collapsed] { display: none; }
}

/* =====================================================================
   VISUAL POLISH (2026-09) — density of the search panel
   =====================================================================
   Measured against the reference: their search is one ~76px bar and the
   first result is visible immediately. Ours asked for the same five
   answers but spent 821px doing it, because each question owned a full
   row of the panel. Nothing is removed or renamed below — the same
   fields, in the same order, simply share one row on a wide screen, and
   the panel's own chrome stops being so generous. */

/* The base question holds a single control now (brand and area moved to
   the filter row), so it no longer needs a two-track sub-grid. */
@media (min-width: 1024px) {
	.hnp-group--where .hnp-group__fields { grid-template-columns: minmax(0, 1fr); }

	/* Where · when · who · search on one line; the secondary filters keep
	   their own row underneath, as approved. */
	.hnp-form__grid {
		grid-template-columns: minmax(190px, 0.9fr) minmax(300px, 1.7fr) auto auto;
		column-gap: 20px;
		row-gap: 18px;
	}

	.hnp-group--where { grid-column: auto; }
	.hnp-filters { grid-column: 1 / -1; order: 1; }

	/* The submit sits on the control line, not below it. */
	.hnp-form__actions .hnp-btn--primary { min-width: 168px; }
}

/* The mode switch is a control, not a banner. */
.hnp-segmented__label { min-height: 48px; padding: 6px 8px; }
.hnp-form__rental { margin-bottom: 16px; }
.hnp-form { padding: 18px; }
.hnp-group { gap: 8px; }

/* The disclosure is honest and stays, but it is a note, not a hero. */
.hnp-notice { gap: 10px 20px; margin-bottom: 16px; padding: 12px 18px; }
/* Secondary, but still a target: 38px was below the 44 the touch pass holds
   everything else to, and these are the recovery actions a customer needs
   most in exactly the state this notice describes. */
.hnp-notice .hnp-btn { min-height: 44px; padding: 10px 18px; }

/* A search page opens with its controls, so the title is a label rather
   than a display line. */
.hnp .hnp__title { font-size: clamp(1.5rem, 2.2vw, 1.875rem); }
.hnp__head { margin-bottom: 16px; }

/* With the three questions side by side their headings must line up, or the
   row reads as a staircase; the submit stays down on the control line. */
@media (min-width: 1024px) {
	.hnp-form__grid { align-items: start; }
	/* The submit belongs on the control line with the fields, not under the
	   note that trails the date column. */
	.hnp-form__actions { align-self: start; margin-top: 58px; }
	.hnp-group--when .hnp-group__hint { margin: 0; }
}

/* Tablet gets its own composition rather than a squeezed desktop: two
   questions to a row instead of one, with the filters and the submit
   spanning underneath. */
@media (min-width: 600px) and (max-width: 1023px) {
	/* The two short questions pair up; the dates keep the full width they
	   need, then the filters and the submit. */
	.hnp-group--who { order: 0; }
	.hnp-group--when { order: 1; grid-column: 1 / -1; }
	.hnp-group--when .hnp-group__fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hnp-filters { order: 2; }
	.hnp-form__actions { order: 3; }
	.hnp-form__actions .hnp-btn--primary { min-width: 220px; }
}

/* On a phone the three contact buttons in the note are secondary actions;
   full-width stacking turned a one-line disclosure into a third of the
   screen. They wrap as a row instead, still comfortably tappable. */
@media (max-width: 599px) {
	.hnp .hnp-notice .hnp-btn { width: auto; flex: 0 1 auto; }
	.hnp-notice__actions { display: flex; flex-wrap: wrap; gap: 8px; }
	.hnp-notice { padding: 12px 14px; }
}

/* A guest count is a small number: the stepper should not stretch to fill
   whatever column it lands in. */
.hnp-field--guests .hnp-stepper { max-width: 200px; }

@media (min-width: 1024px) {
	/* Three stay types stretched across the full panel read as a navigation
	   band. Capped, the track reads as one control sitting above the
	   questions it governs. */
	.hnp-form__rental .hnp-segmented { max-width: 600px; }
}

/* =====================================================================
   PRICE RANGE (2026-09)
   Two number fields rather than a dual-thumb slider: keyboard and
   screen-reader support come for free, an exact figure can be typed,
   and no library is added. The pair wraps rather than squeezing on a
   phone, and the clear control only appears once there is something
   to clear.
   ===================================================================== */
/* A fieldset carries a browser default border; the other filter groups
   reset theirs, and this one was the only box in the panel. */
.hnp-field--price { border: 0; padding: 0; margin: 0; min-width: 0; }
.hnp-field--price > legend { padding: 0; float: left; width: 100%; }

.hnp-price {
	clear: both;
	padding-top: 6px;
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 8px 10px;
}

.hnp-price__pair {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
	/* A price is a short number. Left to grow they filled a 1,100px row and
	   read as two text fields rather than one range. */
	flex: 0 1 180px;
}

.hnp-price__label {
	font-size: 0.75rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--hnp-muted);
}

.hnp-price__input {
	width: 100%;
	min-width: 0;
}

.hnp-price__dash {
	flex: 0 0 auto;
	padding-bottom: 12px;
	color: var(--hnp-muted);
}

.hnp-price__unit {
	flex: 0 0 auto;
	padding-bottom: 12px;
	font-size: 0.8125rem;
	color: var(--hnp-muted);
}

.hnp-price__clear {
	flex: 0 0 auto;
	margin-bottom: 10px;
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	font-size: 0.8125rem;
	color: var(--hnp-muted);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.hnp-price__clear:hover,
.hnp-price__clear:focus-visible { color: var(--hnp-ink); }

.hnp-price__note:empty { display: none; }

.hnp-price__note {
	margin: 8px 0 0;
	font-size: 0.8125rem;
	color: var(--hnp-muted);
}

/* =====================================================================
   RESULTS LAYOUT — filter rail, mobile toolbar, filter sheet (2026-09)
   =====================================================================
   Measured fresh against the reference at 1440: a 1240 content band split
   940 results / 300 rail, the rail static rather than sticky, the result
   count on the left of a 46px row and the sort control on its right.
   Our content band is 1160, so the same proportion gives a 288px rail.

   Nothing here duplicates a control. hnp-booking.js moves the one filter
   panel between the search form, the rail and the sheet; the CSS only
   says what each home looks like. */

.hnp-results__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0;
}

.hnp-results__main { min-width: 0; }

/* The column rule lives in PHASE 3.1 below, against the reference's measured
   300px rail. The 288 that used to sit here was a proportion of our own band,
   not a measurement of theirs. */

/* --- the rail ------------------------------------------------------- */

/*
 * PHASE 3.1 — the rail is a column of white blocks, not one bordered card.
 *
 * Measured: a 300px column with 8px/15px of padding and 12px between
 * blocks, each block a white panel at radius 8 with 12px/16px inside and a
 * heading of its own. Phase 3 built one 270px outlined card with hairlines
 * between groups — a box inside a box, and the wrong width.
 */
.hnp-rail {
	min-width: 0;
	padding: 8px 15px;
	border: 0;
	border-radius: 0;
	background: transparent;
}

/* The rail's own heading is the reference's absent one: its blocks name
   themselves. Kept for screen readers, not drawn. */
.hnp-rail__title {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.hnp-rail .hnp-filters__panel {
	flex-direction: column;
	flex-wrap: nowrap;
	gap: 12px;
}

.hnp-rail .hnp-filters__panel > * {
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	margin: 0;
	padding: 12px 16px;
	border: 0;
	border-radius: 8px;
	background: var(--hnp-surface);
}

.hnp-rail .hnp-field--suitable,
.hnp-rail .hnp-field--price { flex: 1 1 auto; }

.hnp-rail .hnp-field__label {
	display: block;
	margin: 0 0 10px;
	padding: 0;
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
	color: var(--hnp-navy);
}

/* --- the phone toolbar ---------------------------------------------- */

/*
 * The phone action rail. The reference runs its Lọc / Sắp xếp controls as a
 * 52px row of icon-over-label buttons above the count bar, not as a pair of
 * full-height pills beside the count. With the count moved to its own 46px
 * bar this row carries only the actions, and 52 is its measured height.
 */
.hnp-toolbar {
	position: sticky;
	top: 0;
	z-index: 6;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 12px;
	min-height: 52px;
	margin: 0 0 12px;
	padding: 6px 0;
	background: var(--hnp-bg, #faf7f2);
}

.hnp-toolbar__count {
	margin: 0;
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--hnp-navy);
}

.hnp-toolbar__actions { display: flex; gap: 8px; }

.hnp-toolbar__btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	padding: 0 14px;
	border: 1px solid var(--hnp-line);
	border-radius: 999px;
	background: var(--hnp-surface);
	font: inherit;
	font-size: 0.8125rem;
	font-weight: 700;
	color: var(--hnp-navy);
	cursor: pointer;
}

.hnp-toolbar__btn .hnp-icon { width: 16px; height: 16px; }
.hnp-toolbar__btn:focus-visible { outline: 2px solid var(--hnp-navy); outline-offset: 2px; }

.hnp-toolbar__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--hnp-gold);
	color: #fff;
	font-size: 0.6875rem;
}

/* --- the filter sheet ----------------------------------------------- */

.hnp-sheet { position: fixed; inset: 0; z-index: 120; }
.hnp-sheet__scrim { position: absolute; inset: 0; background: rgba(14, 26, 38, 0.5); }

.hnp-sheet__panel {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	max-height: 88vh;
	border-radius: 16px 16px 0 0;
	background: var(--hnp-surface);
}

.hnp-sheet__head,
.hnp-sheet__foot {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 18px;
}

.hnp-sheet__head { justify-content: space-between; border-bottom: 1px solid var(--hnp-line); }
.hnp-sheet__title { margin: 0; font-size: 1rem; font-weight: 700; color: var(--hnp-navy); }

.hnp-sheet__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin-right: -10px;
	border: 0;
	border-radius: 999px;
	background: none;
	font-size: 1.75rem;
	line-height: 1;
	color: var(--hnp-navy);
	cursor: pointer;
}

.hnp-sheet__body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 18px;
	-webkit-overflow-scrolling: touch;
}

.hnp-sheet__body .hnp-filters__panel { flex-direction: column; gap: 18px; }
.hnp-sheet__body .hnp-field--sort { margin: 0 0 18px; }

.hnp-sheet__foot {
	border-top: 1px solid var(--hnp-line);
	/* Clear of a phone's home indicator, and of the site's own sticky chrome. */
	padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
}

.hnp-sheet__foot .hnp-btn { flex: 1 1 0; min-height: 48px; justify-content: center; }

/* --- the listing card ------------------------------------------------ */

/* The shared room card, in listing context. The property page is untouched:
   every rule below is scoped to .hnp-grid. */

.hnp-grid .hnps-room .hnps-room__name {
	margin: 2px 0 6px;
	font-size: 1.25rem;
	line-height: 1.3;
}

.hnp-grid .hnps-room .hnps-room__where {
	margin: 0;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--hnp-muted);
}

@media (min-width: 1024px) {

	/* The card's column track is owned by hanopalais-rooms.css, which is the
	   stylesheet the component belongs to. Three different percentage
	   guesses used to live here and win purely on load order, which is how
	   the measured photograph came out at 36% of the card while the rule
	   that was supposed to govern it said 330px. */

	/* Top-aligned, not centred: with four cards of different content lengths a
	   centred rail makes the price sit at a different height in every row, and
	   the eye has to hunt for it down the column. */
	.hnp-grid .hnps-room__side {
		justify-content: flex-start;
		align-self: stretch;
	}
}

/* The range pair in a 288px rail: two equal columns, the dash dropped —
   at this width it was orphaning onto its own line between the fields. */
.hnp-rail .hnp-price {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px 12px;
	align-items: end;
}

.hnp-rail .hnp-price__pair { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hnp-rail .hnp-price__input { width: 100%; max-width: none; }
.hnp-rail .hnp-price__dash { display: none; }
.hnp-rail .hnp-price__unit { grid-column: 1; align-self: center; font-size: 0.75rem; }
.hnp-rail .hnp-price__clear { grid-column: 2; justify-self: end; }
.hnp-rail .hnp-price__note { grid-column: 1 / -1; margin: 0; }

/* Sort geometry now lives in PHASE 3.1. Re-measuring the reference showed it
   stacks a 12px label over the value inside one 46px block rather than
   setting the pair side by side — which is the whole reason its bar is 46
   and the side-by-side version here needed 57. */

/* The photograph fills the card rather than floating in it. With the
   container stretched to the row and no aspect-ratio, height:100% on the
   image resolved to auto and the photo rendered at its natural height —
   a 443px card. Taking the image out of flow pins it to the container. */
@media (min-width: 1024px) {
	.hnp-grid .hnps-room__media {
		position: relative;
		align-self: stretch;
		aspect-ratio: auto;
		min-height: 188px;
	}

	.hnp-grid .hnps-room .hnps-room__img {
		position: absolute;
		inset: 0;
		width: 100%;
		height: 100%;
		object-fit: cover;
	}
}

/* On a phone the reference splits these: an action rail carrying Lọc and
   Sắp xếp, then the count on its own 46px white bar below. Phase 3 had it
   the other way round — the count inside the action bar and the header's
   count hidden — which put two bars and one count where the reference has
   two bars and one count in the other order. The count belongs to the bar
   that is 46 tall at every width. */
@media (max-width: 767px) {
	.hnp-results__header {
		margin-bottom: 12px;
	}

	.hnp-toolbar__count { display: none; }

	/* The mobile photograph band is a measured 192px tall at 375, 390 and
	   430 alike — a height, not a ratio. Expressed as 2/1 it fought the
	   explicit height in hanopalais-rooms.css and won, pinning the picture
	   to 384px wide inside a 390px card. The height is set there; here it
	   only has to stop insisting on a ratio. */
	.hnp-grid .hnps-room__media { aspect-ratio: auto; }
}

/* The panel's fields carry `flex: 1 1 200px` for the row layout inside the
   search form. Turned into a column that basis becomes a *height*, which is
   why the rail and the sheet opened with 200px of air between every group.
   In a column the fields size to their content. */
.hnp-rail .hnp-filters__panel > *,
.hnp-sheet__body .hnp-filters__panel > * {
	flex: 0 0 auto;
	width: 100%;
	min-width: 0;
}

.hnp-sheet__body .hnp-filters__panel > * + * {
	padding-top: 18px;
	border-top: 1px solid var(--hnp-line);
}

.hnp-sheet__body .hnp-field--sort { display: flex; flex-direction: column; gap: 6px; }

/* The skeleton stands in for the real card, so it has to be shaped like one.
   Its media block was height:100% inside a container with no height, so it
   collapsed and the placeholder showed white where the photograph goes —
   the one part of the card the eye looks for first. */
.hnp-skeletons .hnp-listing__media {
	min-height: 168px;
	border-radius: var(--hnp-radius);
	overflow: hidden;
}

@media (min-width: 1024px) {
	.hnp-skeletons .hnp-listing {
		grid-template-columns: minmax(0, 33%) minmax(0, 1fr) minmax(176px, 21%);
		grid-template-areas: "media info side";
		gap: var(--hnp-space-5, 24px);
		align-items: start;
		padding: var(--hnp-space-5, 24px);
	}

	.hnp-skeletons .hnp-listing__media { grid-area: media; align-self: stretch; min-height: 188px; }
	.hnp-skeletons .hnp-listing__info { grid-area: info; }
	.hnp-skeletons .hnp-listing__side { grid-area: side; }
}

/* Tablet: the commercial rail becomes a row under the photograph and the
   information, and the CTA sits at the end of it rather than spanning the
   whole 754px card. `.hnp-results .hnp-btn { width: 100% }` was winning over
   the room card's own `width: auto`, which is right for a phone and much too
   heavy here. */
@media (min-width: 700px) and (max-width: 1023px) {
	.hnp-grid .hnps-room__side {
		align-items: center;
		justify-content: flex-end;
	}

	.hnp-grid .hnps-room .hnps-room__cta {
		width: auto;
		min-width: 200px;
		margin-top: 0;
	}
}

/* The 36% that used to sit here chased a percentage the reference does not
   use: its photograph is 330px at 1440 and 300px at 1024 — a fixed track, not
   a share of the card. The track now lives once, in hanopalais-rooms.css. */


/* ================================ PHASE 3 — SEARCH RESULTS
   Measured against the live reference at 1440 / 820 / 390, and against the
   *populated* HanoPalais state rather than the idle one. That distinction
   matters: the baseline audit scored this page at 44% while looking at the
   pre-search screen, where the toolbar, the summary and the sort control are
   all `hidden` by design. They exist. What they are not is the reference's
   shape.

   Reference, 1440:

     search band   1440x76, sticky, full-bleed white, radius 0
     toolbar       940x46 — count left at 16/500, sort right
     columns       results 940 · gap 30 · rail 270 (rail present at 820 too)
     card          940x245, radius 12, 1px hairline, no shadow
     image         330 wide — 35% of the card
     price         20px/600 in the accent
     CTA           117x40, fully rounded

   Ours measured 1160x80 radius 12 contained, a 111px two-row header with an
   18/700 count, 844+288 columns, a 256px card with a heavy shadow, a 16/400
   price and a 150x48 radius-8 button. Same components, different object —
   the same finding as the hero in phase 1.1. */

/* --------------------------------------------------- 1. the search band */

/* The band is rebuilt from the live reference in the PHASE 4 block at the
   end of this file. What stood here was the Phase 3 version: a flex row with
   a 20px gap, its own padding-inline and a bottom hairline, against markup
   that no longer exists. Keeping it would have applied that padding on top
   of the new shell.  */

/* ------------------------------------------------------- 2. the toolbar */

/*
 * PHASE 3.1 — the toolbar is not a bordered card, it is two white blocks.
 *
 * Measured: 940x46 at 1440, 670x46 at 1024, 420x46 at 768, and the full
 * viewport at 46 on a phone — the height never changes. It is built as a
 * count block and a sort block separated by a 2px seam, the outer corners
 * rounded 8 and the inner corners square, so the pair reads as one bar.
 *
 * Phase 3 left it a single 1px-bordered 57px card, which is the wrong
 * object at every width: too tall, and outlined where the reference is
 * simply a white surface on the page's grey.
 */
.hnp-results__header {
	flex-direction: row;
	align-items: stretch;
	justify-content: space-between;
	gap: 2px;
	min-height: 46px;
	height: 46px;
	margin-bottom: 16px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
}

.hnp-results__header > div {
	display: flex;
	flex-direction: column;
	justify-content: center;
	flex: 1 1 auto;
	min-width: 0;
	padding: 8px 20px;
	border-radius: 8px 0 0 8px;
	background: var(--hnp-surface);
}

/* With no price to sort by the count block is the whole bar. */
.hnp-results__header > div:only-child { border-radius: 8px; }

/*
 * Two classes again, and for the same reason as the sort block: these are
 * `<p>` elements, the theme gives `p` a 25.6px bottom margin through a
 * container class, and a single-class `margin: 0` here loses to it. Inside a
 * 46px column flex box two such margins exceed the height, so both children
 * were shrunk — to a *zero-height* content box each. With `overflow: hidden`
 * on the count for its ellipsis, the result was a correctly sized, correctly
 * coloured, entirely invisible number: 358x0 holding a 78x22 span.
 */
.hnp-results__header .hnp-results__count,
.hnp-results__header .hnp-results__summary {
	margin: 0;
	flex: 0 0 auto;
}

.hnp-results__count {
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.2;
	color: var(--hnp-navy);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* The long phrasing where the bar is wide enough for it; the reference's
   brevity where it is not. Never both, never wrapped. */
.hnp-results__count-short { display: none; }

@media (max-width: 1099px) {

	.hnp-results__count-long { display: none; }
	.hnp-results__count-short { display: inline; }
}

.hnp-results__summary {
	margin: 1px 0 0;
	font-size: 12px;
	color: var(--hnp-muted, rgba(14, 26, 38, 0.6));
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/*
 * The sort block. The reference stacks a 12px label over the value inside
 * the same 46px height rather than setting them side by side, which is why
 * its bar stays 46 where ours needed 57 to fit a label beside a pill. The
 * control loses its own border and sits on the block's white.
 */
/*
 * Two classes, not one. The sort control is a `<p>`, and the theme styles
 * `p` through a container class, which outranks a single-class rule here:
 * `margin: 0` lost, the element kept a 25.6px bottom margin, and because a
 * stretched flex item's cross size is the line minus its own margins the
 * block resolved to 46 − 25.6 = 20.4px tall inside a 46px bar. It measured
 * 183x20 with its label and select spilling out of it.
 */
.hnp-results__header .hnp-field--sort {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 0;
	margin: 0;
	flex: 0 0 auto;
	/* A third of the bar, which is what the reference resolves to at 1024
	   (223 of 670) and at 768 (140 of 420). */
	width: 33.333%;
	padding: 4px 16px;
	border-radius: 0 8px 8px 0;
	background: var(--hnp-surface);
}

/* Above 1400 the reference narrows it to 30% less 99px — 183 of 940. */
@media (min-width: 1400px) {

	.hnp-results__header .hnp-field--sort { width: calc(30% - 99px); }
}

.hnp-field--sort .hnp-field__label {
	margin: 0;
	font-size: 12px;
	font-weight: 500;
	line-height: 16px;
	letter-spacing: 0;
	text-transform: none;
	color: var(--hnp-muted, rgba(14, 26, 38, 0.6));
	white-space: nowrap;
}

.hnp-field--sort .hnp-field__control {
	min-height: 20px;
	height: 20px;
	padding: 0 18px 0 0;
	border: 0;
	border-radius: 0;
	background-color: transparent;
	background-position: right center;
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
	color: var(--hnp-navy);
}

/* 33.333% covers 1024 and 768 exactly; no separate narrow width is needed. */

/* On a phone the reference carries no sort in this bar: Sắp xếp lives in the
   action rail above, and the bar is the count alone. */
@media (max-width: 767px) {

	/* Two classes, to beat the two-class block rule above — as one class it
	   lost and the sort sat in the phone's count bar beside an empty left
	   half, which is neither the reference's bar nor a usable one. */
	.hnp-results__header .hnp-field--sort { display: none; }

	/* The count bar runs the full width of the phone, like the cards below
	   it — measured 430x46 at x=0, not an inset 398. */
	.hnp-results__header {
		width: 100vw;
		max-width: 100vw;
		margin-inline: calc(50% - 50vw);
	}

	.hnp-results__header > div { border-radius: 0; padding-inline: 16px; }
}

/* ------------------------------------------------- 3. columns and rail */

/*
 * The reference carries its rail at 820 as well as at desktop — results 488
 * beside a rail of the same 270 it uses at 1440. Ours only built the rail at
 * 1200, so the whole tablet width lost the visible filter architecture and
 * fell back to the sheet. 270 is the reference's number at both widths.
 */
/*
 * PHASE 3.1 — the shell, measured rather than proportioned.
 *
 * The reference does not scale its container, it steps it. Measured at the
 * seven required widths its content box is
 *
 *   1440 -> 1270   1280 -> 1000   1024 -> 1000   768 -> 750   <768 -> viewport
 *
 * and inside that box the split is one constant object: the rail is a fixed
 * 300, the results column takes the remainder, and each carries 15px of
 * inner padding. That produces 940 / 670 / 420 of result content at 1440 /
 * 1024 / 768 — the reference's own numbers to the pixel.
 *
 * Phase 3 used 270 and a 28px gap, derived from a proportion of our own
 * 1160 band. Both were wrong: the rail is 300, the gap is the 15px padding,
 * and the band is stepped rather than proportional. The layout breaks out
 * of the page container to do this, the way the search band already does.
 */
.hnp-results__layout {
	--hnp-shell: 100vw;
	width: 100vw;
	max-width: 100vw;
	margin-inline: calc(50% - 50vw);
	padding-inline: max(0px, calc(50vw - var(--hnp-shell) / 2));
}

@media (min-width: 768px) {

	.hnp-results__layout {
		--hnp-shell: 750px;
		grid-template-columns: minmax(0, 1fr) 300px;
		gap: 0;
		align-items: start;
	}

	.hnp-results__main { padding-inline: 15px; }
}

@media (min-width: 1024px) { .hnp-results__layout { --hnp-shell: 1000px; } }
@media (min-width: 1400px) { .hnp-results__layout { --hnp-shell: 1270px; } }

/*
 * Below the rail breakpoint the reference runs its cards edge to edge and
 * keeps a gutter on everything else. Only the grid breaks out.
 */
@media (max-width: 767px) {

	.hnp-results__main { padding-inline: 16px; }

	.hnp-grid {
		width: 100vw;
		max-width: 100vw;
		margin-inline: calc(50% - 50vw);
	}
}

/* --------------------------------------------------------- 4. the card */

/*
 * The heaviest single difference: ours carried an 18px ink shadow at 35%
 * opacity, which makes a list of cards read as a stack of floating panels.
 * The reference's card is flat, held by a hairline, and the separation comes
 * from the gap between cards.
 */
.hnp-listing {
	box-shadow: none;
	border: 1px solid var(--hnp-line);
	border-radius: 12px;
}

.hnp-listing:hover { box-shadow: none; }

/* The price is the reason the card exists and it was set at body size and
   regular weight. Size and weight carry it rather than a colour, which on
   HanoPalais's palette would mean gold on white. */
.hnp-card__price {
	display: flex;
	align-items: baseline;
	gap: 6px;
	flex-wrap: wrap;
	justify-content: flex-end;
}

.hnp-card__amount {
	font-family: var(--hnp-font-display, inherit);
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.15;
	color: var(--hnp-navy);
}

.hnp-card__unit { font-size: 13px; color: var(--hnp-muted, rgba(14, 26, 38, 0.6)); }

.hnp-listing__side .hnp-btn--select {
	min-height: 40px;
	height: 40px;
	min-width: 117px;
	border-radius: 999px;
	padding-inline: 20px;
	font-size: 14px;
}

/* A sold-out card keeps the same geometry so the row does not jump; only the
   treatment says it is unavailable. */
.hnp-listing__side .hnp-btn--select[disabled],
.hnp-listing__side .hnp-btn--select[aria-disabled="true"] { border-radius: 999px; }

@media (min-width: 768px) {

	/* 35% is the reference's split and it is why their photograph reads as a
	   photograph. Ours was sized by the flex default. */
	.hnp-listing__media { flex: 0 0 35%; max-width: 35%; }
}

/* --- P3b the visible filter axes ----------------------------------------
   Brand and area are chip groups now, using the same `hnp-pick` component
   "Phù hợp với" already uses, so the rail reads as one control language.
   The single-select groups are radios and look it: one filled chip at a
   time, never two. */

.hnp-picks--single { display: flex; flex-wrap: wrap; gap: 8px; }

.hnp-picks--single .hnp-pick { margin: 0; }

.hnp-field--brand,
.hnp-field--area { border: 0; margin: 0 0 var(--hnp-gap); padding: 0; min-width: 0; }

.hnp-field--brand .hnp-field__label,
.hnp-field--area .hnp-field__label { display: block; margin-bottom: 8px; padding: 0; }

/* In the rail the axes stack full width; in the sheet and the inline panel
   they share the row as before. */
.hnp-rail .hnp-field--brand,
.hnp-rail .hnp-field--area { flex: 1 1 100%; }

/* --- P3c the toolbar is one line ----------------------------------------
   111px for a count and a sort, against the reference's 46. The height was
   a second line under the count repeating what the sticky band directly
   above it already says — "Kết quả cho BASE 01 · Bưởi · Qua đêm · 2 khách ·
   13/09 22:00 → 14/09 12:00" is the search, and the search is the band.
   The count and the sort share the row; the restatement goes.

   It stays in the markup and stays announced: on a phone the sticky band is
   a two-line pill and this line is the only place the full context is
   spelled out, so it is hidden by width, not deleted. */

@media (min-width: 768px) {

	.hnp-results__header .hnp-results__summary { display: none; }
}

/* --- P3d the phone -------------------------------------------------------
   Two things measured wrong at 390.

   The sticky band came out 152px against the reference's 77: the location
   took a full row and the remaining four values wrapped onto two more. It is
   a summary — it gets one line for where, one for the rest, and the rest
   truncates rather than growing.

   And the card ran 533px because the price sat on its own line above a
   full-width button. The reference puts the two on one row, which is also
   where a thumb expects them. */

@media (max-width: 767px) {

	/* band padding now lives on .hnp-summary__shell (PHASE 4) */
	/* Price and action on one row. */
	.hnp-grid .hnps-room__side {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: center;
		gap: var(--hnp-space-3);
		row-gap: 6px;
	}

	.hnp-grid .hnps-room__avail { grid-column: 1 / -1; margin: 0; }
	.hnp-grid .hnps-room__price { justify-content: flex-start; margin: 0; }

	.hnp-grid .hnps-room .hnps-room__cta {
		width: auto;
		min-width: 132px;
		margin-top: 0;
		justify-self: end;
	}

	/* Two lines of description in a list; the rest is on the room's own page. */
	.hnp-grid .hnps-room__desc {
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
		line-clamp: 2;
		overflow: hidden;
	}

	/* No gap: the reference's stacked card has the photograph sitting
	   directly on the body with no seam between them. */
	.hnp-grid .hnps-room__body { gap: 0; }
}

/* The base's name is now a link; it should read as one without shouting. */
.hnps-room__branch { color: inherit; text-decoration: none; border-bottom: 1px solid currentColor; }
.hnps-room__branch:hover,
.hnps-room__branch:focus-visible { color: var(--hnp-navy); }

/* The 768–899 label suppression is gone with the side-by-side sort: stacked
   inside its own block, the label costs no horizontal room at any width and
   the bar holds 46 from 768 up. */


/* ======================================= PHASE 4 — THE SEARCH BAND
   Rebuilt from the live reference rather than patched. Measured at 1440:

     band          1440x76, sticky top 0, z 21, white
                   no border, no shadow, radius 0
     container     1270 @85  (1000 @140 at 1280, 1000 @12 at 1024, 750 @9 at 768)
     row           [where 300] | [when 470] | [who 344]  then [action 154]
     divider       1x32, vertically centred (y = band top + 22)
     label         12px / 500 / line-height 16, accent
     value         14px / 400 / line-height 21, ink
     label -> value gap  5px
     content block 16 + 5 + 21 = 42, centred in 76  ->  17 above, 17 below
     action        139x44 pill, centred  ->  16 above, 16 below

   What was wrong, measured side by side:

     - the block was 47 tall sitting 13 from the top and 16 from the bottom,
       so it was not centred at all — the visible symptom the owner reported
       as fields sitting at different heights;
     - label line-height computed to 20.4286px, a fraction produced by a
       relative line-height on an 11px font, so no two groups could share a
       baseline by construction;
     - values were 600 weight against the reference's 400, labels 11/600
       against 12/500;
     - five equal columns gave the location 629px and the guests 92px;
     - the band carried a 1px border and a 12px shadow the reference has
       neither of;
     - the CTA was 120x48 at radius 8, against a 139x44 pill;
     - and at 1280 the content started at x=20, ignoring the stepped
       container the results below it already use.

   Every number below is the reference's. The one shared field contract is
   .hnp-summary__label + .hnp-summary__value, used by all four fields, so a
   group cannot drift on its own again. */

.hnp--collapsed .hnp-summary,
.hnp-summary {
	position: sticky;
	top: 0;
	z-index: 30;
	width: 100vw;
	max-width: 100vw;
	margin-inline: calc(50% - 50vw);
	margin-block: 0 var(--hnp-gap);
	padding: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	background: var(--hnp-surface);
}

/* The same stepped shell the results grid uses, so the band and the columns
   under it share one set of gutters at every width. */
.hnp-summary__shell {
	--hnp-shell: 100vw;
	display: flex;
	align-items: stretch;
	width: 100%;
	padding-inline: max(16px, calc(50vw - var(--hnp-shell) / 2));
}

@media (min-width: 768px)  { .hnp-summary__shell { --hnp-shell: 750px; } }
@media (min-width: 1024px) { .hnp-summary__shell { --hnp-shell: 1000px; } }
@media (min-width: 1400px) { .hnp-summary__shell { --hnp-shell: 1270px; } }

@media (min-width: 768px) {

	.hnp-summary { min-height: 76px; }

	.hnp-summary__row {
		display: flex;
		align-items: stretch;
		flex: 1 1 auto;
		min-width: 0;
		min-height: 76px;
	}

	/* ---- the one field contract ---- */

	.hnp-summary__group,
	.hnp-summary__field {
		display: flex;
		flex-direction: column;
		justify-content: center;
		gap: 5px;
		min-width: 0;
		padding-inline: 15px;
	}

	.hnp-summary__group--where { flex: 0 0 300px; padding-left: 24px; }

	.hnp-summary__group--when {
		flex: 1 1 auto;
		flex-direction: row;
		gap: 0;
		padding: 0;
	}

	.hnp-summary__group--when .hnp-summary__field { flex: 1 1 50%; }

	/* The reference's own distribution: where 300 fixed, action 154 fixed,
	   and the remainder split between when and who — 470/344 at 1440,
	   382/162 at 1280. A fixed who at each step reproduces both to 2px. */
	.hnp-summary__group--who { flex: 0 0 162px; }

	.hnp-summary__label {
		font-size: 12px;
		font-weight: 500;
		line-height: 16px;
		letter-spacing: 0;
		text-transform: none;
		color: var(--hnp-gold);
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.hnp-summary__value {
		display: block;
		margin: 0;
		font-size: 14px;
		font-weight: 400;
		line-height: 21px;
		color: var(--hnp-navy);
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.hnp-summary__divider {
		flex: 0 0 1px;
		align-self: center;
		width: 1px;
		height: 32px;
		background: var(--hnp-line);
	}

	/* 139x44, centred in the 76 — the reference's action, not a 120x48 box. */
	.hnp-summary .hnp-summary__edit {
		flex: 0 0 auto;
		align-self: center;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 139px;
		min-width: 139px;
		height: 44px;
		min-height: 44px;
		margin-right: 15px;
		padding: 0;
		border: 1px solid var(--hnp-gold);
		border-radius: 999px;
		background: transparent;
		font-family: inherit;
		font-size: 14px;
		font-weight: 500;
		line-height: 20px;
		color: var(--hnp-gold);
		cursor: pointer;
		transition: background-color 0.18s ease, color 0.18s ease;
	}

	.hnp-summary .hnp-summary__edit:hover,
	.hnp-summary .hnp-summary__edit:focus-visible {
		background: var(--hnp-gold);
		color: #ffffff;
	}
}

@media (min-width: 1400px) {

	.hnp-summary__group--who { flex: 0 0 344px; }
}

/* Long stay swaps the two date labels; the value slots are the same. */
.hnp-summary [data-hnp-sum-label="long"] { display: none; }
.hnp-summary[data-rental="long_stay"] [data-hnp-sum-label="long"] { display: inline; }
.hnp-summary[data-rental="long_stay"] [data-hnp-sum-label="short"] { display: none; }

/* -------------------------------------------------------------- phone --
   The reference drops to two lines of state and a compact action. Same
   field contract, stacked. */

@media (max-width: 767px) {

	.hnp-summary { min-height: 64px; }

	.hnp-summary__shell {
		align-items: center;
		gap: 12px;
		padding-block: 10px;
	}

	.hnp-summary__row {
		display: flex;
		flex-wrap: wrap;
		align-items: baseline;
		gap: 2px 8px;
		flex: 1 1 auto;
		min-width: 0;
	}

	.hnp-summary__group,
	.hnp-summary__field { display: contents; }

	.hnp-summary__label { display: none; }

	.hnp-summary__divider { display: none; }

	.hnp-summary__value {
		font-size: 13px;
		line-height: 20px;
		color: var(--hnp-navy);
		white-space: nowrap;
	}

	.hnp-summary__group--where .hnp-summary__value {
		flex: 1 1 100%;
		font-size: 14px;
		font-weight: 700;
	}

	.hnp-summary__group--when .hnp-summary__value::after,
	.hnp-summary__group--who .hnp-summary__value::after {
		content: "·";
		margin-left: 8px;
		color: var(--hnp-line);
	}

	.hnp-summary__group--who .hnp-summary__value::after { content: none; }

	/*
	 * On a phone the reference's action is a word, not a pill — it sits at
	 * the end of the first line and costs almost no width. As a 139px pill
	 * it took enough of the row to push the guest count onto a third line
	 * and the band grew to 84.
	 */
	.hnp-summary .hnp-summary__edit {
		flex: 0 0 auto;
		align-self: center;
		display: inline-flex;
		align-items: center;
		width: auto;
		min-height: 0;
		padding: 0;
		border: 0;
		border-radius: 0;
		background: transparent;
		font-family: inherit;
		font-size: 12px;
		font-weight: 600;
		letter-spacing: 0.04em;
		text-transform: uppercase;
		color: var(--hnp-gold);
		cursor: pointer;
		white-space: nowrap;
	}

	/* The band above now states the full search, so the toolbar keeps only
	   the count and holds its 46. */
	.hnp-results__header .hnp-results__summary { display: none; }
}

/* ------------------------------------------------ the discovery strip --
   940x180 at 1440 — the full width of the results column, 16px above the
   toolbar, radius 8, and gone below the tablet breakpoint exactly as the
   reference drops it. */

.hnp-strip { display: none; }

@media (min-width: 768px) {

	/* RFA-FINAL (UX audit MAJOR-5): the banner headline is part of the picture, so a fixed 180px height with
	   object-fit: cover cut its first and last letters when the results column is narrower (768–1024). The strip
	   now keeps the picture's own 940:180 shape and never crops it. */
	.hnp-strip {
		display: block;
		aspect-ratio: 940 / 180;
		height: auto;
		margin-bottom: 16px;
		border-radius: 8px;
		overflow: hidden;
		background: var(--hnp-color-sand, #efe9df);
	}

	.hnp-strip img {
		display: block;
		width: 100%;
		height: 100%;
		object-fit: contain;
	}
}

/* ================================== PHASE 5 — THE PROPERTY RESULT CARD
   The search page's result unit is a property. The card reuses the room
   card's geometry wholesale — flush photograph, 330/300 image track, the
   turn to a column at 768, the full-bleed phone card — and this block sets
   only what a property says differently.

   Measured from the reference's own card at 1440: chips 20 tall at radius
   76 on a tinted ground with 12/500 text; title 18/500; address 14/400;
   description two lines at 12/400; the commercial column an eyebrow over a
   price over a 40px action. */

.hnps-result__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 6px;
	padding: 0;
}

.hnps-result__chip {
	display: inline-flex;
	align-items: center;
	height: 20px;
	padding: 2px 8px;
	border-radius: 76px;
	background: var(--hnp-color-sand, #efe9df);
	font-size: 12px;
	font-weight: 500;
	line-height: 16px;
	color: var(--hnp-navy);
	white-space: nowrap;
}

/* 18/500. The room card's name is a display-face heading at 28px, which on
   a property is the loudest thing on the page and pushes the address and
   the description out of the card. */
.hnp-grid .hnps-result .hnps-result__name {
	margin: 0 0 4px;
	font-family: inherit;
	font-size: 18px;
	font-weight: 500;
	line-height: 26px;
	letter-spacing: 0;
}

.hnps-result__link {
	color: inherit;
	text-decoration: none;
}

.hnps-result__link:hover,
.hnps-result__link:focus-visible { text-decoration: underline; }

.hnp-grid .hnps-result .hnps-room__address {
	margin: 0 0 6px;
	font-size: 14px;
	line-height: 20px;
}

.hnp-grid .hnps-result .hnps-room__desc {
	margin: 0;
	font-size: 12px;
	line-height: 18px;
}

/* "Chỉ từ" — the reference's eyebrow over the price. It is a label, not a
   claim about availability, so it is quiet. */
.hnps-result__from {
	margin: 0 0 2px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--hnp-muted, rgba(14, 26, 38, 0.6));
}

/* An upcoming base carries no price and no "Chọn phòng"; it says what it is
   and stops there. */
.hnps-result__note {
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	color: var(--hnp-gold);
}

.hnps-result__soon {
	left: 10px;
	right: auto;
	top: 40px;
	background: var(--hnp-gold);
	color: #ffffff;
}

/* The support strip: the reference's own place for a booking-help line —
   inside the result column, at the width of a card. */
.hnp-strip-note {
	margin: 16px 0 0;
	padding: 14px 24px;
	border: 1px solid var(--hnp-color-gold, #9a7b3f);
	border-radius: 8px;
	background: var(--hnp-color-sand, #efe9df);
}

.hnp-strip-note__text {
	margin: 0 0 6px;
	font-size: 14px;
	line-height: 21px;
	color: var(--hnp-navy);
}

.hnp-strip-note__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin: 0;
}

.hnp-strip-note__link {
	font-size: 14px;
	font-weight: 600;
	color: var(--hnp-gold);
}

/* The band sits directly under the site header, as the reference's does.
   The 64px section padding and the 28px results margin were spacing for a
   page that opened with a title and a form; with the band first they were
   92px of nothing above the fold. */
#hnp-booking.hnp { padding-top: 0; }
.hnp-results { margin-top: 0; }

/* The title's own size has to sit on the link: the card's name is a heading
   containing an anchor, and the site's heading rule sizes that anchor at 28
   independently of the h3. Setting the h3 alone left an 18px box with 28px
   text in it. */
.hnp-grid .hnps-result .hnps-result__link {
	font-size: 18px;
	font-weight: 500;
	line-height: 26px;
}

/* The commercial column reads from its middle, as the reference's does. Top
   aligned, a card with no price yet put its action at the very top of a
   220px column with nothing under it. */
.hnp-grid .hnps-result .hnps-room__side { justify-content: center; }

/* ===================================== PHASE 6 — THE FIELD EDITOR
   The band's fields are controls. Clicking one opens this panel pinned
   under the band at the container's width, with a backdrop behind it —
   the shape the reference uses. The old behaviour, reopening the whole
   search form to change one date, is gone. */

.hnp-summary .hnp-summary__group,
.hnp-summary .hnp-summary__field {
	appearance: none;
	border: 0;
	/* The theme pads buttons vertically; unpadded, the band holds the
	   reference's 76 instead of growing to 78. */
	padding-block: 0;
	background: transparent;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.hnp-summary__group:hover,
.hnp-summary__field:hover { background: rgba(14, 26, 38, 0.03); }

.hnp-summary__group:focus-visible,
.hnp-summary__field:focus-visible {
	outline: 2px solid var(--hnp-color-gold, #9a7b3f);
	outline-offset: -2px;
}

.hnp-summary__group[aria-expanded="true"],
.hnp-summary__field[aria-expanded="true"] { background: rgba(14, 26, 38, 0.05); }

.hnp-editor {
	position: sticky;
	top: 76px;
	z-index: 29;
	width: 100vw;
	max-width: 100vw;
	margin-inline: calc(50% - 50vw);
	background: var(--hnp-surface);
	border-bottom: 1px solid var(--hnp-line);
	box-shadow: 0 18px 40px -28px rgba(14, 26, 38, 0.45);
}

.hnp-editor__shell {
	--hnp-shell: 100vw;
	padding-inline: max(16px, calc(50vw - var(--hnp-shell) / 2));
	padding-block: 20px 24px;
}

@media (min-width: 768px)  { .hnp-editor__shell { --hnp-shell: 750px; } }
@media (min-width: 1024px) { .hnp-editor__shell { --hnp-shell: 1000px; } }
@media (min-width: 1400px) { .hnp-editor__shell { --hnp-shell: 1270px; } }

.hnp-editor__title {
	margin: 0 0 14px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--hnp-gold);
}

.hnp-editor__slot {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 16px 24px;
}

.hnp-editor__slot > * { flex: 0 1 auto; min-width: 0; margin: 0; }

/* Stay type inside the location editor: the real HanoPalais dimension,
   kept without making the closed band any taller. */
.hnp-editor__slot .hnp-form__rental { flex: 1 1 100%; margin: 0 0 4px; }

.hnp-editor__foot {
	display: flex;
	justify-content: flex-end;
	margin-top: 18px;
}

.hnp-editor__apply {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding-inline: 28px;
	border: 0;
	border-radius: 999px;
	background: var(--hnp-navy);
	color: #ffffff;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

.hnp-editor__apply:focus-visible { outline: 2px solid var(--hnp-color-gold, #9a7b3f); outline-offset: 2px; }

.hnp-editor__backdrop {
	position: fixed;
	inset: 0;
	z-index: 28;
	background: rgba(14, 26, 38, 0.28);
}

@media (max-width: 767px) {

	.hnp-editor { top: 64px; }
	.hnp-editor__slot { gap: 14px 16px; }
	.hnp-editor__slot > * { flex: 1 1 100%; }
	.hnp-editor__foot { justify-content: stretch; }
	.hnp-editor__apply { width: 100%; }
}

/* The band's fields are <button> now, and the theme styles buttons with
   uppercase and letter-spacing — which turned the state line into
   "TẤT CẢ CƠ SỞ · QUA ĐÊM". The reference's values are normal case at
   14/400, so the button defaults are undone explicitly. */
.hnp-summary .hnp-summary__group,
.hnp-summary .hnp-summary__field,
.hnp-summary .hnp-summary__label,
.hnp-summary .hnp-summary__value {
	text-transform: none;
	letter-spacing: normal;
}

/* The band carries a bottom margin for the results below it. With the
   editor open that margin became a strip of backdrop between the band and
   its own panel. */
.hnp-editor { margin-top: calc(var(--hnp-gap) * -1); }

/* KVA-063: the brand and area filters are fieldsets on a white panel too; a legend
   left on the browser default straddled the panel's top edge ("Thương hiệu",
   "Khu vực" half outside the box). Same treatment as the price and suitable groups. */
.hnp-filters__panel fieldset.hnp-field > legend { float: left; width: 100%; padding: 0; margin: 0 0 10px; }
.hnp-filters__panel fieldset.hnp-field > legend + * { clear: both; }

/* KVA-082: the results count is now the list's heading (h2 between the page's h1
   and the Base cards' h3); it keeps the look it had as a paragraph. */
.hnp-results .hnp-results__header h2.hnp-results__count { margin: 0; font-family: inherit; font-size: 1rem; font-weight: 500; line-height: 1.2; letter-spacing: normal; text-transform: none; color: var(--hnp-navy); }

/* GLF-011: a deep-linked search with an impossible window says why, directly under the search band and on its measure. */
.hnp-form__error--band {
	width: min(var(--hnp-container, 1240px) - 2 * var(--hnp-gutter, 20px), 100% - 2 * var(--hnp-gutter, 20px));
	margin: 12px auto 0;
}

/* GLF-011: filters that match nothing. */
.hnp-results__nomatch {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 16px;
	margin-top: 12px;
	padding: 16px 20px;
	border: 1px solid var(--hnp-color-border, rgba(14, 26, 38, 0.12));
	border-radius: var(--hnp-radius-card, 12px);
	background: var(--hnp-color-surface, #fff);
}
.hnp-results__nomatch[hidden] { display: none; }
.hnp-results__nomatch p { margin: 0; flex: 1 1 240px; }
