/* Wap全局主题修复CSS - 适用于所有移动端页面模块 */
/* 这个文件将被所有移动端页面引用，确保全站移动端主题一致性 */

/* ===== 移动端全局基础修复 ===== */
/* 所有链接使用主题色 */
a, a:link, a:visited {
    color: var(--theme-color) !important;
    transition: all 0.3s ease;
    text-decoration: none;
}

a:hover, a:active, a:focus {
    color: var(--theme-color-hover, var(--theme-color)) !important;
}

/* ===== 移动端按钮样式统一 ===== */
.btn, .button, input[type="submit"], input[type="button"], button {
    background: var(--theme-gradient, var(--theme-color)) !important;
    color: #fff !important;
    border: 1px solid var(--theme-color) !important;
    padding: 12px 20px;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 44px; /* 移动端触控友好 */
    font-size: 16px;
}

.btn:hover, .button:hover, input[type="submit"]:hover, input[type="button"]:hover, button:hover,
.btn:active, .button:active, input[type="submit"]:active, input[type="button"]:active, button:active {
    background: var(--theme-color-hover, var(--theme-color)) !important;
    transform: scale(0.98);
}

/* ===== 移动端导航菜单统一 ===== */
.nav, .navigation, .menu {
    background: var(--theme-gradient, var(--theme-color)) !important;
}

.nav a, .navigation a, .menu a {
    color: #fff !important;
    padding: 15px 20px;
    display: block;
    transition: all 0.3s ease;
    min-height: 44px;
    line-height: 1.2;
}

.nav a:hover, .navigation a:hover, .menu a:hover,
.nav a:active, .navigation a:active, .menu a:active {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}

.nav .active, .navigation .active, .menu .active {
    background: var(--theme-color-dark, var(--theme-color)) !important;
}

/* ===== 移动端标题样式统一 ===== */
h1, h2, h3, h4, h5, h6 {
    color: var(--theme-color-dark, var(--theme-color)) !important;
    line-height: 1.3;
}

.title, .heading {
    background: var(--theme-gradient, var(--theme-color)) !important;
    color: #fff !important;
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 18px;
}

/* ===== 移动端表单元素统一 ===== */
input[type="text"], input[type="email"], input[type="password"], 
input[type="tel"], input[type="url"], textarea, select {
    border: 2px solid var(--border-color, #dee2e6);
    border-radius: 6px;
    padding: 12px 15px;
    transition: all 0.3s ease;
    font-size: 16px; /* 防止iOS缩放 */
    min-height: 44px;
    width: 100%;
    box-sizing: border-box;
}

input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus,
input[type="tel"]:focus, input[type="url"]:focus, textarea:focus, select:focus {
    border-color: var(--theme-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.25);
    outline: none;
}

/* ===== 移动端卡片样式统一 ===== */
.card, .box, .panel {
    background: #fff;
    border: 1px solid var(--border-color-light, #e9ecef);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.card:hover, .box:hover, .panel:hover,
.card:active, .box:active, .panel:active {
    border-color: var(--theme-color) !important;
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.2);
}

.card-header, .box-header, .panel-header {
    background: var(--theme-gradient-light, var(--theme-color-light)) !important;
    color: var(--theme-color-dark, var(--theme-color)) !important;
    padding: 15px 20px;
    border-bottom: 1px solid var(--theme-color);
    border-radius: 8px 8px 0 0;
    font-weight: bold;
    font-size: 16px;
}

/* ===== 移动端列表样式统一 ===== */
.list, .list-group, ul.styled {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 15px;
}

.list-item, .list-group-item, ul.styled li {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color-light, #e9ecef);
    transition: all 0.3s ease;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.list-item:hover, .list-group-item:hover, ul.styled li:hover,
.list-item:active, .list-group-item:active, ul.styled li:active {
    background: var(--theme-color-light, #f8f9fa) !important;
}

.list-item.active, .list-group-item.active, ul.styled li.active {
    background: var(--theme-color) !important;
    color: #fff !important;
}

/* ===== 移动端标签页统一 ===== */
.tabs, .tab-nav {
    display: flex;
    background: var(--theme-color-light, #f8f9fa);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.tab, .tab-item {
    flex: 1;
    padding: 15px 10px;
    color: var(--theme-color) !important;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tab:hover, .tab-item:hover,
.tab:active, .tab-item:active {
    background: rgba(23, 162, 184, 0.1);
    color: var(--theme-color-hover, var(--theme-color)) !important;
}

.tab.active, .tab-item.active {
    background: var(--theme-color) !important;
    color: #fff !important;
}

/* ===== 移动端分页样式统一 ===== */
.pagination, .pager {
    text-align: center;
    margin: 20px 0;
}

.pagination a, .pager a {
    display: inline-block;
    padding: 12px 16px;
    margin: 0 5px;
    color: var(--theme-color) !important;
    border: 1px solid var(--theme-color);
    border-radius: 6px;
    transition: all 0.3s ease;
    min-height: 44px;
    min-width: 44px;
    text-align: center;
}

.pagination a:hover, .pager a:hover,
.pagination a:active, .pager a:active {
    background: var(--theme-color) !important;
    color: #fff !important;
}

.pagination .current, .pager .current {
    background: var(--theme-color) !important;
    color: #fff !important;
}

/* ===== 移动端面包屑导航统一 ===== */
.breadcrumb {
    background: var(--theme-color-light, #f8f9fa);
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.breadcrumb a {
    color: var(--theme-color) !important;
}

.breadcrumb .separator {
    color: var(--text-color-muted, #999);
    margin: 0 10px;
}

/* ===== 移动端警告框样式统一 ===== */
.alert, .notice, .message {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid var(--theme-color);
    font-size: 14px;
}

.alert-info, .notice-info {
    background: var(--theme-color-light, #f8f9fa);
    color: var(--theme-color-dark, var(--theme-color));
}

/* ===== 移动端搜索框样式统一 ===== */
.search-box, .search-form {
    position: relative;
    margin-bottom: 20px;
}

.search-input {
    padding: 12px 50px 12px 20px;
    border: 2px solid var(--theme-color) !important;
    border-radius: 25px;
    width: 100%;
    transition: all 0.3s ease;
    font-size: 16px;
    min-height: 44px;
    box-sizing: border-box;
}

.search-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.25);
    outline: none;
}

.search-button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--theme-color) !important;
    color: #fff !important;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
}

/* ===== 移动端标签样式统一 ===== */
.tag, .badge, .label {
    display: inline-block;
    padding: 6px 12px;
    background: var(--theme-color) !important;
    color: #fff !important;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
}

/* ===== 移动端表格样式统一 ===== */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-size: 14px;
}

th {
    background: var(--theme-gradient, var(--theme-color)) !important;
    color: #fff !important;
    padding: 12px 15px;
    font-weight: bold;
    text-align: left;
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color-light, #e9ecef);
}

/* ===== 移动端模态框样式统一 ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 400px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.modal-header {
    background: var(--theme-gradient, var(--theme-color)) !important;
    color: #fff !important;
    padding: 20px;
    font-size: 18px;
    font-weight: bold;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color-light, #e9ecef);
    text-align: right;
}

/* ===== 移动端特殊优化 ===== */
/* 触控优化 */
.btn, .button, .tab, .tab-item, .list-item {
    touch-action: manipulation;
}

/* 防止双击缩放 */
.btn, .button {
    user-select: none;
    -webkit-user-select: none;
}

/* 滚动优化 */
.scrollable {
    -webkit-overflow-scrolling: touch;
    overflow-scrolling: touch;
}

/* ===== 响应式适配 ===== */
@media (max-width: 480px) {
    .title, .heading {
        padding: 12px 15px;
        font-size: 16px;
    }
    
    .card-header, .box-header, .panel-header {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .list-item, .list-group-item {
        padding: 12px 15px;
    }
}

/* 横屏适配 */
@media (orientation: landscape) and (max-height: 500px) {
    .modal-content {
        width: 95%;
        max-height: 90%;
        overflow-y: auto;
    }
    
    .btn, .button {
        padding: 8px 16px;
        min-height: 36px;
    }
}

/* ===== 特殊主题适配 ===== */
/* 白色主题 */
.wap-theme-white {
    --theme-color: #007bff;
    --theme-color-light: #f8f9fa;
    --theme-color-dark: #0056b3;
    --theme-color-hover: #0069d9;
}

/* 黑色主题 */
.wap-theme-black {
    --theme-color: #ffffff;
    --theme-color-light: #333333;
    --theme-color-dark: #cccccc;
    --theme-color-hover: #f0f0f0;
}

.wap-theme-black .card, .wap-theme-black .box, .wap-theme-black .panel {
    background: #1a1a1a !important;
    border-color: #333333 !important;
    color: #ffffff !important;
}

.wap-theme-black .modal-content {
    background: #1a1a1a !important;
    color: #ffffff !important;
}