/* +----------------------------------------------------------------------
/* | Static Plugin for ThinkAdmin
/* +----------------------------------------------------------------------
/* | 官方网站: https://thinkadmin.top
/* +----------------------------------------------------------------------
/* | 版权所有 2014~2025 ThinkAdmin [ thinkadmin.top ]
/* +----------------------------------------------------------------------
/* | 开源协议 ( https://mit-license.org )
/* | 免责声明 ( https://thinkadmin.top/disclaimer )
/* +----------------------------------------------------------------------
/* | gitee 代码仓库：https://gitee.com/zoujingli/think-plugs-static
/* | github 代码仓库：https://github.com/zoujingli/think-plugs-static
/* +----------------------------------------------------------------------
/* | 自定义后台扩展样式，需要在加载 console.css 后载入
/* | 使用 composer require zoujingli/think-plugs-static 时不会更新此文件
/* +---------------------------------------------------------------------- */

/* 移动端响应式优化 */
@media screen and (max-width: 768px) {
    /* 增大基础字体 */
    html, body {
        font-size: 18px !important;
    }
    
    /* 表格字体优化 */
    .layui-table th, .layui-table td {
        font-size: 16px !important;
        padding: 12px 8px !important;
    }
    
    /* 表单元素 */
    .layui-form-label, .layui-input, .layui-select {
        font-size: 16px !important;
    }
    
    /* 按钮 */
    .layui-btn {
        font-size: 16px !important;
        padding: 0 16px !important;
        height: 40px !important;
        line-height: 40px !important;
    }
    
    /* 卡片标题 */
    .layui-card-header {
        font-size: 18px !important;
        padding: 15px 20px !important;
    }
    
    /* 侧边栏菜单 */
    .layui-nav-item a {
        font-size: 16px !important;
        padding: 0 20px !important;
    }
    
    /* 树形菜单 */
    .tree-row td {
        font-size: 16px !important;
        padding: 10px 8px !important;
    }
    
    /* 层级文字 */
    .level-0, .level-1, .level-2, .level-3 {
        font-size: 16px !important;
    }
    
    /* 开关样式 */
    .room-card-wrapper {
        transform: scale(1.1);
    }
    
    /* layTable 移动端高度修复 + 横向滚动 */
    .layui-table-view,
    .layui-table-box {
        height: auto !important;
    }
    .layui-table-main {
        height: auto !important;
        overflow-x: auto !important;
    }
    .layui-table-body {
        height: auto !important;
        overflow-x: auto !important;
        overflow-y: visible !important;
    }
    .layui-table-fixed {
        display: none !important;
    }
}

/* 超小屏幕优化 */
@media screen and (max-width: 480px) {
    html, body {
        font-size: 16px !important;
    }
    
    .layui-table th, .layui-table td {
        font-size: 15px !important;
        padding: 10px 5px !important;
    }
    
    .layui-btn {
        font-size: 14px !important;
        padding: 0 12px !important;
        height: 36px !important;
        line-height: 36px !important;
    }
    
    .layui-card-header {
        font-size: 16px !important;
    }
}

/* 手机横屏修复：横屏时高度很小(<=500px)，layTable 的 height:'full' 会算出 0 */
@media screen and (orientation: landscape) and (max-height: 500px) {
    /* 取消 layTable 固定高度，允许横向滚动 */
    .layui-table-view,
    .layui-table-box {
        height: auto !important;
    }
    .layui-table-main {
        height: auto !important;
        overflow-x: auto !important;
    }
    .layui-table-body {
        height: auto !important;
        overflow-x: auto !important;
        overflow-y: visible !important;
    }
    .layui-table-fixed {
        display: none !important;
    }
    /* 压缩顶部区域释放空间 */
    .layui-layout-admin > .layui-header {
        height: 40px !important;
        line-height: 40px !important;
    }
    .layui-layout-admin > .layui-header .layui-nav-item,
    .layui-layout-admin > .layui-header .layui-nav-item > a {
        height: 40px !important;
        line-height: 40px !important;
    }
    .layui-layout-admin > .layui-body {
        top: 40px !important;
    }
    .layui-card-header {
        padding: 6px 15px !important;
        font-size: 14px !important;
    }
}
