/*!
 * Footer Custom Styles
 *
 * 用于页脚区域的小范围样式补丁（避免全量重编译）
 *
 * @package Xun
 * @since  1.0.0
 */

/* 合并卡片：整体容器 */
.xun-footer-bottom-card {
    padding: 1rem 1.5rem;
    background: var(--color-fill-tertiary);
    border-radius: var(--xun-radius, 8px);
}

/* 上方：友情链接从左侧开始显示（无独立背景） */
.xun-footer-bottom-card .xun-footer-bottom-inner {
    padding: 0;
    background: transparent;
    border-radius: 0;
    justify-content: flex-start;
}

/* 下方：信息区（无独立背景，分割线区分层次） */
.xun-footer-bottom-card .xun-footer-meta-card {
    margin-top: 0.75rem;
    padding: 0.75rem 0 0;
    border-top: 1px solid var(--color-border-secondary);
    background: transparent;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
}

.xun-footer-bottom-card .xun-footer-meta-card.is-alone {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

/* 移动端：保持左对齐，并优化合并卡片排版 */
@media (max-width: 640px) {
    .xun-footer-bottom-card {
        padding: 0.875rem 1rem;
    }

    .xun-footer-bottom-card .xun-footer-bottom-inner {
        flex-direction: row;
        justify-content: flex-start;
        align-items: flex-start;
        text-align: left;
        gap: 0.75rem;
    }

    .xun-footer-bottom-card .xun-footer-meta-card {
        padding-top: 0.75rem;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        gap: 0.5rem;
    }

    .xun-footer-bottom-card .xun-footer-meta-card.is-alone {
        padding-top: 0;
        border-top: 0;
        margin-top: 0;
    }

    .xun-footer-bottom-card .xun-footer-meta-card .xun-footer-beian {
        justify-content: flex-start;
        gap: 0.5rem;
    }
}

/* 快捷菜单：自定义会员图标适配 */
.xun-quick-menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.xun-quick-menu-icon svg,
.xun-quick-menu-icon img {
    display: block;
}

.xun-quick-menu-icon i {
    line-height: 1;
}

.xun-quick-menu-custom {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    text-decoration: none;
    color: inherit;
}

.xun-category-header .xun-category-desc {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.xun-posts-image .xun-post-content.xun-post-content-title-only {
    background: none;
}

.xun-forum-list-cta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

@media (max-width: 768px) {
    .xun-forum-list-actions {
        flex-wrap: nowrap;
        gap: 0.5rem;
        justify-content: flex-start;
    }

    .xun-forum-sort {
        flex: 1 1 auto;
        min-width: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
    }

    .xun-forum-sort::-webkit-scrollbar {
        display: none; /* WebKit */
    }

    .xun-forum-list-cta {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        white-space: nowrap;
    }

    .xun-forum-sort-item {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .xun-forum-search-btn,
    .xun-forum-publish-btn,
    .xun-bbs-follow-btn {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .xun-forum-list-actions--term {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        align-items: end;
        column-gap: 0.5rem;
        row-gap: 0.5rem;
    }

    .xun-forum-list-actions--term .xun-forum-sort {
        grid-column: 1;
        grid-row: 2;
        align-self: end;
    }

    .xun-forum-list-actions--term .xun-forum-list-cta {
        grid-column: 2;
        grid-row: 1 / span 2;
        display: grid;
        grid-template-columns: auto auto;
        grid-template-rows: auto auto;
        align-items: center;
        justify-items: end;
        gap: 0.5rem;
    }

    .xun-forum-list-actions--term .xun-bbs-follow-btn {
        grid-column: 1 / -1;
        grid-row: 1;
        justify-self: end;
    }

    .xun-forum-list-actions--term .xun-forum-search-btn {
        grid-row: 2;
        grid-column: 1;
    }

    .xun-forum-list-actions--term .xun-forum-publish-btn {
        grid-row: 2;
        grid-column: 2;
    }
}
