/* 卡乐售 - 首页弹窗公告（PC / 手机端共用，由 static/common/js/site-notice.js 控制显示） */

.sn-wrap[hidden] {
    display: none !important;
}
.sn-wrap {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10001; /* 前台现有各层最高 10000（下单弹层），公告要压住它们 */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.sn-mask {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(15, 23, 42, .55);
}
.sn-box {
    position: relative;
    width: 420px;
    max-width: 100%;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, .28);
    overflow: hidden;
}
.sn-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    background: linear-gradient(90deg, #2563eb 0%, #38bdf8 100%);
    color: #fff;
}
.sn-tag {
    flex: none;
    padding: 2px 8px;
    font-size: 12px;
    line-height: 1.6;
    background: rgba(255, 255, 255, .22);
    border-radius: 999px;
}
.sn-title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 16px;
    font-weight: 700;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.sn-x {
    flex: none;
    width: 26px;
    height: 26px;
    padding: 0;
    font-size: 20px;
    line-height: 24px;
    color: #fff;
    background: transparent;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
}
.sn-x:hover {
    background: rgba(255, 255, 255, .2);
}
.sn-body {
    max-height: 46vh;
    padding: 18px 18px 6px;
    font-size: 14px;
    line-height: 1.9;
    color: #334155;
    word-break: break-word;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.sn-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px 16px;
}
.sn-tip {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 12px;
    line-height: 1.6;
    color: #94a3b8;
}
.sn-btn {
    flex: none;
    padding: 8px 22px;
    font-size: 14px;
    color: #fff;
    background: linear-gradient(90deg, #2563eb 0%, #38bdf8 100%);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
}
.sn-btn:hover {
    filter: brightness(1.06);
}
body.sn-lock {
    overflow: hidden;
}

/* 手机端：宽度按屏幅收，提示文字让位给按钮 */
@media (max-width: 640px) {
    .sn-wrap {
        padding: 24px 16px;
    }
    .sn-box {
        width: 100%;
    }
    .sn-head {
        padding: 12px 14px;
    }
    .sn-title {
        font-size: 15px;
    }
    .sn-body {
        padding: 16px 14px 4px;
        font-size: 13.5px;
        max-height: 52vh;
    }
    .sn-foot {
        padding: 12px 14px 14px;
    }
    .sn-tip {
        display: none;
    }
    .sn-btn {
        width: 100%;
        text-align: center;
    }
}
