﻿@charset "utf-8";
/* ============================================================================
   移动端适配层（2026-11）
   原则：所有规则都在 @media 里，桌面端完全不受影响。
   目标：小屏下 1) 图片/表格不撑爆页面 2) 固定宽度容器自适应 3) 表单可点
   说明：这是"兼容层"，不是重排版；后台复杂表格采用横向滚动而不是改结构。
   ========================================================================== */

/* ---------- 平板及以下 ---------- */
@media screen and (max-width: 900px) {

	/* 媒体元素一律不超出父容器 */
	img,
	video,
	iframe,
	embed,
	object {
		max-width: 100% !important;
	}

	img {
		height: auto !important;
	}

	/* 宽表格：由容器横向滚动，表格保持原宽（不要压成 100%，否则 20 多列会挤成竖排文字） */
	.list {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		max-width: 100%;
	}

	.list table {
		max-width: none;
	}

	/* 没写死宽度的列表表格给个最小宽度，保证可读 */
	.list table:not([style*="width"]) {
		min-width: 760px;
	}

	/* 长英文/URL 不换行导致的溢出 */
	.content,
	.main {
		word-wrap: break-word;
		word-break: break-word;
	}
}

/* ---------- 手机 ---------- */
@media screen and (max-width: 768px) {

	/* 常见固定宽度容器（1200/1100/1000/970/820/730 …）改为自适应 */
	.w1200,
	.w1100,
	.w1000,
	.pagewrap,
	.container,
	.wrap,
	.selist,
	.list-left,
	.list-cn,
	.d_maif,
	.d_main,
	.d_ser,
	.boxHot,
	.hot,
	.search-box,
	.j_bantit {
		width: auto !important;
		max-width: 100% !important;
		float: none !important;
	}

	/* 左右分栏 → 上下堆叠 */
	.list-left,
	.list-right,
	.sidebar,
	.side {
		width: 100% !important;
		float: none !important;
	}

	/* 顶部导航：换行，不再横向挤出屏幕 */
	.nav,
	.nav ul,
	.foot-nav {
		width: 100% !important;
		float: none !important;
		text-align: center;
	}

	.nav li,
	.nav ul li {
		float: none !important;
		display: inline-block;
		margin: 0 6px;
	}

	/* 表单控件铺满，方便手指点 */
	input[type="text"],
	input[type="password"],
	input[type="tel"],
	input[type="number"],
	input[type="email"],
	input[type="search"],
	select,
	textarea {
		max-width: 100% !important;
		box-sizing: border-box;
	}

	/* 40px 以下的可点区域偏小 */
	input[type="button"],
	input[type="submit"],
	button {
		min-height: 34px;
	}

	/* 列表页的两列/三列卡片改为单列（仅对带图片的房源卡片生效） */
	.list-cn li {
		width: 100% !important;
		float: none !important;
	}

	/* 轮播/横幅里的绝对定位文字，缩小字号避免溢出 */
	.j_bantit p {
		font-size: 14px;
		margin-top: 10px;
	}
}

/* ---------- 小屏手机 ---------- */
@media screen and (max-width: 480px) {

	body {
		font-size: 14px;
	}

	/* 页脚链接换行更紧凑 */
	.foot-nav a {
		padding: 0 6px;
		border-right: none;
	}

	/* 表格字号略小，一屏能看到更多列 */
	.content table,
	.main table,
	form table {
		font-size: 12px;
	}

	/* 后台/经纪人端的操作按钮组换行 */
	.operate,
	.btn-group {
		white-space: normal;
	}
}

/* 触屏设备：去掉 hover 依赖的交互提示造成的高亮残留 */
@media (hover: none) {

	a:hover,
	input:hover {
		text-decoration: none;
	}
}

/* ============================================================================
   经纪人端（client/index.aspx）：顶部图片精灵菜单在窄屏被裁掉，单独处理
   原结构：.hright 固定 730px，ul 用 mou.png 精灵图，li 文字 opacity:0
   ========================================================================== */
@media screen and (max-width: 900px) {

	body.skin_def #head {
		height: auto !important;
	}

	body.skin_def #head .hleft {
		width: 100% !important;
		height: auto !important;
		float: none !important;
		overflow: visible !important;
	}

	body.skin_def #head .hright {
		width: 100% !important;
		height: auto !important;
		float: none !important;
		overflow: visible !important;
	}

	/* 去掉精灵图，改成可换行的文字按钮 */
	body.skin_def #head .hright ul {
		width: 100% !important;
		height: auto !important;
		float: none !important;
		background: none !important;
		display: flex !important;
		flex-wrap: wrap;
		margin-top: 4px;
	}

	body.skin_def #head .hright ul li {
		opacity: 1 !important;
		float: none !important;
		flex: 1 1 22%;
		width: auto !important;
		height: 36px !important;
		line-height: 36px !important;
		padding: 0 !important;
		margin: 3px;
		text-align: center;
		font-size: 14px;
		color: #0a6ebd !important;
		background: #eaf3fb;
		border: 1px solid #cfe3f5;
		border-radius: 4px;
		text-shadow: none;
	}

	/* 子菜单原本是 JS 绝对定位浮层，窄屏改为文档流，点开后在菜单下方展开 */
	body.skin_def .nav {
		position: static !important;
		left: auto !important;
		top: auto !important;
		width: 100% !important;
		padding-top: 0 !important;
		box-shadow: none !important;
	}

	body.skin_def .nav li {
		width: auto !important;
		height: 36px;
		line-height: 36px;
		padding-left: 14px;
		margin-bottom: 2px;
		border-bottom: 1px solid #e5e5e5;
	}

	/* 顶部条与选项卡压缩一点，给内容留高度 */
	body.skin_def #head #bar {
		height: 10px;
	}
}

@media screen and (max-width: 900px){ body.skin_def .nav li { display:block !important; float:none !important; text-align:left; } }

/* ============================================================================
   房源编辑表单（client/FangYuan/Editor*.aspx、admin_goods_edit*.aspx）
   原结构：.form dt { float:left; width:11% } .form dd { float:left }
   窄屏下 11% 只有 40 多像素，标签被挤成两行、输入框只剩一条缝
   ========================================================================== */
@media screen and (max-width: 900px) {

	.form dl {
		padding-top: 8px;
	}

	/* 标签独占一行 */
	.form dt {
		float: none !important;
		display: block !important;
		width: auto !important;
		font-size: 13px;
		padding: 0 0 3px 0 !important;
	}

	/* 控件区独占一行 */
	.form dd {
		float: none !important;
		display: block !important;
		width: auto !important;
		line-height: 26px;
	}

	/* 文本框：无固定宽度的铺满整行；Width="60" 的（面积/单价等）保持行内小框 */
	.form dd input.inp_large,
	.form dd textarea {
		display: inline-block;
		width: 100%;
		min-width: 76px;
		margin: 2px 0;
		box-sizing: border-box;
	}

	.form dd input[type="text"],
	.form dd input[type="password"],
	.form dd select {
		max-width: 100%;
		box-sizing: border-box;
		min-height: 30px;
	}

	/* 多选控件之间允许换行 */
	.form dd select {
		margin: 2px 4px 2px 0;
	}

	/* 表单底部按钮居中铺开 */
	.form .subform input,
	.form .subform button {
		min-width: 88px;
		min-height: 34px;
		margin: 3px;
	}

	/* 富文本编辑器高度略降，给手机留出滚动空间 */
	.form .ke-container {
		max-width: 100% !important;
	}
}

/* ============================================================================
   表单细节打磨（2026-11-17 第二轮）
   - 下拉框铺满一行（原来只有 60~90px，手机上很难点）
   - dd 改成 flex 换行容器，文字与短输入框能自然折行
   - 富文本工具栏允许换行，不横向溢出
   ========================================================================== */
@media screen and (max-width: 900px) {

	/* 标签更清晰、间距收紧 */
	.form dt {
		font-weight: 600;
		color: #333;
	}

	.form dl {
		padding-top: 10px;
	}

	/* 控件区：块级布局，文字与短输入框按行内流自然折行 */
	.form dd {
		display: block !important;
		line-height: 34px;
	}

	/* 下拉框：整行铺满，高度统一 */
	.form dd select {
		display: block;
		width: 100% !important;
		max-width: 100% !important;
		height: 32px;
		margin: 2px 0;
		box-sizing: border-box;
		border-radius: 4px;
	}

	/* 短文本框（编号、面积、单价…）：行内小宽度，跟着文字走，自动折行 */
	.form dd input[type="text"]:not(.inp_large),
	.form dd input[type="password"]:not(.inp_large) {
		display: inline-block !important;
		width: 90px !important;
		min-width: 0 !important;
		max-width: 40%;
		height: 30px;
		margin: 2px 4px;
		box-sizing: border-box;
		border-radius: 4px;
	}

	/* 行内文字与控件垂直居中（只作用于控件，避免影响多行文本） */
	.form dd select,
	.form dd input {
		line-height: 30px;
	}

	/* 富文本工具栏：允许换行、缩小按钮间距 */
	.ke-toolbar {
		white-space: normal !important;
		height: auto !important;
		max-width: 100% !important;
	}

	.ke-toolbar-item {
		margin: 1px !important;
	}

	.ke-container {
		max-width: 100% !important;
	}
}

@media screen and (max-width: 900px) {
	/* dd 里如果有列表/表格（图片列表、多选框等），让它们占满整行，别被 flex 压窄 */
	.form dd > ul,
	.form dd > table,
	.form dd > div {
		flex: 1 1 100%;
		max-width: 100%;
	}
}
/* ============================================================================
   列表页顶部搜索条（.operate）：窄屏下允许换行、输入框不撑破
   ========================================================================== */
@media screen and (max-width: 900px) {

	.operate,
	.operate .left_pad {
		width: auto !important;
		max-width: 100%;
		box-sizing: border-box;
	}

	.operate input[type="text"],
	.operate input[type="password"],
	.operate select {
		max-width: 100%;
		box-sizing: border-box;
		min-height: 32px;
		margin: 2px 4px 2px 0;
	}

	.operate .btn_blue,
	.operate input[type="submit"],
	.operate input[type="button"] {
		min-height: 34px;
		margin: 2px 4px 2px 0;
	}
}
