/* 评论视频：列表缩略 + 播放弹层
   2026-10-21c：弹层黑框收缩贴住视频尺寸（原先固定 900px 宽，竖版视频两侧大片黑底）
   2026-10-21b 修复：缩略图不再 width:100% 强拉元素框（框比例≠视频比例时内容被
   拉伸/加黑边，竖版 9:16 视频变形明显）。改为宽高均 auto + max 约束，元素框完全
   跟随视频固有比例，任何浏览器下都严格同比例缩放、完整显示（object-fit 无关紧要）。
   颜色沿用主题 --servixa-* / --store-accent 变量，不写死色值；RTL 无方向性属性，无需镜像 */

/* ---------- 列表里的视频卡片 ---------- */
.fc-mall-comment-video {
    margin-top: 12px;
    row-gap: 8px;
}
.fc-mall-comment-video .thumbnail {
    position: relative;
    display: block;
    margin: 0;
    padding: 4px;
    border: 1px solid rgba(var(--servixa-black-rgb, 17, 17, 17), .10);
    border-radius: 8px;
    background: #fafafa;
    overflow: hidden;
    cursor: pointer;
}
.fc-mall-comment-video .thumbnail video {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 220px;
    margin: 0 auto;
    object-fit: contain;
    background: #000;
    border-radius: 4px;
}
.fc-mall-comment-video .thumbnail:hover video {
    opacity: .92;
}

/* 播放按钮：绝对定位居中，RTL 下同样居中，无方向属性 */
.nk-video-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    line-height: 1;
    pointer-events: none;
    transition: background-color .2s ease, transform .2s ease;
}
.fc-mall-comment-video .thumbnail:hover .nk-video-play {
    background: rgba(0, 0, 0, .75);
    transform: translate(-50%, -50%) scale(1.06);
}
.nk-video-play .fa {
    margin: 0;
    /* 三角形视觉重心偏左，往右补一点让它看起来居中 */
    margin-inline-start: 2px;
}

@media (max-width: 767.98px) {
    .fc-mall-comment-video {
        margin-left: -4px;
        margin-right: -4px;
    }
    .fc-mall-comment-video > [class*="col-"] {
        width: 50%;
        max-width: 50%;
        padding-left: 4px;
        padding-right: 4px;
    }
    .fc-mall-comment-video .thumbnail video {
        max-height: 160px;
    }
    .nk-video-play {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }
}

/* ---------- 播放弹层 ---------- */
.nk-video-modal {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .82);
    padding: 16px;
}
.nk-video-modal.is-open {
    display: flex;
}
.nk-video-modal-inner {
    position: relative;
    /* 黑框收缩贴住视频实际尺寸（不再固定 900px 宽），效果对齐图片大图预览 */
    width: auto;
    max-width: 90vw;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .5);
}
.nk-video-modal-inner video {
    display: block;
    /* 宽高跟随视频固有比例，仅限制最大尺寸；弹层外层是 flex 居中，黑框随内容收缩 */
    width: auto;
    max-width: 90vw;
    height: auto;
    max-height: 84vh;
    background: #000;
}
.nk-video-modal-close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}
.nk-video-modal-close:hover {
    background: rgba(0, 0, 0, .8);
}
