/**
 * reset.css - 全局样式重置与工具类库
 * 功能: 提供跨浏览器一致的默认样式和常用工具类
 * 特性: 移动端适配、Flex布局、常用工具类、自定义组件样式
 */

/* ==================== 全局重置与盒模型设置 ==================== */

/**
 * 全局盒模型设置
 * 统一使用border-box盒模型，便于尺寸计算
 */
*,
*:before,
*:after {
	-moz-box-sizing: border-box;   /* Firefox 兼容 */
	-webkit-box-sizing: border-box;   /* Safari 兼容 */
	box-sizing: border-box;   /* 标准语法 */
}

/**
 * 禁止文本大小自动调整
 * 确保移动端字体显示一致性
 */
html {
	-webkit-text-size-adjust: none; 
	-ms-text-size-adjust: none;
}

/**
 * 主体样式设置
 * 移动端适配：最小320px，最大750px宽度限制
 */
body {
	background-color: #f7f7fa;
	font: 12px/1.5 "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif;
	margin: 0 auto;
	padding: 0;
	min-width: 320px;
	max-width: 750px;
	height: 100%;
	width: 100%;
}

/**
 * 溢出隐藏类
 * 用于禁止页面滚动等场景
 */
body.overflow {
	overflow: hidden;
}

/* ==================== 元素默认样式重置 ==================== */

/**
 * 常用元素内外边距重置
 */
p, ul, ol, dl, dd, h1, h2, h3, h4, h5, h6, img, label, input, button, textarea, select, form {
	margin: 0; 
	padding: 0;
}

/**
 * 标题和强调元素样式重置
 */
h1, h2, h3, h4, h5, h6, em, i, th, caption {
	font-style: normal;
	font-weight: normal;
}

/**
 * 图片边框重置
 */
img {
	border: 0;
}

/**
 * 链接样式重置
 */
a {
	color: inherit; 
	text-decoration: none;
}

/**
 * 链接内图片垂直对齐
 */
a img {
	vertical-align: top;
}

/**
 * 列表样式重置
 */
ul, ol, li {
	list-style: none;
}

/**
 * 表单元素样式重置
 */
input, textarea {
	border-radius: 0;
	outline: none;
}

/**
 * 复选框和单选框内边距重置
 */
input[type="checkbox"], 
input[type="radio"] {
	box-sizing: border-box;
	padding: 0;
}

/**
 * 表格样式重置
 */
table {
	border-collapse: collapse;
	border-spacing: 0;
}

/**
 * 表格单元格内边距重置
 */
th, td {
	padding: 0;
}

/* ==================== 移动端交互优化 ==================== */

/**
 * 去除移动端点击高亮效果
 */
a, button, input, label, li {
	-webkit-tap-highlight-color: transparent; 
	outline: none;
}

/* ==================== 布局工具类 ==================== */

/**
 * 清除浮动（占位方式）
 */
.clearfix:after {
	content: ""; 
	clear: both; 
	display: block;
}

/**
 * 清除浮动（不占位方式）
 */
.cls {
	content: "";
	clear: both;
	height: 0px !important;
	line-height: 0px !important;
	font-size: 0px !important;
	overflow: hidden;
}

/* ==================== 文本处理工具类 ==================== */

/**
 * 多行文本截断（CSS3方式）
 */
.clamp1, .clamp2, .clamp3 {
	display: -webkit-box !important; 
	overflow: hidden; 
	-webkit-box-orient: vertical;
}

.clamp1 {
	-webkit-line-clamp: 1;
}

.clamp2 {
	-webkit-line-clamp: 2;
}

.clamp3 {
	-webkit-line-clamp: 3;
}

/**
 * 单行文本截断
 */
.ellipsis {
	overflow: hidden; 
	text-overflow: ellipsis; 
	white-space: nowrap;
}

/* ==================== 通用布局类 ==================== */

/**
 * 垂直对齐类
 */
.v__top {
	vertical-align: top !important;
}

.v__middle {
	vertical-align: middle !important;
}

/**
 * 图片最大宽度限制
 */
.max__img {
	display: block;
	margin: 0 auto;
	max-width: 100%;
	vertical-align: top;
}

/**
 * 浮动类
 */
.fl {
	float: left !important;
}

.fr {
	float: right !important;
}

/**
 * 显示控制类
 */
.hide {
	display: none !important;
}

.w100 {
	width: 100%;
}

.db {
	display: block !important;
}

.dib {
	display: inline-block !important;
	*zoom: 1; 
	*display: inline; /* IE6/7兼容 */
}

/**
 * 定位类
 */
.pos-rel {
	position: relative;
}

.pos-abs {
	position: absolute;
}

/**
 * 文本对齐类
 */
.align-l {
	text-align: left !important;
}

.align-c {
	text-align: center !important;
}

.align-r {
	text-align: right !important;
}

/* ==================== 字体大小工具类 ==================== */

/**
 * 基于rem的字体大小类（移动端适配）
 */
.fs-20 {
	font-size: .2rem !important;
}

.fs-24 {
	font-size: .24rem !important;
}

.fs-26 {
	font-size: .26rem !important;
}

.fs-28 {
	font-size: .28rem !important;
}

.fs-30 {
	font-size: .3rem !important;
}

.fs-32 {
	font-size: .32rem !important;
}

.fs-36 {
	font-size: .36rem !important;
}

.fs-40 {
	font-size: .4rem !important;
}

/* ==================== 字体家族工具类 ==================== */

/**
 * 常用字体族设置
 */
.ff-vd {
	font-family: Verdana;
}

.ff-gg {
	font-family: Georgia;
}

.ff-hv {
	font-family: Helvetica;
}

.ff-ss {
	font-family: sans-serif;
}

.ff-ms {
	font-family: "Microsoft Yahei";
}

.ff-ar {
	font-family: Arial;
}

.ff-ab {
	font-family: Arial Black;
}

.ff-st {
	font-family: 宋体;
}

/* ==================== 间距工具类 ==================== */

/**
 * 外边距工具类（基于rem单位）
 */
.mt-5 { margin-top: .05rem; }
.mt-10 { margin-top: .1rem; }
.mt-15 { margin-top: .15rem; }
.mt-20 { margin-top: .2rem; }
.mt-30 { margin-top: .3rem; }

.mb-10 { margin-bottom: .1rem; }
.mb-15 { margin-bottom: .15rem; }
.mb-20 { margin-bottom: .2rem; }
.mb-30 { margin-bottom: .3rem; }

.ml-10 { margin-left: .1rem; }
.ml-15 { margin-left: .15rem; }
.ml-20 { margin-left: .2rem; }
.ml-30 { margin-left: .3rem; }

.mr-10 { margin-right: .1rem; }
.mr-15 { margin-right: .15rem; }
.mr-20 { margin-right: .2rem; }
.mr-30 { margin-right: .3rem; }

/**
 * 内边距工具类（基于rem单位）
 */
.pt-10 { padding-top: .1rem; }
.pt-15 { padding-top: .15rem; }
.pt-20 { padding-top: .2rem; }
.pt-30 { padding-top: .3rem; }

.pb-10 { padding-bottom: .1rem; }
.pb-15 { padding-bottom: .15rem; }
.pb-20 { padding-bottom: .2rem; }
.pb-30 { padding-bottom: .3rem; }

.pl-10 { padding-left: .1rem; }
.pl-15 { padding-left: .15rem; }
.pl-20 { padding-left: .2rem; }
.pl-30 { padding-left: .3rem; }

.pr-10 { padding-right: .1rem; }
.pr-15 { padding-right: .15rem; }
.pr-20 { padding-right: .2rem; }
.pr-30 { padding-right: .3rem; }

/**
 * 复合边距工具类（历史兼容）
 */
.mar10 { padding: .1rem; }
.mar15 { padding: .15rem; }
.mar20 { padding: .2rem; }
.mar30 { padding: .3rem; }

.pad10 { padding: .1rem; }
.pad15 { padding: .15rem; }
.pad20 { padding: .2rem; }
.pad30 { padding: .3rem; }

/* ==================== 颜色工具类 ==================== */

/**
 * 背景色工具类
 */
.bg-fff { background: #fff; }
.bg-f8f8f8 { background: #f8f8f8; }
.bg-fed846 { background: #fed846; }
.bg-12b7f5 { background: #12b7f5; }
.bg-ffba00 { background: #ffba00; }
.bg-fbf9fe { background: #fbf9fe; }
.bg-dccda0 { background: #dccda0; }
.bg-373a3f { background: #373a3f; }

/**
 * 文字颜色工具类
 */
.c-fff { color: #fff; }
.c-aaa { color: #aaa; }
.c-ccc { color: #ccc; }
.c-333 { color: #333; }
.c-666 { color: #666; }
.c-999 { color: #999; }
.c-f90 { color: #f90; }
.c-45c00c { color: #45c00c; }

/* ==================== 表单元素样式定制 ==================== */

/**
 * 输入框占位符颜色统一
 */
::-webkit-input-placeholder { color: #999; }
:-moz-placeholder { color: #999; }
::-moz-placeholder { color: #999; }
:-ms-input-placeholder { color: #999; }

/* ==================== Flex布局工具类 ==================== */

/**
 * Flex容器基础类（多浏览器兼容）
 */
.flexbox {
	display: -webkit-box;
	display: -webkit-flex;
	display: flex;
	display: -ms-flexbox;
}

/**
 * 交叉轴对齐方式
 */
.flex-alignt { align-items: flex-start; }
.flex-alignc { align-items: center; }
.flex-alignb { align-items: flex-end; }

/**
 * 单个项目对齐方式
 */
.flex-selft { align-self: flex-start; }
.flex-selfc { align-self: center; }
.flex-selfb { align-self: flex-end; }

/**
 * 弹性比例分配
 */
.flex1 {
	-webkit-box-flex: 1;
	-webkit-flex: 1;
	-ms-flex: 1;
	flex: 1;
}

.flex2 {
	-webkit-box-flex: 2;
	-webkit-flex: 2;
	-ms-flex: 2;
	flex: 2;
}

/**
 * 主轴方向设置（垂直排列）
 */
.flex__direction-column {
	-webkit-box-direction: normal;
	-moz-box-direction: normal;
	-webkit-box-orient: vertical;
	-moz-box-orient: vertical;
	-webkit-flex-direction: column;
	-ms-flex-direction: column;
	flex-direction: column;
}

/* ==================== 自定义组件样式 ==================== */

/**
 * 开关按钮样式
 */
.cp__checkbox-switch {
	background: #d9d9d9;
	border-radius: .3rem;
	cursor: pointer;
	font-size: .24rem;
	font-family: Helvetica;
	outline: 0;
	height: .5rem;
	width: 1.1rem;
	position: relative;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	vertical-align: middle;
	appearance: none;
	-webkit-appearance: none;
	transition: all 0.3s;
}

/**
 * 开关按钮滑块
 */
.cp__checkbox-switch::before {
	background: #fff;
	content: "";
	border-radius: 50%;
	height: .38rem;
	width: .38rem;
	position: absolute;
	top: .06rem;
	bottom: 0;
	left: .06rem;
	transition: left 0.3s;
}

/**
 * 开关按钮选中状态
 */
.cp__checkbox-switch:checked::before {
	left: .65rem;
}

.cp__checkbox-switch:checked {
	background: #45c00c;
	border-color: #45c00c;
}

/**
 * 开关按钮文字内容
 */
.cp__checkbox-switch::after {
	content: "";
	color: #999;
	text-transform: uppercase;
	position: absolute;
	right: .02rem;
	top: .02rem;
}

.cp__checkbox-switch:checked::after {
	content: "";
	color: #fff;
	text-transform: uppercase;
	left: .05rem;
}

/* ==================== 按钮组件样式 ==================== */

/**
 * 主要按钮样式
 */
.wc__btn-primary {
	background-color: #759b84;
	border-radius: .07rem;
	box-sizing: border-box;
	color: #fff;
	cursor: pointer;
	display: block;
	font-size: .28rem;
	font-family: "Microsoft Yahei";
	text-align: center;
	outline: none;
	padding: 0 .2rem;
	text-decoration: none;
	line-height: .9rem;
	position: relative;
}

/**
 * 主要按钮交互状态
 */
.wc__btn-primary:active {
	background-color: #446382;
}

/**
 * 主要按钮边框效果（使用缩放实现1px边框）
 */
.wc__btn-primary:after {
	border: 1px solid rgba(0, 0, 0, .2);
	border-radius: .14rem;
	box-sizing: border-box;
	content: '';
	height: 200%;
	width: 200%;
	position: absolute;
	left: 0;
	top: 0;
	transform: scale(.5);
	-webkit-transform: scale(.5);
	transform-origin: 0 0;
	-webkit-transform-origin: 0 0;
}

/**
 * 主要按钮禁用状态
 */
.wc__btn-primary.disabled, 
.wc__btn-primary:disabled {
	background: #4f6882;
	color: rgba(255, 255, 255, .6);
}

/**
 * 默认按钮样式
 */
.wc__btn-default {
	background-color: #fff;
	border-radius: .07rem;
	box-sizing: border-box;
	color: #333;
	cursor: pointer;
	display: block;
	font-size: .28rem;
	font-family: "Microsoft Yahei";
	text-align: center;
	outline: none;
	padding: 0 .2rem;
	text-decoration: none;
	line-height: .9rem;
	position: relative;
}

/**
 * 默认按钮交互状态
 */
.wc__btn-default:active {
	background-color: #22476b;
}

/**
 * 默认按钮边框效果
 */
.wc__btn-default:after {
	border: 1px solid rgba(0, 0, 0, .15);
	border-radius: .14rem;
	box-sizing: border-box;
	content: '';
	height: 200%;
	width: 200%;
	position: absolute;
	left: 0;
	top: 0;
	transform: scale(.5);
	-webkit-transform: scale(.5);
	transform-origin: 0 0;
	-webkit-transform-origin: 0 0;
}

/**
 * 默认按钮禁用状态
 */
.wc__btn-default.disabled, 
.wc__btn-default:disabled {
	background: #f7f7f7;
	color: rgba(0, 0, 0, .3);
}