/**
 * 移动端弹窗优化样式
 * 专门针对移动端设备优化弹窗显示效果
 */

/* 基础弹窗容器样式 */
.layer-container {
    width: 100% !important;
    height: 100% !important;
    top: 0 !important;
    left: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

/* 弹窗内容区域 */
.layer-content {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 0 !important;
}

/* 弹窗iframe */
.layer-iframe {
    width: 100% !important;
    height: calc(100% - 40px) !important; /* 为标题栏留出空间 */
    border: none !important;
}

/* 弹窗标题栏 */
.layer-title {
    height: 40px !important;
    line-height: 40px !important;
    padding: 0 15px !important;
    font-size: 16px !important;
}

/* 弹窗关闭按钮 */
.layer-close {
    width: 40px !important;
    height: 40px !important;
    line-height: 40px !important;
    font-size: 20px !important;
}

/* 响应式断点 - 平板设备 */
@media (min-width: 768px) and (max-width: 1024px) {
    .layer-container {
        width: 90% !important;
        height: 80% !important;
        top: 10% !important;
        left: 5% !important;
        border-radius: 8px !important;
    }
    
    .layer-content {
        width: 100% !important;
        height: 100% !important;
        border-radius: 8px !important;
    }
    
    .layer-iframe {
        height: calc(100% - 45px) !important;
    }
    
    .layer-title {
        height: 45px !important;
        line-height: 45px !important;
        font-size: 18px !important;
    }
}

/* 响应式断点 - 手机设备 */
@media (max-width: 767px) {
    /* 弹窗整体样式 */
    .layui-layer-page {
        width: 100vw !important;
        height: 100vh !important;
        top: 0 !important;
        left: 0 !important;
        margin: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }
    
    /* 弹窗内容 */
    .layui-layer-content {
        width: 100% !important;
        height: 100% !important;
        max-width: none !important;
        max-height: none !important;
        overflow: auto !important;
    }
    
    /* iframe样式 */
    .layui-layer-iframe {
        width: 100% !important;
        height: calc(100% - 44px) !important; /* 为标题栏留出空间 */
        border: none !important;
    }
    
    /* 标题栏样式 */
    .layui-layer-title {
        height: 44px !important;
        line-height: 44px !important;
        padding: 0 15px !important;
        font-size: 16px !important;
        font-weight: 500 !important;
    }
    
    /* 关闭按钮样式 */
    .layui-layer-setwin {
        top: 0 !important;
        right: 0 !important;
        width: 44px !important;
        height: 44px !important;
    }
    
    .layui-layer-setwin a {
        width: 44px !important;
        height: 44px !important;
        line-height: 44px !important;
        font-size: 20px !important;
    }
    
    /* 表单优化 */
    .form-horizontal .control-label {
        padding-top: 7px !important;
        margin-bottom: 0 !important;
        text-align: left !important;
        font-size: 14px !important;
        font-weight: 500 !important;
    }
    
    .form-horizontal .col-sm-10 {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    
    
    .btn {
        height: 40px !important;
        padding: 8px 16px !important;
        font-size: 14px !important;
        border-radius: 6px !important;
        font-weight: 500 !important;
    }
    
    /* 提示信息优化 */
    .alert-info {
        padding: 12px 15px !important;
        margin-bottom: 15px !important;
        font-size: 13px !important;
        border-radius: 6px !important;
    }
    
    .alert-info strong {
        font-weight: 600 !important;
    }
    
    /* 面板优化 */
    .panel {
        margin-bottom: 15px !important;
        border-radius: 8px !important;
        box-shadow: 0 2px 6px rgba(0,0,0,0.05) !important;
    }
    
    .panel-body {
        padding: 15px !important;
    }
    
    .form-group {
        margin-bottom: 15px !important;
    }
    
    /* 滚动条优化 */
    ::-webkit-scrollbar {
        width: 6px !important;
        height: 6px !important;
    }
    
    ::-webkit-scrollbar-track {
        background: #f1f1f1 !important;
        border-radius: 3px !important;
    }
    
    ::-webkit-scrollbar-thumb {
        background: #c1c1c1 !important;
        border-radius: 3px !important;
    }
    
    ::-webkit-scrollbar-thumb:hover {
        background: #a8a8a8 !important;
    }
}

/* 超小屏幕设备优化 */
@media (max-width: 480px) {
    .layui-layer-title {
        font-size: 15px !important;
        padding: 0 12px !important;
    }
    
    .layui-layer-setwin a {
        width: 40px !important;
        height: 40px !important;
        line-height: 40px !important;
        font-size: 18px !important;
    }
    
    .form-horizontal .control-label {
        font-size: 13px !important;
    }
    
    
    .btn {
        height: 38px !important;
        padding: 6px 12px !important;
        font-size: 13px !important;
    }
    
    .alert-info {
        padding: 10px 12px !important;
        font-size: 12px !important;
    }
}

/* 触摸优化 */
@media (hover: none) and (pointer: coarse) {
    /* 增大触摸目标 */
    .btn {
        min-height: 44px !important;
        min-width: 44px !important;
    }
    
    
    .layui-layer-setwin a {
        min-width: 44px !important;
        min-height: 44px !important;
    }
    
    /* 减少动画以提高性能 */
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* 横屏优化 */
@media (orientation: landscape) and (max-height: 500px) {
    .layui-layer-page {
        height: 90vh !important;
        top: 5vh !important;
    }
    
    .layui-layer-iframe {
        height: calc(90vh - 44px) !important;
    }
}