/* ===== 通用打赏样式（社区帖 / 主站文章共用）=====
 * 独立成文件，不依赖 forum.css；暗黑变量自带，主站页可直接引用。
 */

/* 暗黑变量（自带 fallback，不依赖外部主题变量） */
html.io-black-mode {
    --nvl-tip-border: #3a3a3e;
    --nvl-tip-bg: #2a2a2e;
    --nvl-tip-ink: #ddd;
}

/* ===== 打赏作者横幅 ===== */
.forum-tip-banner {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 16px; margin: 14px 0 0;
    background: linear-gradient(135deg, #fff3ee, #fff9f3);
    border: 1px solid #ffe2d7; border-radius: 10px;
}
.tip-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tip-ico {
    width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
    background: #ffe3d8; color: #ff4713; font-size: 28px;
    display: flex; align-items: center; justify-content: center;
}
.tip-txt { min-width: 0; }
.tip-txt b { display: block; font-size: 14px; color: #333; line-height: 1.4; }
.tip-txt span { display: block; font-size: 12px; color: #999; line-height: 1.5; }
.tip-btn {
    display: inline-flex; align-items: center; gap: 5px;
    border: 0; border-radius: 8px; padding: 8px 16px; flex-shrink: 0;
    background: #ff4713; color: #fff; font-size: 13px; cursor: pointer;
    transition: opacity .2s;
}
.tip-btn:hover { opacity: .88; }
.tip-right { display: flex; align-items: center; gap: 10px; min-width: 0; flex-shrink: 0; }
/* 打赏人头像组（重叠圆头像，可点开列表） */
.tip-avatars { display: inline-flex; align-items: center; cursor: pointer; }
.tip-avatars img {
    width: 26px; height: 26px; border-radius: 50%;
    border: 2px solid #fff; object-fit: cover; background: #fff1ec;
}
.tip-avatars img + img { margin-left: -9px; }
.tip-avatars:hover img { border-color: #ffe3d8; }
.tip-total { font-size: 13px; color: #999; cursor: pointer; white-space: nowrap; }
.tip-total:hover { color: #ff4713; }
.tip-total b { color: #ff4713; font-size: 15px; }
/* 自定义积分 */
.tip-custom { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.tip-custom span { font-size: 13px; color: #666; flex-shrink: 0; }
.tip-custom input {
    flex: 1; min-width: 0; height: 38px; padding: 0 10px;
    border: 1px solid #e5e5e5; border-radius: 8px;
    font-size: 14px; color: #333; outline: none;
    -moz-appearance: textfield;
}
.tip-custom input::-webkit-inner-spin-button, .tip-custom input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.tip-custom input:focus { border-color: #ff4713; }
.tip-custom em { font-style: normal; font-size: 13px; color: #999; flex-shrink: 0; }
/* 打赏列表弹层 */
.tip-list-body { max-height: 320px; overflow-y: auto; padding: 6px 16px; }
.tip-list-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #f5f5f5; }
.tip-list-item:last-child { border-bottom: 0; }
.tip-list-item img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: #fff1ec; flex-shrink: 0; }
.tip-list-item .tl-name { flex: 1; min-width: 0; font-size: 14px; color: #333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tip-list-item .tl-time { font-size: 12px; color: #bbb; flex-shrink: 0; }
.tip-list-item .tl-points { font-size: 13px; color: #ff4713; flex-shrink: 0; white-space: nowrap; }
.tip-list-empty { padding: 30px 0; text-align: center; font-size: 13px; color: #aaa; }
/* 打赏弹层 */
.tip-modal-mask {
    position: fixed; inset: 0; z-index: 9999; padding: 20px;
    background: rgba(0,0,0,.45);
    display: flex; align-items: center; justify-content: center;
}
.tip-modal {
    width: 340px; max-width: 100%;
    background: #fff; border-radius: 12px; overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,.18);
}
.tip-modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px; font-size: 15px; font-weight: 600; color: #333;
    border-bottom: 1px solid #f0f0f0;
}
.tip-close { border: 0; background: none; font-size: 22px; line-height: 1; color: #999; cursor: pointer; padding: 0 2px; }
.tip-modal-body { padding: 16px; }
.tip-opts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tip-opt {
    padding: 10px 0; border: 1px solid #e5e5e5; border-radius: 8px;
    background: #fff; color: #555; font-size: 14px; cursor: pointer;
    transition: border-color .15s, background .15s;
}
.tip-opt:hover { border-color: #ff4713; }
.tip-opt.is-on { border-color: #ff4713; background: #fff1ec; color: #ff4713; font-weight: 600; }
.tip-note { margin: 12px 0 0; font-size: 12px; color: #aaa; line-height: 1.6; }
.tip-note b { color: #ff4713; font-size: 13px; }
.tip-modal-foot { display: flex; gap: 10px; padding: 0 16px 16px; }
.tip-cancel {
    flex: 1; padding: 10px 0; border: 1px solid #e5e5e5; border-radius: 8px;
    background: #fff; color: #666; font-size: 14px; cursor: pointer;
}
.tip-confirm {
    flex: 1; padding: 10px 0; border: 0; border-radius: 8px;
    background: #ff4713; color: #fff; font-size: 14px; cursor: pointer;
    transition: opacity .2s;
}
.tip-confirm:hover { opacity: .88; }
/* 手机端：横幅收窄 */
@media (max-width: 767px) {
    .forum-tip-banner { padding: 10px 12px; gap: 8px; }
    .tip-ico { width: 32px; height: 32px; font-size: 26px; }
    .tip-btn { padding: 7px 12px; }
}
/* 暗黑模式 */
.io-black-mode .forum-tip-banner { background: rgba(255,71,19,.10); border-color: var(--nvl-tip-border); }
.io-black-mode .tip-txt b { color: var(--main-color, #eee); }
.io-black-mode .tip-ico { background: rgba(255,71,19,.25); color: #ff9b78; }
.io-black-mode .tip-modal { background: var(--nvl-tip-bg); }
.io-black-mode .tip-modal-head { color: #eee; border-bottom-color: var(--nvl-tip-border); }
.io-black-mode .tip-opt { background: transparent; border-color: var(--nvl-tip-border); color: #ccc; }
.io-black-mode .tip-opt.is-on { background: rgba(255,71,19,.18); border-color: #ff4713; color: #ff9b78; }
.io-black-mode .tip-note { color: #888; }
.io-black-mode .tip-cancel { background: transparent; border-color: var(--nvl-tip-border); color: #ccc; }
/* 打赏头像组/自定义/列表 暗黑 */
.io-black-mode .tip-avatars img { border-color: var(--nvl-tip-bg); background: rgba(255,71,19,.2); }
.io-black-mode .tip-custom input { background: transparent; border-color: var(--nvl-tip-border); color: var(--nvl-tip-ink); }
.io-black-mode .tip-custom span { color: #aaa; }
.io-black-mode .tip-list-item { border-bottom-color: var(--nvl-tip-border); }
.io-black-mode .tip-list-item img { background: rgba(255,71,19,.2); }
.io-black-mode .tip-list-item .tl-name { color: var(--nvl-tip-ink); }
/* 手机端：横幅换行 + 头像组跟随 */
@media (max-width: 767px) {
    .forum-tip-banner { flex-wrap: wrap; }
    .tip-right { width: 100%; justify-content: flex-end; }
    .tip-avatars img { width: 22px; height: 22px; }
}
