/* Scope box-sizing to vp-video subtree only, do NOT pollute Discuz global */
.vp-video,
.vp-video *,
.vp-video *:before,
.vp-video *:after {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

.ylvbtnlink {
    color: #deb370;
    background: url(q.png) no-repeat 0 0;
    padding: 0 0 0 18px;
    margin: 0 0 0 10px;
}

.bqx {
    margin-top: 6px;
}

.vodwh {
    width: 326px;
    height: 480px;
}

.preview_vod {
    overflow: hidden;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    position: relative;
}

.pr_playbtn {
    position: absolute;
    z-index: 1;
    width: 100px;
    height: 100px;
    border-radius: 100%;
    background: rgba(255, 255, 255, 0.2);
    border: solid 2px rgba(255, 255, 255, 0.3);
    top: 50%;
    left: 50%;
    -webkit-transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
}

.pr_playbtn img {
    width: 50px;
    height: 50px;
    margin: 25px;
    opacity: 0.7;
    -webkit-user-drag: none;
    user-drag: none;
}

.pr_showbg {
    background: #0E0E0E;
}

.pr_showbg img {
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
    object-fit: cover;
    -webkit-transform: scale(1);
    -ms-transform: scale(1);
    transform: scale(1);
    -webkit-transition: all 0.5s;
    -o-transition: all 0.5s;
    transition: all 0.5s;
    -webkit-user-drag: none;
    user-drag: none;
}

.preview_vod:hover .pr_showbg img {
    -webkit-transform: scale(1.1);
    -ms-transform: scale(1.1);
    transform: scale(1.1);
    -webkit-transition: all 0.5s;
    -o-transition: all 0.5s;
    transition: all 0.5s;
    opacity: 0.9;
}

.preview_vod:hover {
    cursor: pointer;
}

.preview_vod:hover .pr_playbtn {
    background: rgba(255, 255, 255, 0.3);
    border: solid 2px rgba(255, 255, 255, 0.4);
}

.preview_vod:hover .pr_playbtn img {
    opacity: 0.9;
}

.ylvod_vipbuy a {
    color: #ff5500;
}

/* ====== 电脑版 VP 弹窗："视频仅供黄金及以上会员下载 + 立即开通VIP" 一行显示 ======
 * vp.js 默认把提示和开通按钮放在两个独立 <div> 中导致必然两行。
 * Discuz showDialog() 会给内容外层套上 <div class="m_c alert_error"> (非 alert_message)
 * 且内部两个子块会被自动再包一层 <p>。这里选择器同时覆盖：
 *   ① layer.open skin=vp-dialog 路径 (.layui-layer.vp-dialog .layui-layer-content)
 *   ② Discuz showDialog alert 路径 (.fwin_dialog .m_c.alert_error)
 *   ③ showDialog 自定义路径 (.showDialog_pop .alert_error / .fwin_dialog .alert_error)
 * 仅对 ≥769px 电脑版生效，≤768px 小屏保持原两排布局避免溢出。 */
@media screen and (min-width: 769px) {
    /* ===== layer.open skin=vp-dialog 路径 ===== */
    .layui-layer.vp-dialog .layui-layer-content,
    /* ===== Discuz 原生 showDialog：alert/alert_error 类型 ===== */
    .fwin_dialog .m_c.alert_error,
    .fwin_dialog .alert_error,
    .showDialog_pop .m_c.alert_error,
    .showDialog_pop .alert_error {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: baseline !important;
        gap: 8px !important;
        white-space: nowrap !important;
    }
    /* 子级：vp.js 直接传入的 <div> / showDialog 包好的 <p> 一律 inline-block，不换行 */
    .layui-layer.vp-dialog .layui-layer-content > div,
    .layui-layer.vp-dialog .layui-layer-content > p,
    .fwin_dialog .m_c.alert_error > div,
    .fwin_dialog .m_c.alert_error > p,
    .fwin_dialog .alert_error > div,
    .fwin_dialog .alert_error > p,
    .showDialog_pop .alert_error > div,
    .showDialog_pop .alert_error > p {
        display: inline-block !important;
        vertical-align: baseline !important;
        margin: 0 !important;
        padding: 0 !important;
        white-space: nowrap !important;
        /* 防止 p 标签的 line-height:260% 让第二行"看起来像是"真的在另一行 */
        line-height: inherit !important;
    }
    /* 当 vp.js 两个子块被 alert_error 包在同一个 p 里时，再降一层 */
    .fwin_dialog .alert_error > * > div,
    .fwin_dialog .alert_error > * > p,
    .fwin_dialog .alert_error div.ylvod_vipbuy,
    .showDialog_pop .alert_error div.ylvod_vipbuy {
        display: inline-block !important;
        vertical-align: baseline !important;
        white-space: nowrap !important;
        margin: 0 !important;
    }
    .ylvod_vipbuy {
        flex: 0 0 auto;
        white-space: nowrap;
        margin-left: 4px;
    }
    .ylvod_vipbuy a {
        white-space: nowrap;
    }
}

/* 无论屏幕大小，.ylvod_vipbuy 本身不做块级（避免在未被 Flex 命中的路径下独占一整行） */
.ylvod_vipbuy {
    margin: 0;
    padding: 0;
    display: inline;
    white-space: nowrap;
}
.ylvod_vipbuy a {
    display: inline-block;
}

/* Tablet: width <= 768px */
@media (max-width: 768px) {
    .vodwh {
        width: 272px;
        height: 400px;
    }
    .pr_playbtn {
        width: 80px;
        height: 80px;
    }
    .pr_playbtn img {
        width: 40px;
        height: 40px;
        margin: 20px;
    }
}

/* Mobile: width <= 480px */
@media (max-width: 480px) {
    .vodwh {
        width: 100%;
        max-width: 320px;
        height: auto;
        aspect-ratio: 326 / 480;
    }
    .vp-video.vodwh {
        display: inline-block;
        width: 320px;
        max-width: 100%;
        vertical-align: top;
    }
    .pr_playbtn {
        width: 22vw;
        height: 22vw;
        max-width: 72px;
        max-height: 72px;
        min-width: 48px;
        min-height: 48px;
    }
    .pr_playbtn img {
        width: 50%;
        height: 50%;
        margin: 25%;
    }
}

/* ---- Discuz alert popup (购买视频/播放无权限) 窄屏防溢出 ---- *
 * 仅在 小屏(≤420px) 时允许 alert_error 内容换行, 保持图标+文字垂直居中 */
@media (max-width: 420px) {
    .alert_right,
    .alert_error,
    .alert_info {
        white-space: normal !important;
        -ms-flex-wrap: wrap;
        flex-wrap: wrap;
        word-break: break-word;
        min-height: 56px;
        height: auto !important;
        padding: 10px 10px 10px 52px !important;
    }
    .alert_right p,
    .alert_error p,
    .alert_info p {
        margin: 0;
        padding: 0;
        line-height: 1.6;
        width: 100%;
    }
    /* 弹窗面板整体小屏适配，留安全边距 */
    .fwin {
        max-width: calc(100vw - 16px) !important;
    }
    .fwin .m_c {
        min-width: 0 !important;
    }
}
