/* ==========================================================================
   ht-dnet —— 经销网络区块（点阵中国地图 + 名录 + 打码电话）
   依赖 design-tokens 四色纪律：红 #E61F18 / 石墨 #1B1B1D / 灰 / 白。
   场景：经销页 ht-section--gray 浅灰底 → 白卡片承载。
   ========================================================================== */

.ht-dnet {
	margin-top: 2.75rem;
}

/* 页首导语限宽：原先行宽约 76 个中文字（读起来太长），收到 34em ≈ 620px，左对齐不变 */
.ht-lede {
	max-width: 34em;
}

.ht-dnet__title {
	margin: 0 0 .6rem;
}

.ht-dnet__intro {
	max-width: 70ch;
	margin: 0;
}

/* 质保行：红侧条 + 白底，整宽与下方工具栏及地图面板左右齐平（红量纪律：仅侧条，不铺底） */
.ht-dnet__warranty {
	display: flex;
	align-items: center;
	width: 100%;
	box-sizing: border-box;
	margin: 1.1rem 0 0;
	padding: .65rem 1rem;
	background: #FFFFFF;
	border: 1px solid #E6E6E8;
	border-left: 3px solid #E61F18;
	border-radius: 2px;
	font-size: .95rem;
	color: #1B1B1D;
}

/* --- 布局：地图整幅居中放大，名录随后整幅铺开（Arono 2026-10-21：不并排） --- */
.ht-dnet__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 2rem;
	align-items: start;
	margin-top: 1.15rem;
}

/* --- 地图面板：整幅宽展示（Arono 2026-10-21：不与名录并排、铺满容器） --- */
.ht-dnet__mapwrap {
	margin: 0;
	max-width: none;
	background: #FFFFFF;
	border: 1px solid #E6E6E8;
	border-radius: 4px;
	padding: 1.5rem 1.5rem 1.25rem;
}

.ht-dnet__map {
	position: relative; /* pin 百分比坐标系 = 地图 img 本体 */
	width: 100%;
}

.ht-dnet__map > img {
	display: block;
	width: 100%;
	height: auto;
}

/* pin：34px 热区（整幅大地图上仍触控友好），红点 + 白圈叠在点阵上 */
.ht-dnet__pin {
	position: absolute;
	width: 34px;
	height: 34px;
	margin: -17px 0 0 -17px; /* 以坐标点为中心 */
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	transition: opacity .2s ease;
	-webkit-tap-highlight-color: transparent;
}

.ht-dnet__pin::before {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 12px;
	height: 12px;
	margin: -6px 0 0 -6px;
	border-radius: 50%;
	background: #E61F18;
	box-shadow: 0 0 0 2.5px #FFFFFF;
	transition: transform .15s ease;
}

.ht-dnet__pin:hover::before,
.ht-dnet__pin:focus-visible::before,
.ht-dnet__pin.is-active::before,
.ht-dnet__pin.is-match::before {
	transform: scale(1.35);
}

/* 搜索联动：命中 pin 放大高亮，未命中压暗 */
.ht-dnet__pin.is-match::before {
	transform: scale(1.45);
	box-shadow: 0 0 0 2.5px #FFFFFF, 0 0 0 5px rgba(230, 31, 24, .35);
}

.ht-dnet__pin.is-dim {
	opacity: .3;
}

/* 悬停提示（仅指针设备；触屏走点击联动名录） */
@media (hover: hover) {
	.ht-dnet__pin::after {
		content: attr(data-tip);
		position: absolute;
		left: 50%;
		bottom: calc(100% + 2px);
		transform: translateX(-50%);
		padding: .3rem .55rem;
		background: #1B1B1D;
		color: #FFFFFF;
		font-size: .78rem;
		line-height: 1.3;
		white-space: nowrap;
		border-radius: 2px;
		opacity: 0;
		pointer-events: none;
		transition: opacity .15s ease;
	}

	.ht-dnet__pin:hover::after,
	.ht-dnet__pin:focus-visible::after {
		opacity: 1;
	}
}

/* IP 属地命中：呼吸圈提示“你在这附近” */
.ht-dnet__pin.is-near::before {
	animation: ht-dnet-pulse 1.8s ease-out infinite;
}

@keyframes ht-dnet-pulse {
	0%   { box-shadow: 0 0 0 2.5px #FFFFFF, 0 0 0 0 rgba(230, 31, 24, .55); }
	70%  { box-shadow: 0 0 0 2.5px #FFFFFF, 0 0 0 14px rgba(230, 31, 24, 0); }
	100% { box-shadow: 0 0 0 2.5px #FFFFFF, 0 0 0 14px rgba(230, 31, 24, 0); }
}

/* --- 属地提示行 --- */
.ht-dnet__hint {
	margin: 0 0 .9rem;
	padding: .6rem .9rem;
	background: #FFFFFF;
	border: 1px solid #E6E6E8;
	border-left: 3px solid #E61F18;
	border-radius: 2px;
	font-size: .92rem;
}

.ht-dnet__hint a {
	font-weight: 600;
	color: #E61F18;
}

/* --- 搜索与定位工具栏：整宽铺满，与质保条及地图面板左右齐平，桌面同行并排 ---
   选择器用 .ht-dnet input.ht-dnet__filter——GeneratePress 对 input[type=search]
   有 (0,1,1) 权重的默认 padding/background，必须用更高权重压过，否则文字
   顶到最左与放大镜图标重叠。 */
.ht-dnet .ht-dnet__search {
	margin: .9rem 0 0;
	max-width: none;
	width: 100%;
}

.ht-dnet__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: .75rem;
	width: 100%;
}

.ht-dnet input.ht-dnet__filter {
	display: block;
	flex: 1 1 260px;
	min-width: 0;
	min-height: 48px;
	box-sizing: border-box;
	padding: .7rem 1.15rem .7rem 2.7rem;
	border: 1px solid #767676;
	border-radius: 2px;
	background-color: #FFFFFF;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236E6E73' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m20 20-4.4-4.4'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: 1rem 50%;
	font: inherit;
	font-size: max(1rem, 1em);
	color: #1B1B1D;
	/* 关掉浏览器原生 search 装饰：原生放大镜画在最左侧、且自带内边距，
	   会和自定义图标/占位文字叠在一起（Arono 2026-10-21 截图反馈） */
	-webkit-appearance: none;
	appearance: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.ht-dnet input.ht-dnet__filter::-webkit-search-cancel-button,
.ht-dnet input.ht-dnet__filter::-webkit-search-results-button {
	-webkit-appearance: none;
	appearance: none;
}

.ht-dnet input.ht-dnet__filter:focus {
	outline: none;
	border-color: #1B1B1D;
	box-shadow: 0 0 0 3px rgba(27, 27, 29, .08);
}

/* --- 属地定位按钮（点按才查 IP；服务端 hidden 渲染，无 JS 时整块不出现） --- */
.ht-dnet__geo {
	margin: 0;
	flex: 0 0 auto;
	display: flex;
}

.ht-dnet__geo[hidden] {
	display: none !important;
}

.ht-dnet__geobtn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	box-sizing: border-box;
	padding: 0 1.25rem 0 2.55rem;
	border: 1px solid #1B1B1D;
	border-radius: 2px;
	background-color: #FFFFFF;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231B1B1D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='7'/%3E%3Ccircle cx='12' cy='12' r='2.5'/%3E%3Cpath d='M12 2v3M12 19v3M2 12h3M19 12h3'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: 1rem 50%;
	color: #1B1B1D;
	font: inherit;
	font-size: max(1rem, 1em);
	font-weight: 500;
	line-height: 1.3;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.ht-dnet__geobtn:hover:not([disabled]) {
	background-color: #1B1B1D;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='7'/%3E%3Ccircle cx='12' cy='12' r='2.5'/%3E%3Cpath d='M12 2v3M12 19v3M2 12h3M19 12h3'/%3E%3C/svg%3E");
	color: #FFFFFF;
}

.ht-dnet__geobtn[disabled] {
	cursor: default;
	opacity: .55;
}

/* 查询失败 / 属地未覆盖：工具栏下方左对齐安静提示（role=status 同步播报） */
.ht-dnet__geomsg {
	margin: .55rem 0 0;
	text-align: left;
}

@media (pointer: coarse) {
	.ht-dnet input.ht-dnet__filter,
	.ht-dnet__geobtn {
		min-height: 52px;
	}
}

@media (max-width: 600px) {
	.ht-dnet__geo,
	.ht-dnet__geobtn {
		width: 100%;
	}
}

/* --- 名录 --- */
.ht-dnet__listlabel {
	margin: 0 0 .2rem;
}

.ht-dnet__region {
	margin: 1.15rem 0 .5rem;
	font-family: Oswald, "Noto Sans SC", sans-serif;
	font-size: .8rem;
	font-weight: 500;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--ht-gray-2); /* 浅灰底次要文字：原 #9E9E9F 仅 2.6:1 */
}

.ht-dnet__cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
	gap: .6rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ht-dnet__card {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: .35rem .7rem;
	padding: .75rem .95rem;
	background: #FFFFFF;
	border: 1px solid #E6E6E8;
	border-radius: 4px;
	transition: border-color .15s ease, background-color .15s ease;
}

.ht-dnet__card.is-active,
.ht-dnet__card.is-flash {
	border-color: #1B1B1D;
}

/* IP 属地命中卡片：红描边 + 极浅红晕（红量纪律：细描边即可） */
.ht-dnet__card.is-near {
	border-color: #E61F18;
	background: #FDF3F2;
}

.ht-dnet__company {
	font-weight: 600;
	color: #1B1B1D;
}

.ht-dnet__loc {
	margin-left: auto;
	font-size: .82rem;
	color: var(--ht-gray-2); /* 白卡片上的次要文字：原 #9E9E9F 仅 2.6:1 */
}

.ht-dnet__contact {
	flex-basis: 100%;
	font-size: .86rem;
	color: #6E6E73;
}

.ht-dnet__tel {
	margin-left: auto;
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	font-size: .88rem;
}

.ht-dnet__telnum {
	color: #1B1B1D;
	letter-spacing: .02em;
}

.ht-dnet__telnum.is-open {
	font-weight: 600;
}

/* 小号动作按钮（查看电话 / 拨打 / 复制） */
.ht-dnet__reveal,
.ht-dnet__call,
.ht-dnet__copy {
	padding: .22rem .7rem;
	border: 1px solid #1B1B1D;
	border-radius: 2px;
	background: transparent;
	color: #1B1B1D;
	font-size: .78rem;
	line-height: 1.5;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease;
}

.ht-dnet__reveal:hover,
.ht-dnet__copy:hover {
	background: #1B1B1D;
	color: #FFFFFF;
}

.ht-dnet__call {
	border-color: #E61F18;
	background: #E61F18;
	color: #FFFFFF;
	text-decoration: none;
}

.ht-dnet__call:hover {
	background: #c71710;
	border-color: #c71710;
}

.ht-dnet__copy.is-done {
	border-color: #1B1B1D;
	opacity: .75;
}

/* 扩展位（官网/社媒/地址，有值才出现） */
.ht-dnet__site,
.ht-dnet__social,
.ht-dnet__addr {
	flex-basis: 100%;
	font-size: .84rem;
}

.ht-dnet__site a,
.ht-dnet__site {
	color: #1B1B1D;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.ht-dnet__social,
.ht-dnet__addr {
	color: #6E6E73;
}

.ht-dnet__empty {
	margin: .8rem 0 0;
	font-size: .88rem;
	color: var(--ht-gray-2); /* 浅灰底次要文字：原 #9E9E9F 仅 2.6:1 */
}

.ht-dnet__privacy {
	margin: 1.2rem 0 0;
}

/* 键盘可达性 */
.ht-dnet__pin:focus-visible,
.ht-dnet__reveal:focus-visible,
.ht-dnet__copy:focus-visible,
.ht-dnet__geobtn:focus-visible,
.ht-dnet__filter:focus-visible {
	outline: 2px solid #E61F18;
	outline-offset: 2px;
}

/* --- 响应式 --- */
@media (max-width: 1023px) {
	.ht-dnet__search {
		max-width: none;
	}
}

/* 动效退化（红线：prefers-reduced-motion 全量退化） */
@media (prefers-reduced-motion: reduce) {
	.ht-dnet__pin::before {
		transition: none;
	}

	.ht-dnet__pin.is-near::before {
		animation: none;
		box-shadow: 0 0 0 3px #FFFFFF;
	}
}
