/**
 * Nova Tour — element "Chọn vị trí" ( travel-location ): nút ở header, popover chọn điểm khởi hành,
 * khung mời lần đầu, thông báo nhỏ. Tệp tự đủ ( trang chỉ có header vẫn không nạp travel.css ):
 * màu theo --nt-* khi có, không thì theo --nova-color-* / bản vẽ travel.com.vn ( BAN-VE.md mục 0, 1 ).
 */

.nt-loc, .nt-loc-pop, .nt-loc-inv, .nt-loc-toast {
	--l-primary: var(--nt-primary, var(--nova-color-primary, #0046c1));
	--l-soft: var(--nt-soft, #d9eeff);
	--l-text: var(--nt-text, var(--nova-color-heading, #000e1a));
	--l-muted: var(--nt-muted-2, #636363);
	--l-page: var(--nt-page, #f7f7f7);
	--l-line: var(--nt-line, #dddddd);
	box-sizing: border-box;
}
.nt-loc *, .nt-loc-pop *, .nt-loc-inv * { box-sizing: border-box; }
.nt-loc-pop[hidden], .nt-loc-pop [hidden], .nt-loc-toast[hidden] { display: none !important; }

.nt-loc button, .nt-loc-pop button, .nt-loc-inv button {
	-webkit-appearance: none; appearance: none; margin: 0; border: 0; background: none; box-shadow: none;
	font: inherit; color: inherit; text-transform: none; letter-spacing: inherit; cursor: pointer; min-height: 0;
}
.nt-loc-ic { flex: none; display: block; }

/* ---------- Nút ở header ---------- */
.nt-loc { display: inline-flex; position: relative; min-width: 0; color: var(--l-text); }
.nt-loc__btn {
	display: inline-flex; align-items: center; gap: 6px; min-height: 40px; max-width: 100%; padding: 8px 6px;
	border-radius: 40px; font-size: 14px; line-height: 20px; font-weight: 500; white-space: nowrap;
	transition: background-color .15s ease;
}
.nt-loc .nt-loc__btn:hover, .nt-loc__btn[aria-expanded="true"] { background: var(--l-page); }
.nt-loc__btn:focus-visible { outline: 2px solid var(--l-primary); outline-offset: 2px; }
.nt-loc__txt { display: inline-flex; flex-direction: column; align-items: flex-start; min-width: 0; text-align: left; }
.nt-loc__hint { font-size: 11px; line-height: 14px; font-weight: 500; color: var(--l-muted); }
.nt-loc__name { display: block; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.nt-loc.is-set .nt-loc__name { font-weight: 600; }

/* Laptop: header còn menu ngang nên chật — bỏ mũi tên, tên ngắn lại ( kiểu "short" ). */
@media (min-width: 768px) and (max-width: 1439px) {
	.nt-loc--m-short .nt-loc__btn > .nt-loc-ic:last-child { display: none; }
	.nt-loc--m-short .nt-loc__name { max-width: 64px; }
}
/* Tới 1399px ( không chỉ 1365 ): c3 09/10 đo 1366–1379px thêm nút Ngôn ngữ + Tiền tệ là menu xuống dòng. */
@media (min-width: 768px) and (max-width: 1399px) {
	.nt-loc--m-short .nt-loc__txt { display: none; }
	.nt-loc--m-short .nt-loc__btn { padding: 8px; }
}

/* Nút Đăng nhập ( element account của Nova ) cạnh nút vị trí trong header skin travel-2 ( class nt-hd-acc ):
   chữ không gãy dòng; dưới 1536px chỉ còn icon để menu ngang giữ một dòng ( đo: 1440 có chữ là menu xuống dòng ). */
.nt-hd-acc .nova-acc__label { white-space: nowrap; }
@media (min-width: 768px) and (max-width: 1535px) {
	.nt-hd-acc .nova-acc__label { display: none; }
	.nt-hd-acc .nova-acc__btn--row { width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 50%; }
}

/* Nút Ngôn ngữ + Tiền tệ ( element lang-currency của Nova, class nt-hd-lc ) trong header skin travel-2: dưới 1680px
   chỉ còn cờ ( bỏ mã tiền + mũi tên ) để menu ngang giữ một dòng — mã tiền vẫn thấy trong bảng chọn. */
@media (min-width: 768px) and (max-width: 1679px) {
	.nt-hd-lc .nova-lc__txt, .nt-hd-lc .nova-lc__chev { display: none; }
	.nt-hd-lc .nova-lc__btn { padding-left: 8px; padding-right: 8px; }
}

/* 1200–1365px: thêm nút Ngôn ngữ + Tiền tệ thì thiếu ~50px — ẩn nút Đăng nhập ( vẫn có trong bảng menu ☰ ). */
@media (min-width: 1200px) and (max-width: 1365px) {
	.nt-hd-acc { display: none !important; }
}

/* 1200–1279px: Nova chỉ có mốc laptop ≤ 1199px ( menu thu vào nút ), nên khoảng này menu ngang còn hiện mà thiếu
   ~110px. Thu logo, ô tìm kiếm ( 150px: nhỏ hơn là cắt chữ "Tìm kiếm" ), dưới 1240px thu thêm khoảng cách / cỡ chữ
   menu ( class nt-hd-logo / nt-hd-search / nt-hd-menu ). !important vì CSS control của Nova
   gắn theo #id của element, class nào cũng thua. */
@media (min-width: 1200px) and (max-width: 1279px) {
	.nt-hd-logo img { max-height: 34px !important; }
	.nt-hd-search { width: 150px !important; }
}
@media (min-width: 1200px) and (max-width: 1239px) {
	.nt-hd-logo img { max-height: 30px !important; }
	.nt-hd-menu .nova-menu { gap: 6px !important; }
	.nt-hd-menu .nova-menu a { font-size: 13px !important; }
}

@media (max-width: 767px) {
	.nt-loc--m-short .nt-loc__name { max-width: 84px; }
	.nt-loc--m-short .nt-loc__hint { display: none; }
	.nt-loc--m-icon .nt-loc__txt, .nt-loc--m-icon .nt-loc__btn > .nt-loc-ic:last-child { display: none; }
	.nt-loc--m-icon .nt-loc__btn { padding: 8px; }
}

/* ---------- Popover ( ra <body> khi mở ) ---------- */
.nt-loc-pop {
	position: fixed; top: 72px; left: 8px; z-index: 100000; display: flex; flex-direction: column; gap: 12px;
	width: 340px; max-width: calc(100vw - 16px); max-height: min(520px, calc(100vh - 96px)); padding: 16px;
	background: #fff; color: var(--l-text); border-radius: 16px; box-shadow: 0 8px 32px rgba(0, 0, 0, .18);
	font-family: var(--nova-font-body, inherit); font-size: 14px; line-height: 20px; outline: none;
}
.nt-loc-pop.is-sheet {
	top: auto; left: 0; right: 0; bottom: 0; width: auto; max-width: none; max-height: 80vh;
	border-radius: 20px 20px 0 0; padding-bottom: max(16px, env(safe-area-inset-bottom));
}
.nt-loc-pop__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nt-loc-pop__title { margin: 0; font-size: 16px; line-height: 24px; font-weight: 700; }
.nt-loc-pop .nt-loc-pop__x { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--l-muted); }
.nt-loc-pop .nt-loc-pop__x:hover { background: var(--l-page); }
.nt-loc-pop .nt-loc-pop__geo {
	display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 44px; padding: 10px 16px;
	border-radius: 40px; background: var(--l-soft); color: var(--l-primary); font-weight: 600;
}
.nt-loc-pop .nt-loc-pop__geo:disabled, .nt-loc-inv .nt-loc-inv__geo:disabled { cursor: progress; opacity: .85; }
[data-nt-loc-geo][aria-busy="true"]::after {
	content: ""; flex: none; width: 14px; height: 14px; margin-left: 6px; border: 2px solid currentColor; border-right-color: transparent;
	border-radius: 50%; display: inline-block; vertical-align: -2px; animation: nt-loc-spin .8s linear infinite;
}
@keyframes nt-loc-spin { to { transform: rotate(360deg); } }
.nt-loc-pop__msg { margin: -4px 0 0; font-size: 13px; line-height: 18px; color: #b42318; }
.nt-loc-pop__msg:empty { display: none; }
.nt-loc-pop__q { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 40px; background: var(--l-page); color: var(--l-muted); }
.nt-loc-pop__q input {
	flex: 1; min-width: 0; height: 100%; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; outline: none;
	font: inherit; font-size: 16px; color: var(--l-text);
}
.nt-loc-pop__q:focus-within { box-shadow: 0 0 0 2px var(--l-primary); }
.nt-loc-pop__list { flex: 1 1 auto; min-height: 0; margin: 0; padding: 0; list-style: none; overflow-y: auto; overscroll-behavior: contain; }
.nt-loc-pop__list li { margin: 0; padding: 0; }
.nt-loc-pop .nt-loc-pop__opt {
	display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 44px; padding: 10px 12px;
	border-radius: 8px; text-align: left; font-weight: 500;
}
.nt-loc-pop .nt-loc-pop__opt:hover, .nt-loc-pop .nt-loc-pop__opt:focus-visible { background: var(--l-page); outline: none; }
.nt-loc-pop .nt-loc-pop__opt[aria-pressed="true"] { color: var(--l-primary); font-weight: 700; }
.nt-loc-pop__opt[aria-pressed="true"]::after {
	content: ""; width: 6px; height: 11px; margin-right: 4px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.nt-loc-pop__none { margin: 0; padding: 8px 12px; color: var(--l-muted); }

/* ---------- Khung mời lần đầu ( không chặn trang ) ----------
   z-index 115: trên nội dung, DƯỚI mọi lớp khách tự mở ( sheet lọc 125/130, hộp thoại 140, lịch, menu điện thoại
   của theme ) — khung mời không được che nút Xác nhận / Đặt ngay. Máy tính: góc phải dưới header, cạnh nút vị trí
   ( góc trái dưới đè lên thanh lọc ); điện thoại: đáy màn hình. */
.nt-loc-inv {
	position: fixed; top: calc(76px + var(--wp-admin--admin-bar--height, 0px)); right: 24px; z-index: 115; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px 10px;
	width: 340px; max-width: calc(100vw - 32px); padding: 14px 40px 14px 14px; background: #fff; color: var(--l-text);
	border-radius: 16px; box-shadow: 0 8px 32px rgba(0, 0, 0, .18); font-family: var(--nova-font-body, inherit); font-size: 14px; line-height: 20px;
	animation: nt-loc-in .25s ease-out;
}
.nt-loc-inv__ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--l-soft); color: var(--l-primary); }
.nt-loc-inv__t { margin: 0; font-size: 15px; font-weight: 700; }
.nt-loc-inv__a { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.nt-loc-inv .nt-loc-inv__geo, .nt-loc-inv .nt-loc-inv__pick {
	flex: 1 1 auto; min-height: 40px; padding: 8px 14px; border-radius: 40px; font-weight: 600; white-space: nowrap;
}
.nt-loc-inv .nt-loc-inv__geo { background: var(--l-primary); color: #fff; }
.nt-loc-inv .nt-loc-inv__pick { background: var(--l-soft); color: var(--l-primary); }
.nt-loc-inv .nt-loc-inv__x {
	position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
	font-size: 22px; line-height: 1; color: var(--l-muted);
}
.nt-loc-inv .nt-loc-inv__x:hover { background: var(--l-page); }
.nt-loc-inv button:focus-visible, .nt-loc-pop button:focus-visible { outline: 2px solid var(--l-primary); outline-offset: 2px; }

@media (max-width: 767px) {
	.nt-loc-inv { top: auto; left: 12px; right: 12px; bottom: 12px; width: auto; max-width: none; }
	/* Trang có thanh đáy: đứng trên thanh, không che và không bị che. */
	body:has(.nt-fpill) .nt-loc-inv { bottom: 76px; }
	body:has(.nt-bar) .nt-loc-inv { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
}
/* Sheet mở tại chỗ ( thanh lọc, lịch khởi hành ) nằm trong section của theme ( z-index 1 ) nên không phủ được khung
   mời gắn ở <body>: ẩn khung mời trong lúc khách đang dùng sheet. */
body:has(.nt-filter-wrap.is-open) .nt-loc-inv, body:has(.nt-dep.is-open) .nt-loc-inv { visibility: hidden; }
/* Trang khách đang điền ( đặt chỗ, yêu cầu tư vấn, tài khoản ): không mời chọn vị trí — khung mời đè lên form. */
body:has(.nt-bk) .nt-loc-inv, body:has(.nt-acc) .nt-loc-inv { display: none; }
/* Lớp phủ của theme ( đăng nhập, menu điện thoại, popup ) có nền mờ thấp hơn 115: khung mời đừng sáng trên nền đó. */
body:has(.nova-acc-pop:not([hidden])) .nt-loc-inv, body:has(.nova-mobile-menu.is-open) .nt-loc-inv, body:has(.nova-popup.is-open) .nt-loc-inv { visibility: hidden; }
@media (max-width: 782px) {
	body:has(.nt-bk:not(.nt-bk--done) .nt-bk__bar) .nt-loc-inv { top: auto; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}

.nt-loc-toast {
	position: fixed; left: 50%; bottom: 24px; z-index: 100001; transform: translateX(-50%); max-width: calc(100vw - 32px);
	padding: 10px 18px; border-radius: 40px; background: #191919; color: #fff; font-size: 14px; line-height: 20px; text-align: center;
	box-shadow: 0 4px 16px rgba(0, 0, 0, .2);
}

@keyframes nt-loc-in { from { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) { .nt-loc-inv { animation: none; } }
