/* 分页组件样式 - 桌面端和移动端响应式设计 */

/* 基础分页容器 */
.e_pagebox {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.e_pagebox-000 {
    /* 默认样式 */
}

.p_page {
    /* 分页特定样式 */
}

/* 上一页/下一页按钮基础样式 */
.pre, .next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    margin: 0 5px;
    border-radius: 6px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    text-decoration: none;
    color: #495057;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
}

.pre:hover, .next:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    color: #212529;
    text-decoration: none;
}

/* 禁用状态 */
.pre.pre1, .next.next1 {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.pre.pre1:hover, .next.next1:hover {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    color: #6c757d;
}

/* 按钮内部结构 */
.pre .font, .next .font {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.pre .iconfont, .next .iconfont {
    font-size: 12px;
    margin-right: 4px;
}

.pre .i_pre, .next .i_next {
    font-size: 14px;
    line-height: 1;
}

/* 页码按钮样式 */
.pageNum {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    margin: 0 2px;
    border-radius: 6px;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    text-decoration: none;
    color: #495057;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
}

.pageNum:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    color: #212529;
    text-decoration: none;
}

/* 当前页样式 */
.pageNum.active {
    background-color: #007bff;
    border-color: #007bff;
    color: #ffffff;
}

.pageNum.active:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    color: #ffffff;
}

/* 禁用页码样式 */
.pageNum.disabled {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.pageNum.disabled:hover {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    color: #6c757d;
}

/* 页码链接样式 */
.pageNum a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

/* 移动端响应式设计 */
@media (max-width: 768px) {
    .e_pagebox {
        margin: 15px 0;
        padding: 0 10px;
    }
    
    /* 移动端按钮尺寸调整 */
    .pre, .next, .pageNum {
        min-width: 36px;
        height: 36px;
        margin: 0 2px;
        font-size: 13px;
    }
    
    /* 移动端按钮间距调整 */
    .pre {
        margin-right: 8px;
    }
    
    .next {
        margin-left: 8px;
    }
    
    /* 移动端页码间距调整 */
    .pageNum {
        margin: 0 1px;
    }
    
    /* 移动端图标调整 */
    .pre .iconfont, .next .iconfont {
        font-size: 11px;
        margin-right: 3px;
    }
    
    .pre .i_pre, .next .i_next {
        font-size: 13px;
    }
}

/* 小屏幕手机端 */
@media (max-width: 480px) {
    .e_pagebox {
        margin: 10px 0;
        padding: 0 5px;
    }
    
    /* 更小的按钮尺寸 */
    .pre, .next, .pageNum {
        min-width: 32px;
        height: 32px;
        margin: 0 1px;
        font-size: 12px;
        border-radius: 4px;
    }
    
    /* 调整按钮间距 */
    .pre {
        margin-right: 6px;
    }
    
    .next {
        margin-left: 6px;
    }
    
    /* 隐藏部分页码，只显示关键页码 */
    .pageNum:nth-child(n+6):nth-last-child(n+6) {
        display: none;
    }
    
    /* 确保第一页、最后一页、当前页前后页显示 */
    .pageNum:first-child,
    .pageNum:last-child,
    .pageNum.active,
    .pageNum.active + .pageNum,
    .pageNum.active - .pageNum {
        display: inline-flex !important;
    }
    
    /* 图标进一步缩小 */
    .pre .iconfont, .next .iconfont {
        font-size: 10px;
        margin-right: 2px;
    }
    
    .pre .i_pre, .next .i_next {
        font-size: 12px;
    }
}

/* 超小屏幕 */
@media (max-width: 320px) {
    .e_pagebox {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* 进一步缩小按钮 */
    .pre, .next, .pageNum {
        min-width: 28px;
        height: 28px;
        font-size: 11px;
        margin: 2px 1px;
    }
    
    /* 简化文字显示 */
    .pre .i_pre, .next .i_next {
        font-size: 11px;
    }
    
    /* 隐藏更多页码 */
    .pageNum:nth-child(n+5):nth-last-child(n+5) {
        display: none;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .pre, .next, .pageNum {
        min-height: 44px; /* 确保触摸目标足够大 */
        min-width: 44px;
    }
    
    .pre:hover, .next:hover, .pageNum:hover {
        background-color: inherit;
        border-color: inherit;
        color: inherit;
    }
    
    .pre:active, .next:active, .pageNum:active {
        background-color: #e9ecef;
        border-color: #adb5bd;
        transform: scale(0.95);
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .pre, .next, .pageNum {
        border-width: 2px;
    }
    
    .pageNum.active {
        border-width: 3px;
    }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
    .pre, .next, .pageNum {
        transition: none;
    }
    
    .pre:active, .next:active, .pageNum:active {
        transform: none;
    }
}
