/* 交流群 / 公众号 — 右侧悬浮 + 弹窗 */

/*
 * 防横跳：弹窗期间不隐藏滚动条（JS 拦截背景滚动）
 */
html.xu5-has-community {
    scrollbar-gutter: stable;
}

/*
 * 交流悬浮堆叠（按钮样式见 back-to-top.css 的 .xu5-cf-fab）
 * 返回顶部 bottom:48 / 高36 → 堆叠起点 48+36+8=92
 */
.xu5-float-community {
    position: fixed;
    right: 20px;
    bottom: 92px;
    z-index: 9997;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}
.xu5-float-community .xu5-cf-fab {
    pointer-events: auto;
    position: relative !important;
    right: auto !important;
    bottom: auto !important;
}

@media screen and (max-width: 768px) {
    .xu5-float-community {
        right: 15px;
        bottom: 81px;
        gap: 7px;
    }
}
@media screen and (max-width: 480px) {
    .xu5-float-community {
        right: 10px;
        bottom: 68px;
        gap: 6px;
    }
}

/* 联系我们：自定义 HTML 内容区 */
.xu5-community-html {
    text-align: left;
    font-size: 14px;
    line-height: 1.7;
    color: #333;
    word-break: break-word;
}
.xu5-community-html > *:first-child {
    margin-top: 0;
}
.xu5-community-html > *:last-child {
    margin-bottom: 0;
}
.xu5-community-html p {
    margin: 0 0 10px;
}
/* 未单独设色时给链接默认蓝；有 inline color 时不覆盖编辑器颜色 */
.xu5-community-html a {
    text-decoration: none;
}
.xu5-community-html a:not([style*="color"]) {
    color: #409eff;
}
.xu5-community-html a:hover {
    text-decoration: underline;
}
.xu5-community-html ul,
.xu5-community-html ol {
    margin: 0 0 10px;
    padding-left: 1.25em;
}
.xu5-community-html li {
    margin: 0 0 4px;
}
.xu5-community-html strong,
.xu5-community-html b {
    font-weight: 700;
}

/* 页脚入口 */
.xu5-footer-community {
    display: inline;
}
.footer-bottom .xu5-footer-community {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: #888;
}
.footer-bottom .xu5-footer-community .xu5-footer-nav-link {
    cursor: pointer;
}

/* 弹层 */
.xu5-community-modal[hidden] {
    display: none !important;
}
.xu5-community-modal {
    position: fixed;
    inset: 0;
    z-index: 100050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.xu5-community-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}
.xu5-community-modal-panel {
    position: relative;
    z-index: 1;
    width: min(400px, 100%);
    max-height: min(86vh, 640px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    border-radius: 12px;
    padding: 24px 20px 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    text-align: center;
    border-top: 3px solid #409eff;
}
/* 联系我们：按内容宽度，左对齐正文 */
.xu5-community-modal-panel.is-contact {
    width: auto;
    max-width: min(420px, 100%);
    min-width: 260px;
    padding: 22px 22px 18px;
    text-align: center;
}
.xu5-community-modal-panel.is-contact .xu5-community-modal-title {
    font-size: 16px;
    margin-bottom: 12px;
}
.xu5-community-modal-panel.is-contact .xu5-community-html {
    margin: 0 auto;
}
.xu5-community-modal-close {
    position: absolute;
    top: 8px;
    right: 12px;
    border: 0;
    background: transparent;
    font-size: 24px;
    line-height: 1;
    color: #909399;
    cursor: pointer;
    padding: 4px 8px;
}
.xu5-community-modal-close:hover {
    color: #409eff;
}
.xu5-community-modal-title {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 6px;
}
.xu5-community-modal-desc {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 16px;
    line-height: 1.5;
}
.xu5-community-modal-section {
    margin-bottom: 4px;
}
.xu5-community-modal-section.is-dim {
    display: none;
}

.xu5-community-qrs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
}

.xu5-community-qr-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.xu5-community-qr-item img {
    width: 160px;
    height: 160px;
    object-fit: contain;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 8px;
    box-sizing: border-box;
}

.xu5-community-qr-item .xu5-community-qr-label {
    font-size: 13px;
    color: #495057;
    font-weight: 600;
}

.xu5-community-qr-item .xu5-community-qr-note {
    font-size: 12px;
    color: #909399;
    max-width: 160px;
    line-height: 1.3;
}

@media screen and (max-width: 480px) {
    .xu5-community-qr-item img {
        width: 148px;
        height: 148px;
    }
}
