/* 文章统计表格样式 */
.article-stats-table-wrapper {
    overflow-x: auto;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

/* Elementor 兼容性 - 确保自定义样式优先级 */
.elementor-widget-article_stats_table .article-stats-table-wrapper {
    margin: 20px 0;
}

.elementor-widget-article_stats_table .article-stats-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 14px;
    min-width: 600px;
}

.article-stats-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 14px;
    min-width: 600px;
}

.article-stats-table thead {
    background: #f8f9fa;
}

.article-stats-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e9ecef;
    white-space: nowrap;
}

.article-stats-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.article-stats-table tbody tr:hover {
    background-color: #f8f9fa;
}

.article-stats-table tbody tr:last-child td {
    border-bottom: none;
}

/* 文章标题样式 */
.article-title {
    color: #333;
    font-weight: 500;
}

/* 状态标签样式 */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    min-width: 60px;
}

.status-published {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-private {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-draft {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-pending {
    background-color: #cce5ff;
    color: #004085;
    border: 1px solid #b3d7ff;
}

.status-future {
    background-color: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

.status-unknown {
    background-color: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

/* CP标签样式 */
.cp-tags {
    color: #666;
    font-size: 13px;
}

/* 分页样式 */
.article-stats-pagination {
    margin-top: 20px;
    padding: 15px 0;
    border-top: 1px solid #e9ecef;
}

.pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.pagination-btn {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 2px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #007cba;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 40px;
    text-align: center;
}

.pagination-btn:hover {
    background: #007cba;
    color: #fff;
    border-color: #007cba;
    text-decoration: none;
}

.pagination-btn.current {
    background: #007cba;
    color: #fff;
    border-color: #007cba;
    cursor: default;
}

.pagination-btn.prev-btn,
.pagination-btn.next-btn {
    padding: 8px 16px;
    font-weight: 600;
}

.pagination-dots {
    padding: 8px 4px;
    color: #6c757d;
    font-weight: bold;
}

.pagination-info {
    margin-left: 20px;
    color: #6c757d;
    font-size: 13px;
    white-space: nowrap;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .article-stats-table {
        font-size: 12px;
    }
    
    .article-stats-table th,
    .article-stats-table td {
        padding: 8px 10px;
    }
    
    .article-title {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (max-width: 768px) {
    .pagination-wrapper {
        justify-content: center;
        flex-direction: column;
        gap: 10px;
    }

    .pagination-info {
        margin-left: 0;
        order: -1;
    }
}

@media (max-width: 480px) {
    .article-stats-table th:nth-child(3),
    .article-stats-table td:nth-child(3) {
        display: none; /* 在小屏幕上隐藏字数列 */
    }

    .pagination-btn {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 35px;
    }

    .pagination-btn.prev-btn,
    .pagination-btn.next-btn {
        padding: 6px 12px;
    }
}

/* Elementor 字体样式优先级确保 */
.elementor-widget-article_stats_table .article-stats-table th {
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
}

.elementor-widget-article_stats_table .article-stats-table td {
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
}

.elementor-widget-article_stats_table .article-title a {
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.elementor-widget-article_stats_table .status-badge {
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
}

.elementor-widget-article_stats_table .cp-tags {
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
}

/* 确保 Elementor 自定义样式能够覆盖默认样式 */
.elementor-widget-article_stats_table .article-stats-table-wrapper {
    box-shadow: inherit;
    border-radius: inherit;
    margin: inherit;
}

.elementor-widget-article_stats_table .article-stats-table th,
.elementor-widget-article_stats_table .article-stats-table td {
    padding: inherit;
    border-width: inherit;
    border-color: inherit;
    border-style: inherit;
}

/* 确保边框样式的优先级 */
.elementor-widget-article_stats_table .article-stats-table thead th {
    border-bottom-width: inherit;
    border-bottom-color: inherit;
    border-bottom-style: solid;
}

.elementor-widget-article_stats_table .article-stats-table-wrapper {
    border-width: inherit;
    border-color: inherit;
    border-style: inherit;
}
