/**
 * 子比文章隐藏插件 - 前台样式
 * Author: 子阿卿
 */

/* ========================================
   用户中心侧边栏触发按钮（复用 Zibll 的 <item> 样式）
   ======================================== */
.zibph-sidebar-trigger {
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: var(--main-radius, 8px);
}

.zibph-sidebar-trigger:hover {
    background: var(--muted-bg-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* ========================================
   弹窗内模式选择卡片
   ======================================== */
.zibph-display-modal .modal-dialog {
    max-width: 500px;
}

.zibph-display-modal .modal-footer {
    border-top: 1px solid var(--main-border-color);
    padding: 15px;
}

.zibph-display-modal .modal-body {
    min-height: 160px;
    transition: min-height 0.3s ease;
}

.zibph-mode-options {
    gap: 10px;
}

.zibph-mode-item {
    flex: 1;
    padding: 15px 10px;
    border: 2px solid var(--main-border-color);
    border-radius: var(--main-radius, 8px);
    cursor: pointer;
    transition: all 0.25s ease;
    background: var(--main-bg-color);
}

.zibph-mode-item:hover {
    border-color: var(--theme-color);
    transform: translateY(-2px);
}

.zibph-mode-item.active {
    border-color: var(--theme-color);
    background: var(--focus-color);
    box-shadow: 0 0 0 3px var(--focus-shadow-color);
}

.zibph-mode-icon {
    color: var(--muted-2-color);
    transition: color 0.25s;
}

.zibph-mode-item.active .zibph-mode-icon {
    color: var(--theme-color);
}

.zibph-mode-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--key-color);
}

.zibph-modal-error {
    padding: 8px 12px;
    background: rgba(217, 83, 79, 0.1);
    border-radius: 4px;
    border: 1px solid rgba(217, 83, 79, 0.3);
}

/* ========================================
   左侧提示弹窗 — 可关闭 + 3 秒自动关闭
   ======================================== */
.zibph-notice-bar {
    position: fixed;
    left: 20px;
    right: auto;
    bottom: 80px;
    z-index: 998;
    max-width: 360px;
    width: auto;
    background: var(--main-bg-color);
    border: 1px solid var(--main-border-color);
    border-radius: var(--main-radius, 8px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    padding: 12px 15px;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 1;
    transform: translateY(0);
}

.zibph-notice-bar.zibph-notice-hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.zibph-notice-nsfw {
    border-left: 3px solid #f0ad4e;
}

.zibph-notice-normal {
    border-left: 3px solid #5bc0de;
}

.zibph-notice-inner {
    gap: 6px;
}

.zibph-notice-content {
    line-height: 1.5;
    font-size: 13px;
    color: var(--muted-2-color);
    min-width: 0;
}

.zibph-notice-text {
    word-break: break-word;
}

.zibph-notice-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--muted-3-color);
    cursor: pointer;
    font-size: 14px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: color 0.2s;
    line-height: 1;
}

.zibph-notice-close:hover {
    color: var(--muted-color);
}

/* ========================================
   移动端 — 左/右通用底部通栏
   ======================================== */
@media (max-width: 768px) {
    .zibph-notice-bar {
        left: 8px;
        right: 8px;
        bottom: 56px;
        max-width: none;
        width: auto;
        padding: 10px 14px;
        border-radius: var(--main-radius, 8px);
        box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.1);
    }

    .zibph-notice-inner {
        gap: 8px;
    }

    .zibph-notice-content {
        font-size: 12px;
        line-height: 1.5;
    }

    .zibph-notice-text {
        display: inline;
    }

    .zibph-notice-nsfw,
    .zibph-notice-normal {
        border-left-width: 2px;
    }

/* ========================================
   未登录保护页面
   ======================================== */
.zibph-protected-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
}

.zibph-protected-card {
    max-width: 480px;
    margin: 0 auto;
    padding: 40px 30px;
}

.zibph-protected-icon svg {
    opacity: 0.5;
}

.zibph-protected-actions {
    flex-wrap: wrap;
}

.zibph-protected-actions .but {
    min-width: 120px;
}

/* ========================================
   暗色模式适配
   ======================================== */
body.dark-theme .zibph-notice-bar {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

body.dark-theme .zibph-mode-item.active {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

/* ========================================
   移动端响应式
   ======================================== */
@media (max-width: 768px) {
    .zibph-notice-bar {
        left: 10px;
        right: 10px;
        max-width: none;
        bottom: 70px;
    }

    .zibph-protected-card {
        padding: 30px 20px;
    }

    .zibph-mode-options {
        flex-direction: column;
    }

    .zibph-mode-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 15px;
    }

    .zibph-mode-item .zibph-mode-icon {
        flex-shrink: 0;
    }
}
