/* Điện thoại (≤ 849px): vùng chạm, cỡ chữ ô nhập, bảng cuộn ngang, form rộng hết khung. */

/* ---------- Điện thoại: chạm dễ, không bị phóng to khi nhập ---------- */
@media (max-width: 849px) {
	/* iOS tự phóng to trang khi ô nhập có chữ < 16px. */
	input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
	select,
	textarea {
		font-size: 16px !important;
	}
	/* Vùng bấm tối thiểu 44px: nút menu, mở bộ lọc, ô tick trong form tư vấn. */
	.fs-block-header button.fs-button {
		min-width: 44px;
		min-height: 44px;
	}
	.wc-block-product-filters__open-overlay {
		min-height: 44px;
	}
	.wpcf7 input[type="checkbox"],
	.wpcf7 input[type="radio"] {
		width: 22px;
		height: 22px;
		vertical-align: middle;
	}
	.wpcf7 .wpcf7-list-item {
		display: block;
		margin: 0 0 10px;
	}
	.wpcf7 .wpcf7-list-item label {
		display: inline-flex;
		align-items: center;
		gap: 10px;
		min-height: 44px;
	}
}

@media (max-width: 849px) {
	/* Bảng so sánh trong bài / danh mục / tour: cuộn ngang thay vì ép cột còn vài chữ một dòng. */
	.wp-block-post-content table,
	.noi-dung-bai-viet table,
	.wc-block-components-product-description table,
	.wp-block-woocommerce-product-description table {
		display: block;
		max-width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
	.wp-block-post-content table th,
	.wp-block-post-content table td,
	.noi-dung-bai-viet table th,
	.noi-dung-bai-viet table td,
	.wp-block-woocommerce-product-description table th,
	.wp-block-woocommerce-product-description table td {
		min-width: 140px;
		letter-spacing: 0 !important;
	}
	/* Bảng 2 cột (thông tin nhanh của tour) vẫn vừa màn hình. */
	.wp-block-post-content table tr > :first-child:nth-last-child(2),
	.wp-block-woocommerce-product-description table tr > :first-child:nth-last-child(2) {
		min-width: 110px;
	}
	.wp-block-woocommerce-product-description table tr > :last-child:nth-child(2),
	.wp-block-post-content table tr > :last-child:nth-child(2) {
		min-width: 0;
	}
	/* Form tư vấn: mọi ô rộng hết khung. */
	.wpcf7-form select,
	.wpcf7-form input[type="date"],
	.wpcf7-form input[type="text"],
	.wpcf7-form input[type="tel"],
	.wpcf7-form input[type="email"],
	.wpcf7-form input[type="number"],
	.wpcf7-form textarea {
		width: 100%;
		max-width: none;
	}
}

@media (max-width: 849px) {
	/* Màn hẹp: căn đều hai bên tạo khoảng trắng lớn giữa các từ → căn trái (style inline trong bài dùng justify). */
	.wp-block-post-content [style*="text-align: justify"],
	.noi-dung-bai-viet [style*="text-align: justify"],
	.wp-block-woocommerce-product-description [style*="text-align: justify"] {
		text-align: left !important;
	}
	/* Hàng nút Zalo / Gọi trên trang tour: xuống dòng khi không đủ chỗ, mỗi nút rộng đều. */
	.single-product .fs-block-flex:has(> a.fs-block-button[href^="tel:"]) {
		flex-wrap: wrap;
	}
	.single-product .fs-block-flex:has(> a.fs-block-button[href^="tel:"]) > a.fs-block-button {
		flex: 1 1 140px;
		justify-content: center;
	}
}
