/* 2.0.198: member prompts on resource articles (see assets/js/member-cta.js). */

/* 2.0.199: no flash of B2's original prompt. Until the script has handled a
   box, its content is invisible; a delayed animation brings it back after
   2.5 s in case the script never runs, so nothing can stay hidden. */
@keyframes bk-cta-reveal { to { visibility: visible; } }
.video-role-info:not([data-bk-cta]):not([data-bk-cta-skip]) > div,
.download-item.not-allow-down:not([data-bk-cta-checked]) .download-current,
.download-item.not-allow-down:not([data-bk-cta-checked]) .download-button-box {
    visibility: hidden;
    animation: bk-cta-reveal 0s linear 2.5s forwards;
}

/* Video lock: one clear line, one red button, one quiet login link. */
.video-role-info[data-bk-cta] .video-role-list[hidden],
.video-role-info[data-bk-cta] .video-view-button[hidden] { display: none !important; }
.video-role-info[data-bk-cta] .video-tips {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
    padding: 0 10px;
    height: 24px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-size: 12px;
}
.video-role-info[data-bk-cta] .video-tips b { font-weight: 500; }
.video-role-info[data-bk-cta] p { margin: 0 0 16px; color: #fff; font-size: 16px; font-weight: 600; line-height: 1.5; }
.bk-cta-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 18px; }
.bk-cta-actions .bk-cta-join {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 132px;
    height: 40px;
    padding: 0 20px;
    border-radius: 8px;
    background: var(--b2color, #fd4c4c);
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    transition: background-color .16s ease-out;
}
.bk-cta-actions .bk-cta-join:hover { background: #e8403f; }
.bk-cta-actions .bk-cta-join:focus-visible,
.bk-cta-actions .bk-cta-login:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.video-role-info[data-bk-cta] .bk-cta-login { color: rgba(255, 255, 255, .82) !important; font-size: 13px; }
.video-role-info[data-bk-cta] .bk-cta-login:hover { color: #fff !important; text-decoration: underline; text-underline-offset: 3px; }

/* B2's "观看预览视频" (only when the video has a preview clip), as an outline button. */
.bk-cta-actions .bk-cta-preview {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    padding: 0 18px;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 8px;
    background: transparent;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color .16s ease-out;
}
.bk-cta-actions .bk-cta-preview i { font-size: 18px; }
.video-role-info .bk-cta-actions .bk-cta-preview,
.video-role-info .bk-cta-actions .bk-cta-preview i { color: #fff !important; }
.bk-cta-actions .bk-cta-preview:hover { background: rgba(255, 255, 255, .12); }
.bk-cta-actions .bk-cta-preview:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Download box for visitors / non-members: what membership gives + the two actions. */
.download-item[data-bk-cta-locked] .download-current,
.download-item[data-bk-cta-locked] .download-button-box { display: none !important; }
.download-item .bk-cta-download {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f2f5;
}
.download-item .bk-cta-download p { margin: 0; color: #475467; font-size: 14px; line-height: 1.6; }
.download-item .bk-cta-download .bk-cta-actions { justify-content: flex-end; }
.download-item .bk-cta-download .bk-cta-login { color: #475467 !important; font-size: 13px; }
.download-item .bk-cta-download .bk-cta-login:hover { color: var(--b2color, #fd4c4c) !important; }
.download-item .bk-cta-download .bk-cta-join:focus-visible { outline-color: var(--b2color, #fd4c4c); }
@media (max-width: 600px) {
    .download-item .bk-cta-download { flex-direction: column; align-items: stretch; }
    .download-item .bk-cta-download .bk-cta-actions { justify-content: space-between; }
    .download-item .bk-cta-download .bk-cta-join { flex: 1 1 auto; }
    .video-role-info[data-bk-cta] p { font-size: 15px; margin-bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) { .bk-cta-actions .bk-cta-join { transition: none; } }
