/* ==========================================================================
   site.css —— 全站母版（template.blade.php）专用样式
   原先以 <style> 内联在母版里，抽出后可被浏览器缓存，也便于集中维护。
   ========================================================================== */

/* --------------------------------------------------------------------------
   顶部滚动通知栏
   -------------------------------------------------------------------------- */

@keyframes scroll-left {
    0%   { transform: translateX(100vw); }
    100% { transform: translateX(-100%); }
}

#scrolling_notice {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background-color: #ff6b35;
    color: #fff;
    z-index: 10000000;
    overflow: hidden;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

#scrolling_notice .notice-text {
    animation: scroll-left 20s linear infinite;
    line-height: 50px;
    font-size: 18px;
    font-weight: bold;
}

/* --------------------------------------------------------------------------
   通知栏占位补偿（自适应吸顶）
   通知栏高 40px 且为 fixed 定位；当它存在时，需把吸顶导航与首页主内容区整体下推，
   否则会被通知栏盖住。当它不存在（config 中 notice.text 置空 / 未配置 notice）时，
   不应再预留这 40px，否则吸顶后会留下一段空白。
   做法：默认不预留（吸顶到顶端）；仅当 <body> 带 has-notice 类时才下推 40px。
   has-notice 由 template.blade.php 依据 config('site.notice.*') 统一加上，
   与 header.blade.php 中通知栏的渲染条件保持一致。
   注意：#layout_diy_1566354692 是首页主内容容器的历史 ID，仅首页存在。
   -------------------------------------------------------------------------- */

#comm_layout_header {
    top: 0 !important;
}

#layout_diy_1566354692 {
    /*margin-top: 93px !important; 仅页头高度 */
}

body.has-notice #comm_layout_header {
    top: 40px !important; /* 页头吸顶时位于通知栏之下 */
}

body.has-notice #layout_diy_1566354692 {
    margin-top: 133px !important; /* 原 93px + 通知栏 40px */
}
