/**
 * 运营发展 · 节日装饰样式（配 festival.js）
 *
 * 生效时 body 带 festival-on + festival-theme-<key>；徽饰为 .site-header 内
 * 绝对定位 span（不占布局、不参与交互）；祝福条插在 header 之后。
 * 移动端（≤480px）徽饰缩小、祝福条 12.5px 单行省略、关闭热区 26px。
 */

/* ---------- ① 主题色导航栏（整条渐变覆盖） ---------- */
body.festival-on .site-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%); /* fallback */
}
body.festival-theme-spring .site-header,
body.festival-theme-chu_xi .site-header {
    background: linear-gradient(135deg, #8f0f1e 0%, #c8102e 40%, #a50e22 70%, #7c0d19 100%);
}
body.festival-theme-yuan_dan .site-header {
    background: linear-gradient(135deg, #a3121c 0%, #d82531 45%, #a3121c 100%);
}
body.festival-theme-national .site-header {
    background: linear-gradient(135deg, #b0120a 0%, #de2910 45%, #c21f0c 100%);
}
body.festival-theme-midautumn .site-header {
    background: linear-gradient(135deg, #14263f 0%, #1f3a5f 45%, #2c4a75 100%);
}
body.festival-theme-wu_yi .site-header {
    background: linear-gradient(135deg, #b23a12 0%, #e05c1f 50%, #b23a12 100%);
}
body.festival-theme-duan_wu .site-header {
    background: linear-gradient(135deg, #14532d 0%, #1f7a41 50%, #14532d 100%);
}
body.festival-theme-fu_nv .site-header {
    background: linear-gradient(135deg, #9d2463 0%, #d4548f 50%, #9d2463 100%);
}
body.festival-theme-qing_nian .site-header {
    background: linear-gradient(135deg, #c2410c 0%, #ea7317 50%, #c2410c 100%);
}
body.festival-theme-er_tong .site-header {
    background: linear-gradient(135deg, #b45309 0%, #f59e0b 50%, #b45309 100%);
}
body.festival-theme-jian_jun .site-header {
    background: linear-gradient(135deg, #3f4d1f 0%, #5c6b2d 50%, #3f4d1f 100%);
}
body.festival-theme-qing_ming .site-header {
    background: linear-gradient(135deg, #5c6b70 0%, #7b8a90 50%, #6a797e 100%);
}

/* logo 圆标与主题呼应（白底色块上的字色） */
body.festival-theme-spring .site-logo,
body.festival-theme-national .site-logo { filter: saturate(1.15); }

/* ---------- ② 悬挂徽饰（绝对定位，不占布局，避开右侧菜单） ---------- */
.festival-badge {
    position: absolute;
    top: 10px;
    line-height: 1;
    z-index: 3;
    pointer-events: none;
    user-select: none;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
    font-size: 26px;
    right: 150px;
}
.festival-badge-l2 { font-size: 20px; right: 118px; top: 20px; }

/* ---------- ③ 渐变祝福条 ---------- */
.festival-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 15px;
    font-weight: bold;
    letter-spacing: 1px;
    padding: 10px 48px;
    position: relative;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
    /* 兜底背景：custom/未来新增主题漏配时保持不透明（fixed 悬浮时透明会与页面内容重叠） */
    background: linear-gradient(90deg, #1e3c72 0%, #2a5298 50%, #1e3c72 100%);
}
body.festival-theme-spring .festival-bar,
body.festival-theme-chu_xi .festival-bar { background: linear-gradient(90deg, #c8102e 0%, #e8542f 50%, #c8102e 100%); }
body.festival-theme-yuan_dan .festival-bar { background: linear-gradient(90deg, #c01522 0%, #e0403f 50%, #c01522 100%); }
body.festival-theme-national .festival-bar { background: linear-gradient(90deg, #de2910 0%, #f05a28 50%, #de2910 100%); }
body.festival-theme-midautumn .festival-bar { background: linear-gradient(90deg, #1f3a5f 0%, #3a5a8f 50%, #1f3a5f 100%); }
body.festival-theme-wu_yi .festival-bar { background: linear-gradient(90deg, #c2410c 0%, #e86a1f 50%, #c2410c 100%); }
body.festival-theme-duan_wu .festival-bar { background: linear-gradient(90deg, #14532d 0%, #2c8a4e 50%, #14532d 100%); }
body.festival-theme-fu_nv .festival-bar { background: linear-gradient(90deg, #a82568 0%, #e06aa4 50%, #a82568 100%); }
body.festival-theme-qing_nian .festival-bar { background: linear-gradient(90deg, #cc4a0a 0%, #f08524 50%, #cc4a0a 100%); }
body.festival-theme-er_tong .festival-bar { background: linear-gradient(90deg, #d97706 0%, #fbbf24 50%, #d97706 100%); color: #4a2c05; text-shadow: none; }
body.festival-theme-jian_jun .festival-bar { background: linear-gradient(90deg, #4a5a22 0%, #6d7d38 50%, #4a5a22 100%); }
body.festival-theme-qing_ming .festival-bar {
    background: #eef1f1;
    color: #5c6b70;
    font-weight: normal;
    text-shadow: none;
    border-bottom: 1px solid #e2e8e9;
}
.festival-bar .fb-text {
    flex: 1 1 auto;
    min-width: 0; /* flex 子项允许收缩，长文案 ellipsis 才能生效 */
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.festival-bar .fb-close {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.85);
    color: #7c0d19;
    flex: 0 0 auto;
}
body.festival-theme-qing_ming .festival-bar .fb-close { color: #5c6b70; background: rgba(0, 0, 0, 0.06); }

/* ---------- 移动端（≤480px） ---------- */
@media (max-width: 480px) {
    .festival-badge { font-size: 20px; right: 56px; top: 8px; }
    .festival-badge-l2 { display: none; }
    .festival-bar {
        font-size: 12.5px;
        padding: 9px 42px;
        letter-spacing: 0;
    }
    .festival-bar .fb-close { width: 26px; height: 26px; right: 10px; }
}
