/**
 * 民航风格作者文章展示 - 样式表
 * 
 * 参考民用航空网设计风格，实现现代化、响应式的文章列表展示
 */

/* 基础容器 */
.cca-author-posts-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    max-width: 100%;
    margin: 0 auto;
    padding: 20px 0;
}

/* 文章容器 */
.cca-posts-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 文章项基础样式 */
.cca-post-item {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.cca-post-item:hover {
    border-color: var(--cca-primary-color, #0066cc);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* 列表样式（民航风格） */
.cca-post-list {
    display: flex;
    align-items: flex-start;
    padding: 16px;
}

.cca-post-list .cca-post-thumbnail {
    flex-shrink: 0;
    margin-right: 16px;
    width: 100px;
    height: 75px;
    overflow: hidden;
    border-radius: 4px;
}

.cca-post-list .cca-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cca-post-item:hover .cca-post-thumbnail img {
    transform: scale(1.05);
}

.cca-post-list .cca-post-content {
    flex: 1;
    min-width: 0;
}

/* 卡片样式 */
.cca-post-card {
    display: flex;
    flex-direction: column;
    padding: 0;
}

.cca-post-card .cca-post-thumbnail {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.cca-post-card .cca-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cca-post-item:hover .cca-post-thumbnail img {
    transform: scale(1.05);
}

.cca-post-card .cca-post-content {
    padding: 16px;
}

/* 网格样式 */
.cca-post-grid {
    display: flex;
    flex-direction: column;
    padding: 0;
}

.cca-post-grid .cca-post-thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.cca-post-grid .cca-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cca-post-item:hover .cca-post-thumbnail img {
    transform: scale(1.05);
}

.cca-post-grid .cca-post-content {
    padding: 12px;
}

/* 极简样式 */
.cca-post-minimal {
    padding: 12px 0;
    border: none;
    border-bottom: 1px dashed #e8e8e8;
    background: transparent;
}

.cca-post-minimal:hover {
    background: #f9f9f9;
    border-color: transparent;
}

/* 网格布局 */
.cca-style-grid .cca-posts-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* 文章标题 */
.cca-post-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.cca-post-title a {
    color: #000 !important;
    text-decoration: none !important;
    transition: color 0.3s ease;
}

.cca-post-title a:hover {
    color: var(--cca-primary-color, #0066cc) !important;
}

/* 文章元数据 */
.cca-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: #999 !important;
    margin-bottom: 8px;
}

.cca-post-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.cca-post-meta .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.cca-post-meta a {
    color: #000 !important;
    text-decoration: none !important;
    transition: color 0.3s ease;
}

.cca-post-meta a:hover {
    color: var(--cca-primary-color, #0066cc) !important;
}

/* 文章摘要 */
.cca-post-excerpt {
    color: #666;
    font-size: 13px;
    line-height: 1.6;
    margin-top: 8px;
}

/* 分页容器 */
.cca-pagination {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e8e8e8;
    text-align: center;
}

/* 加载更多按钮 */
.cca-load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 32px;
    background: var(--cca-primary-color, #0066cc);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cca-load-more-btn:hover {
    background: var(--cca-primary-dark, #0052a3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.cca-load-more-btn:active {
    transform: translateY(0);
}

.cca-load-more-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.cca-load-more-btn.loading {
    cursor: not-allowed;
    opacity: 0.8;
}

.cca-load-more-btn.loading .dashicons-spin {
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 加载完成提示 */
.cca-all-loaded {
    display: inline-block;
    padding: 12px 32px;
    background: #f5f5f5;
    color: #999;
    border-radius: 4px;
    font-size: 14px;
}

/* 传统分页 */
.cca-traditional-pagination ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cca-traditional-pagination li {
    margin: 0;
}

.cca-traditional-pagination a,
.cca-traditional-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    color: #666;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cca-traditional-pagination a:hover {
    border-color: var(--cca-primary-color, #0066cc);
    color: var(--cca-primary-color, #0066cc);
}

.cca-traditional-pagination .current {
    background: var(--cca-primary-color, #0066cc);
    border-color: var(--cca-primary-color, #0066cc);
    color: #fff;
}

.cca-traditional-pagination .dots {
    background: transparent;
    border-color: transparent;
}

.cca-traditional-pagination .prev,
.cca-traditional-pagination .next {
    padding: 0 16px;
}

.cca-traditional-pagination .prev .dashicons,
.cca-traditional-pagination .next .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* 无文章提示 */
.cca-no-posts {
    text-align: center;
    padding: 40px 20px;
    background: #f9f9f9;
    border-radius: 4px;
    color: #999;
}

.cca-no-posts p {
    margin: 0;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .cca-post-list {
        flex-direction: column;
    }
    
    .cca-post-list .cca-post-thumbnail {
        width: 100%;
        height: 150px;
        margin-right: 0;
        margin-bottom: 12px;
    }
    
    .cca-post-title {
        font-size: 15px;
    }
    
    .cca-post-meta {
        flex-direction: column;
        gap: 6px;
    }
    
    .cca-style-grid .cca-posts-container {
        grid-template-columns: 1fr;
    }
    
    .cca-load-more-btn {
        width: 100%;
    }
}

/* Dashicons动画支持 */
.dashicons-spin {
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
