/* ==========================================================================
   Helsuo 功能锁定 / 隐藏 样式（feature-flag.css）
   --------------------------------------------------------------------------
   配合 feature-flag.js：
     .hs-feat-hidden        入口被隐藏（display:none）
     .hs-feat-locked        入口被锁定（置灰 + 禁止点击）
     .hs-feat-gate          整页拦截遮罩（挂在 documentElement 上）
     .hs-feat-bar           页面顶部的「维护中」横幅
     .hs-feat-admin-badge   管理员预览提示（右下角）
   视觉沿用站点既有变量（--bg-* / --text-* / --accent），自动适配明暗主题。
   ========================================================================== */

/* ---------------- 入口状态 ---------------- */
.hs-feat-hidden {
    display: none !important;
}

.hs-feat-locked {
    opacity: 0.5;
    filter: grayscale(0.85);
    cursor: not-allowed !important;
    pointer-events: auto;
}

.hs-feat-locked:hover {
    opacity: 0.7;
}

/* ---------------- 隐藏：整页拦截 ---------------- */
.hs-feat-gate {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--bg-primary, #f7f9fc);
    background-image: radial-gradient(1000px 500px at 50% -10%, rgba(73, 177, 245, 0.14), transparent 70%);
    animation: hsFeatGateIn 0.35s ease both;
}

@keyframes hsFeatGateIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.hs-feat-gate-card {
    width: min(520px, 100%);
    padding: 40px 34px;
    text-align: center;
    background: var(--bg-card, #fff);
    border: 1px dashed var(--border-color, #e3e8ef);
    border-radius: 20px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
}

.hs-feat-gate-icon {
    width: 62px;
    height: 62px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-secondary, #7c8794);
    background: var(--bg-primary, #f2f5f9);
    border: 1px solid var(--border-color, #e3e8ef);
}

.hs-feat-gate-card h1 {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary, #1f2733);
}

.hs-feat-gate-card p {
    margin: 0 0 6px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary, #7c8794);
}

.hs-feat-gate-sub {
    font-size: 13px !important;
    opacity: 0.85;
}

.hs-feat-gate-actions {
    margin-top: 22px;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.hs-feat-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 20px;
    border-radius: 10px;
    border: none;
    background: var(--accent, #49b1f5);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.hs-feat-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(73, 177, 245, 0.3);
}

.hs-feat-btn.ghost {
    background: transparent;
    color: var(--text-primary, #1f2733);
    border: 1px solid var(--border-color, #e3e8ef);
}

.hs-feat-btn.ghost:hover {
    border-color: var(--accent, #49b1f5);
    color: var(--accent, #49b1f5);
    box-shadow: none;
}

/* ---------------- 锁定：顶部维护横幅 ---------------- */
.hs-feat-bar {
    position: sticky;
    top: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 16px;
    font-size: 13px;
    color: #92400e;
    background: #fef3c7;
    border-bottom: 1px solid #f59e0b;
    animation: hsFeatBarIn 0.3s ease both;
}

.hs-feat-bar.admin {
    color: #1d4ed8;
    background: #dbeafe;
    border-bottom-color: #3b82f6;
}

@keyframes hsFeatBarIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hs-feat-bar-icon {
    display: inline-flex;
    color: inherit;
}

.hs-feat-bar-text {
    flex: 1 1 240px;
    min-width: 0;
    line-height: 1.6;
}

.hs-feat-bar-back {
    flex: 0 0 auto;
    padding: 5px 12px;
    border-radius: 8px;
    border: 1px solid currentColor;
    color: inherit;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    opacity: 0.85;
    transition: opacity 0.2s ease, background 0.2s ease;
}

.hs-feat-bar-back:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.45);
}

/* ---------------- 管理员预览提示 ---------------- */
.hs-feat-admin-badge {
    position: fixed;
    right: 16px;
    bottom: 76px;
    z-index: 2147482000;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 320px;
    padding: 9px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: #1d4ed8;
    background: rgba(219, 234, 254, 0.96);
    border: 1px solid #93c5fd;
    box-shadow: 0 8px 22px rgba(29, 78, 216, 0.18);
    animation: hsFeatBadgeIn 0.3s ease both;
}

@keyframes hsFeatBadgeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
    .hs-feat-gate-card { padding: 32px 20px; }
    .hs-feat-admin-badge { left: 12px; right: 12px; max-width: none; }
}