/**
 * 翻页导航样式
 * 独立的翻页按钮CSS文件
 *
 * @package GoodBase
 * @since 1.0.0
 */

/* ============================================
   翻页导航样式 - 优化版本
   ============================================ */

/* 翻页导航容器 */
.navigation.pagination,
.posts-navigation,
.nav-links {
    margin: 0px 0 40px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0;
    list-style: none;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

/* 分类页面翻页导航容器特殊样式 */
.category-main-content .navigation.pagination,
.category-main-content .posts-navigation,
.category-main-content .nav-links {
	margin: 1px 0 1px 0;
    padding: 1px 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(255, 140, 105, 0.02) 50%, transparent 100%);
    border-radius: 16px;
}

/* 防止闪烁：初始隐藏所有可能的上一页/下一页按钮，由JavaScript统一显示 */
/* 只隐藏WordPress默认生成的按钮，不隐藏我们创建的按钮 */
.navigation.pagination:not(.pagination-optimized) .page-numbers.prev,
.posts-navigation:not(.pagination-optimized) .page-numbers.prev,
.nav-links:not(.pagination-optimized) .page-numbers.prev,
.navigation.pagination:not(.pagination-optimized) .page-numbers.next,
.posts-navigation:not(.pagination-optimized) .page-numbers.next,
.nav-links:not(.pagination-optimized) .page-numbers.next,
.navigation.pagination:not(.pagination-optimized) a.prev,
.posts-navigation:not(.pagination-optimized) a.prev,
.nav-links:not(.pagination-optimized) a.prev,
.navigation.pagination:not(.pagination-optimized) a.next,
.posts-navigation:not(.pagination-optimized) a.next,
.nav-links:not(.pagination-optimized) a.next {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* JavaScript处理完成后，显示正确的按钮 */
.navigation.pagination.pagination-optimized .page-numbers.prev,
.posts-navigation.pagination-optimized .page-numbers.prev,
.nav-links.pagination-optimized .page-numbers.prev,
.navigation.pagination.pagination-optimized .page-numbers.next,
.posts-navigation.pagination-optimized .page-numbers.next,
.nav-links.pagination-optimized .page-numbers.next,
/* 确保所有情况下都能显示 */
.navigation.pagination .page-numbers.prev,
.posts-navigation .page-numbers.prev,
.nav-links .page-numbers.prev,
.navigation.pagination .page-numbers.next,
.posts-navigation .page-numbers.next,
.nav-links .page-numbers.next {
    display: inline-flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
}

/* 翻页按钮基础样式 */
.navigation.pagination .page-numbers,
.posts-navigation .page-numbers,
.nav-links .page-numbers,
.navigation.pagination a,
.posts-navigation a,
.nav-links a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 48px !important;
    height: 48px !important;
    padding: 0 20px !important;
    background: #ffffff !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 12px !important;
    color: #6b7280 !important;
    text-decoration: none !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
    position: relative !important;
    overflow: hidden !important;
    margin: 0 !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    white-space: nowrap !important;
    letter-spacing: 0.3px !important;
}

/* 翻页按钮内部光晕效果 */
.navigation.pagination .page-numbers:not(.disabled):not(.current):not(.dots)::before,
.posts-navigation .page-numbers:not(.disabled):not(.current):not(.dots)::before,
.nav-links .page-numbers:not(.disabled):not(.current):not(.dots)::before,
.navigation.pagination a:not(.disabled)::before,
.posts-navigation a:not(.disabled)::before,
.nav-links a:not(.disabled)::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 140, 105, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
    pointer-events: none;
}

.navigation.pagination .page-numbers:not(.disabled):not(.current):not(.dots):hover::before,
.posts-navigation .page-numbers:not(.disabled):not(.current):not(.dots):hover::before,
.nav-links .page-numbers:not(.disabled):not(.current):not(.dots):hover::before,
.navigation.pagination a:not(.disabled):hover::before,
.posts-navigation a:not(.disabled):hover::before,
.nav-links a:not(.disabled):hover::before {
    width: 200px;
    height: 200px;
}

/* 悬停效果 - 优化 */
.navigation.pagination .page-numbers:not(.current):not(.disabled):not(.dots):hover,
.posts-navigation .page-numbers:not(.current):not(.disabled):not(.dots):hover,
.nav-links .page-numbers:not(.current):not(.disabled):not(.dots):hover,
.navigation.pagination a:not(.disabled):hover,
.posts-navigation a:not(.disabled):hover,
.nav-links a:not(.disabled):hover {
    background: #fff5f0;
    border-color: #ff8c69;
    color: #ff6b35;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 140, 105, 0.3);
}

/* 当前页样式 - 浅灰背景，深色边框 */
.navigation.pagination .page-numbers.current,
.posts-navigation .page-numbers.current,
.nav-links .page-numbers.current,
.navigation.pagination span.page-numbers.current,
.posts-navigation span.page-numbers.current,
.nav-links span.page-numbers.current {
    background: #f3f4f6 !important;
    border-color: #FF6347 !important;
    border-width: 1px !important;
    color: #374151 !important;
    box-shadow: none !important;
    font-weight: 700 !important;
    cursor: default !important;
    pointer-events: none !important;
    transform: none !important;
    position: relative !important;
    z-index: 1 !important;
}

/* 移除当前页内部光晕效果 */
.navigation.pagination .page-numbers.current::after,
.posts-navigation .page-numbers.current::after,
.nav-links .page-numbers.current::after {
    content: none;
    display: none;
}

/* 移除当前页外部光晕效果 */
.navigation.pagination .page-numbers.current::before,
.posts-navigation .page-numbers.current::before,
.nav-links .page-numbers.current::before {
    content: none;
    display: none;
}

/* 省略号样式 - 优化 */
.navigation.pagination .page-numbers.dots,
.posts-navigation .page-numbers.dots,
.nav-links .page-numbers.dots,
.navigation.pagination span.page-numbers.dots,
.posts-navigation span.page-numbers.dots,
.nav-links span.page-numbers.dots {
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: default;
    box-shadow: none;
    min-width: auto;
    padding: 0 6px;
    font-weight: 500;
    font-size: 16px;
    letter-spacing: 2px;
}

.navigation.pagination .page-numbers.dots:hover,
.posts-navigation .page-numbers.dots:hover,
.nav-links .page-numbers.dots:hover {
    transform: none;
    box-shadow: none;
    background: transparent;
    border: none;
    color: #9ca3af;
}

/* 上一页/下一页按钮特殊样式 - 优化 */
.navigation.pagination .page-numbers.prev,
.posts-navigation .page-numbers.prev,
.nav-links .page-numbers.prev,
.navigation.pagination .page-numbers.next,
.posts-navigation .page-numbers.next,
.nav-links .page-numbers.next,
.navigation.pagination a.prev,
.posts-navigation a.prev,
.nav-links a.prev,
.navigation.pagination a.next,
.posts-navigation a.next,
.nav-links a.next {
    min-width: 100px !important;
    padding: 0 20px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%) !important;
    border: 2px solid #e5e7eb !important;
    position: relative !important;
    overflow: hidden !important;
    border-radius: 12px !important;
}

/* 上一页/下一页按钮悬停效果 - 增强 */
.navigation.pagination .page-numbers.prev:not(.disabled):not(.current):hover,
.posts-navigation .page-numbers.prev:not(.disabled):not(.current):hover,
.nav-links .page-numbers.prev:not(.disabled):not(.current):hover,
.navigation.pagination .page-numbers.next:not(.disabled):not(.current):hover,
.posts-navigation .page-numbers.next:not(.disabled):not(.current):hover,
.nav-links .page-numbers.next:not(.disabled):not(.current):hover,
.navigation.pagination a.prev:not(.disabled):hover,
.posts-navigation a.prev:not(.disabled):hover,
.nav-links a.prev:not(.disabled):hover,
.navigation.pagination a.next:not(.disabled):hover,
.posts-navigation a.next:not(.disabled):hover,
.nav-links a.next:not(.disabled):hover {
    background: linear-gradient(135deg, #fff5f0 0%, #ffe8e0 100%);
    border-color: #ff8c69;
    color: #ff6b35;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 140, 105, 0.35);
}

/* 上一页/下一页按钮激活状态 */
.navigation.pagination .page-numbers.prev:not(.disabled):not(.current):active,
.posts-navigation .page-numbers.prev:not(.disabled):not(.current):active,
.nav-links .page-numbers.prev:not(.disabled):not(.current):active,
.navigation.pagination .page-numbers.next:not(.disabled):not(.current):active,
.posts-navigation .page-numbers.next:not(.disabled):not(.current):active,
.nav-links .page-numbers.next:not(.disabled):not(.current):active,
.navigation.pagination a.prev:not(.disabled):active,
.posts-navigation a.prev:not(.disabled):active,
.nav-links a.prev:not(.disabled):active,
.navigation.pagination a.next:not(.disabled):active,
.posts-navigation a.next:not(.disabled):active,
.nav-links a.next:not(.disabled):active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(255, 140, 105, 0.25);
}

/* 移除上一页/下一页箭头图标 */
.navigation.pagination .page-numbers.prev::before,
.posts-navigation .page-numbers.prev::before,
.nav-links .page-numbers.prev::before,
.navigation.pagination a.prev::before,
.posts-navigation a.prev::before,
.nav-links a.prev::before,
.navigation.pagination .page-numbers.next::after,
.posts-navigation .page-numbers.next::after,
.nav-links .page-numbers.next::after,
.navigation.pagination a.next::after,
.posts-navigation a.next::after,
.nav-links a.next::after {
    content: none;
    display: none;
}

/* 禁用状态（第一页/最后一页） - 灰色样式 */
.navigation.pagination .page-numbers.disabled,
.posts-navigation .page-numbers.disabled,
.nav-links .page-numbers.disabled,
.navigation.pagination a.disabled,
.posts-navigation a.disabled,
.nav-links a.disabled,
.navigation.pagination span.page-numbers.disabled,
.posts-navigation span.page-numbers.disabled,
.nav-links span.page-numbers.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
    background: #f3f4f6 !important;
    border-color: #d1d5db !important;
    color: #9ca3af !important;
    box-shadow: none !important;
}

.navigation.pagination .page-numbers.disabled:hover,
.posts-navigation .page-numbers.disabled:hover,
.nav-links .page-numbers.disabled:hover,
.navigation.pagination a.disabled:hover,
.posts-navigation a.disabled:hover,
.nav-links a.disabled:hover {
    transform: none !important;
    box-shadow: none !important;
    background: #f3f4f6 !important;
    border-color: #d1d5db !important;
    color: #9ca3af !important;
}

/* 活动状态（点击反馈） */
.navigation.pagination .page-numbers:active:not(.current):not(.disabled):not(.dots),
.posts-navigation .page-numbers:active:not(.current):not(.disabled):not(.dots),
.nav-links .page-numbers:active:not(.current):not(.disabled):not(.dots),
.navigation.pagination a:active:not(.disabled),
.posts-navigation a:active:not(.disabled),
.nav-links a:active:not(.disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

