/* Smart Search — houseinhanoi.vn (15/11/2026). Tab đang chọn vàng đồng #BD9D6D chữ trắng, tab còn lại be nhạt;
   khung trắng bo 10px + bóng mờ, ô gạch chân mảnh, nút vàng đồng. */

.hss {
	--hss-accent: #bd9d6d;
	--hss-accent-dark: #a5854f;
	--hss-ink: #161616;
	--hss-label: #181c23;
	--hss-muted: #7a7469;
	--hss-line: #ece6da;
	--hss-soft: #f7f2e9;
	--hss-shadow: 0 5px 70px rgba(38, 42, 76, .1);
	position: relative;
	width: 100%;
	max-width: 1080px;
	/* Bố cục theo độ rộng CHỖ ĐẶT widget (hero rộng / cột hẹp / sidebar), không theo độ rộng màn hình */
	container-type: inline-size;
	container-name: hss;
	font-family: inherit;
	color: var(--hss-ink);
	text-align: left;
}
.hss *, .hss *::before, .hss *::after { box-sizing: border-box; }
/* Thay form của theme (Elementor / sidebar): chiếm đủ chỗ của form cũ */
.hss-replaced { width: 100%; }
.hss-replaced .hss { margin: 0 auto; }
/* Thanh tìm kiếm dưới header của theme (thay #search_wrapper) */
.hss-header-search { position: relative; z-index: 5; padding: 24px 20px 8px; }
.hss-header-search__in { max-width: 1080px; margin: 0 auto; }
.hss [hidden] { display: none !important; }
.hss svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.hss button { font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; text-transform: none; letter-spacing: normal; }
.hss :focus-visible { outline: 2px solid var(--hss-accent); outline-offset: 2px; }

/* Tab Rent / Buy: tab đang chọn nền vàng đồng chữ trắng (nổi bật); tab còn lại nền be nhạt chữ nâu */
.hss__tabs { display: flex; gap: 4px; }
.hss .hss__tab { height: 46px; margin: 0; padding: 0 26px; border: 0; border-radius: 10px 10px 0 0; background: #f3ede2; color: #6b5a3e; font-size: 16px; font-weight: 500; line-height: 1; transition: background .15s, color .15s; }
.hss .hss__tab:hover { background: #ebe1cf; color: var(--hss-ink); }
.hss .hss__tab.is-on, .hss .hss__tab.is-on:hover { background: var(--hss-accent); color: #fff; }

/* Khung */
.hss__panel { position: relative; margin: 0; padding: 16px 20px 20px; border-radius: 0 10px 10px 10px; background: #fff; box-shadow: var(--hss-shadow); }
.hss__subs { display: flex; gap: 6px; margin: 0 0 12px; }
.hss .hss__sub { height: 30px; margin: 0; padding: 0 14px; border: 1px solid var(--hss-line); border-radius: 999px; background: #fff; color: var(--hss-label); font-size: 13px; font-weight: 500; }
.hss .hss__sub.is-on { border-color: var(--hss-accent); background: var(--hss-soft); color: var(--hss-ink); }

.hss__row { position: relative; display: grid; grid-template-columns: minmax(0, 2.2fr) repeat(3, minmax(0, 1fr)) auto; gap: 0 22px; align-items: end; }
.hss__field { position: relative; min-width: 0; }
.hss__label { display: block; margin: 0 0 4px; color: var(--hss-label); font-size: 13px; font-weight: 500; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hss__lbl-short { display: none; }

/* Ô vị trí */
.hss__input { display: flex; align-items: center; gap: 8px; height: 44px; border-bottom: 1px solid var(--hss-line); transition: border-color .15s; }
.hss__input:focus-within { border-color: var(--hss-accent); }
.hss__input > svg { color: var(--hss-accent); }
.hss .hss__input input { flex: 1; min-width: 0; height: 100%; margin: 0; padding: 0; border: 0; outline: 0; box-shadow: none; background: transparent; color: var(--hss-ink); font: inherit; font-size: 15px; }
.hss .hss__input input::placeholder { color: #9a9387; opacity: 1; }
.hss .hss__x { display: grid; place-items: center; width: 26px; height: 26px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: var(--hss-soft); color: var(--hss-muted); }
.hss .hss__x svg { width: 14px; height: 14px; }

/* Ô chọn */
.hss .hss__select { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; height: 44px; margin: 0; padding: 0; border: 0; border-bottom: 1px solid var(--hss-line); border-radius: 0; background: transparent; color: #8a8478; font-size: 15px; text-align: left; transition: border-color .15s; }
.hss .hss__select:hover, .hss__field.is-open .hss__select { border-color: var(--hss-accent); }
.hss__field.is-set .hss__select { color: var(--hss-ink); font-weight: 500; }
.hss__val { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hss__chev { width: 16px; height: 16px; color: var(--hss-muted); transition: transform .15s; }
.hss__field.is-open .hss__chev { transform: rotate(180deg); }

/* Nút tìm (vàng đồng; rê chuột: nền trắng chữ vàng — như trang chủ) */
.hss .hss__go { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 190px; height: 48px; margin: 0; padding: 0 22px; border: 1px solid var(--hss-accent); border-radius: 10px; background: var(--hss-accent); color: #fff; font-size: 15px; font-weight: 600; white-space: nowrap; transition: background .15s, color .15s; }
.hss .hss__go:hover { background: #fff; color: var(--hss-accent); }
.hss.is-empty .hss__go { opacity: .75; }

/* "More filters": phòng tắm, diện tích tối thiểu, Property ID */
/* Hàng thêm nằm trong lưới .hss__row, chiếm mọi cột trừ cột nút tìm → mở ra thì nút tìm xuống cạnh hàng thêm. */
.hss__extra { grid-column: 1 / -2; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 22px; max-width: 640px; margin-top: 16px; }
.hss .hss__extra input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.hss .hss__extra input::-webkit-outer-spin-button, .hss .hss__extra input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.hss .hss__more { display: inline-flex; align-items: center; gap: 6px; margin: 14px 0 0; padding: 0; border: 0; background: none; color: var(--hss-accent-dark); font-size: 13px; font-weight: 500; }
.hss .hss__more svg { width: 16px; height: 16px; }
.hss .hss__more:hover span { text-decoration: underline; text-underline-offset: 2px; }

/* Popover */
.hss__pop { position: absolute; z-index: 40; top: calc(100% + 10px); left: 0; min-width: 280px; max-width: min(420px, calc(100vw - 32px)); padding: 14px; border-radius: 12px; background: #fff; box-shadow: 0 12px 40px rgba(22, 22, 22, .16); }
.hss__field[data-pop="beds"] .hss__pop { left: auto; right: 0; }
.hss__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hss .hss__chip { height: 34px; margin: 0; padding: 0 14px; border: 1px solid var(--hss-line); border-radius: 999px; background: #fff; color: var(--hss-ink); font-size: 14px; white-space: nowrap; }
.hss .hss__chip:hover { border-color: var(--hss-accent); }
.hss .hss__chip.is-on { border-color: var(--hss-accent); background: var(--hss-accent); color: #fff; }
.hss__range { display: flex; gap: 10px; margin-top: 12px; }
.hss__range label { flex: 1; display: block; margin: 0; padding: 6px 10px; border: 1px solid var(--hss-line); border-radius: 8px; color: var(--hss-muted); font-size: 12px; }
.hss .hss__range input { display: block; width: 100%; margin: 0; padding: 2px 0 0; border: 0; outline: 0; box-shadow: none; background: transparent; color: var(--hss-ink); font: inherit; font-size: 15px; }
.hss__seg { display: flex; border: 1px solid var(--hss-line); border-radius: 10px; overflow: hidden; }
.hss .hss__seg button { flex: 1; height: 40px; margin: 0; padding: 0 12px; border: 0; border-right: 1px solid var(--hss-line); background: #fff; color: var(--hss-ink); font-size: 14px; }
.hss .hss__seg button:last-child { border-right: 0; }
.hss .hss__seg button.is-on { background: var(--hss-accent); color: #fff; }
.hss__wait { padding: 6px 2px; color: var(--hss-muted); font-size: 14px; }

/* Gợi ý vị trí */
.hss__suggest { width: max(100%, 340px); max-width: calc(100vw - 32px); max-height: 360px; overflow-y: auto; padding: 8px; }
.hss__group { padding: 8px 10px 4px; color: var(--hss-muted); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.hss__opt { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.hss__opt:hover, .hss__opt.is-active { background: var(--hss-soft); }
.hss__opt-l { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hss__opt-m { flex: none; color: var(--hss-muted); font-size: 12px; }
.hss__opt.is-project .hss__opt-m { color: var(--hss-accent-dark); font-weight: 500; }

/* Khung vừa (≤ 900px — cột nội dung, máy tính bảng): vị trí cả hàng, 3 ô chọn + nút hàng dưới */
@container hss (max-width: 900px) {
	.hss__row { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 14px 18px; }
	.hss__field--where { grid-column: 1 / -1; }
	.hss__extra { margin-top: 0; max-width: none; gap: 0 18px; }
}
/* Khung hẹp (≤ 560px — điện thoại, sidebar): tab chia đôi, 3 ô chọn 1 hàng, nút cả hàng; popover rộng bằng khung */
@container hss (max-width: 560px) {
	.hss .hss__tab { flex: 1; height: 42px; padding: 0 10px; font-size: 15px; }
	.hss__panel { padding: 12px 14px 14px; border-radius: 0 0 10px 10px; }
	.hss__row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 12px; }
	.hss__field { position: static; }
	.hss__label { font-size: 12px; }
	.hss__lbl-long { display: none; }
	.hss__lbl-short { display: inline; }
	.hss .hss__select, .hss .hss__input input { font-size: 14px; }
	.hss .hss__go { grid-column: 1 / -1; width: 100%; min-width: 0; }
	.hss__extra { grid-column: 1 / -1; gap: 12px; }
	.hss .hss__more { margin-top: 12px; }
	.hss__pop, .hss__field[data-pop="beds"] .hss__pop { left: 0; right: 0; min-width: 0; max-width: none; top: auto; margin-top: 8px; }
	.hss__field--where { position: relative; }
	.hss__suggest { top: calc(100% + 6px); margin-top: 0; width: auto; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
	.hss *, .hss *::before, .hss *::after { transition: none !important; }
}
