/*!
 * portal-player.css — 门户 video.js 播放器的少量覆盖样式
 *
 * 只做四件事：
 *   1. 让播放器铺满旧 ckplayer 留下的固定尺寸盒子（.videoPlay/.video 原本靠 ckplayer 的 stretch:'fill'）；
 *   2. 把 video.js 根节点默认的 font-size:10px 提到 12px，中文控件文字才不至于过小；
 *   3. 修正居中大播放按钮在矮盒子里的尺寸；
 *   4. 提供"无播放源"时的封面兜底样式。
 *
 * 不覆盖 video.js 自带皮肤的其他规则（圆角、控制栏布局一律沿用官方 7.x 皮肤）。
 */

/*
 * 高度策略（改这里前先读完）：
 *   父盒有确定高度（.video 980×550、.VideoPanel .videoPlay 770×440、.videoContent 1280×720 等）
 *     → height:100% 直接铺满，等价于旧 ckplayer 的 stretch:'fill'。
 *   父盒高度是 auto（.videoPlay 本身没写高度，只靠外层 .video_dyw407 有尺寸；old 页面大量如此）
 *     → 百分比高度对 auto 父盒解析为 auto，此时由 aspect-ratio 兜底按 16:9 撑开。
 *   没有这一行，上述页面会渲染成 width:800 height:0 的完全黑场（实测 800×0），
 *   因为 video.js 的 fill 只加 vjs-fill（100%/100%），它自己不会造高度。
 */
.ahxf-player {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: 100%;
    background: #000;
    overflow: hidden;
}

/* 正文里由 ueditor 老标签升级而来的播放器：没有固定高盒子，交给 video.js 的 fluid 撑开 */
.ahxf-player.ahxf-playerFluid {
    height: auto;
    background: transparent;
}

.ahxf-player > .video-js,
.ahxf-player > video.video-js {
    width: 100%;
    height: 100%;
}

.ahxf-player .video-js {
    font-size: 12px;
    line-height: 1.4;
}

.ahxf-player .video-js .vjs-tech {
    object-fit: contain;
}

/* 大播放按钮：旧页面的盒子普遍偏矮（428/440/450px），把 3em 的默认按钮收到 2.4em 更协调。
   限定 .vjs-big-play-centered —— 不居中时 video.js 用左上角定位，改边距会把按钮推出可视区。 */
.ahxf-player .video-js.vjs-big-play-centered .vjs-big-play-button {
    width: 2.4em;
    height: 2.4em;
    line-height: 2.4em;
    margin-left: -1.2em;
    margin-top: -1.2em;
    border-radius: 50%;
}

/* 全屏：video.js 会把播放器搬到 body 末尾并加 .vjs-fullscreen，这里补齐高度链 */
.video-js.vjs-fullscreen,
.video-js.vjs-fullscreen .vjs-tech {
    width: 100% !important;
    height: 100% !important;
}

/* 无播放源兜底：沿用 XFWS 三页原有的封面图表现。
   高度策略同 .ahxf-player —— 父盒高度为 auto 时靠 aspect-ratio 撑出 16:9，
   否则封面兜底会塌成一行提示文字那么高。 */
.ahxf-playerEmpty {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: 100%;
    background: #000;
    overflow: hidden;
}

.ahxf-playerEmpty > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ahxf-playerEmpty > .ahxf-playerEmptyTip {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 8px 12px;
    color: #fff;
    font-size: 13px;
    line-height: 20px;
    background: rgba(0, 0, 0, .55);
    text-align: center;
}
