/**
 * Dropdown gợi ý địa chỉ Goong (form Đăng cơ sở).
 * Đi kèm assets/js/goong-autocomplete.js — xem inc/geocode-goong.php.
 */

/* Neo dropdown bằng một lớp bọc RIÊNG quanh ô input (JS tự chèn).
 *
 * ⚠️ KHÔNG đặt position:relative lên .location-field-wrapper của theme: bên trong
 * nó có 2 phần tử absolute của theme neo vào ancestor xa —
 *   .cts-custom-get-location  (icon "vị trí của tôi", top:15px right:0)
 *   .delete-repeater-item     (nút xoá địa điểm, bottom:-42px)
 * đổi containing block sẽ dời cả hai (nút xoá tụt xuống dưới bản đồ). */
.tvdp-ac-anchor {
	position: relative;
	display: block;
}

.tvdp-ac-dropdown {
	position: absolute;
	/* Bám mép dưới ô input, không phụ thuộc chiều cao cố định. */
	top: 100%;
	margin-top: 2px;
	left: 0;
	right: 0;
	/* Bản đồ Leaflet dùng z-index tới 400 (pane) / 1000 (control).
	   Phải cao hơn để dropdown không bị map che. */
	z-index: 1200;
	max-height: 260px;
	overflow-y: auto;
	background: #fff;
	border: 1px solid #e4e8ee;
	border-radius: 6px;
	box-shadow: 0 6px 20px rgba(11, 74, 135, .14);
}

/* [hidden] cần !important vì display:block ở trên thắng thuộc tính hidden. */
.tvdp-ac-dropdown[hidden] {
	display: none !important;
}

.tvdp-ac-item {
	padding: 10px 14px;
	font-size: 14px;
	line-height: 1.45;
	color: var(--brand-deep);
	cursor: pointer;
	border-bottom: 1px solid #f2f4f7;
}

.tvdp-ac-item:last-child {
	border-bottom: 0;
}

.tvdp-ac-item:hover,
.tvdp-ac-item.active {
	background: #f5f8fc;
	color: var(--brand-blue-dark);
}

/* Dòng báo lỗi (nonce hết hạn / quá tải / Goong lỗi) — không chọn được. */
.tvdp-ac-message {
	padding: 10px 14px;
	font-size: 13.5px;
	line-height: 1.45;
	color: #7a8699;
}
