.bbvideo {
    margin: 2px 0 1.5em;
    overflow: hidden;
    vertical-align: bottom;
}

/* YouTube: กำหนดขนาดจริงก่อนสร้าง iframe เพื่อไม่ให้ player โหลด thumbnail ขนาดเล็ก */
.postbody .content .bbvideo {
    position: relative;
    display: block !important;
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
    aspect-ratio: 16 / 9;
    background: #000;
}

.postbody .content .bbvideo iframe {
    position: absolute !important;
    inset: 0;
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    border: 0;
}

/* Facebook ใช้สัดส่วนที่ SDK ส่งกลับมา แต่ต้องไม่ล้นพื้นที่โพสต์ */
.postbody .content .bbvideo.vdo-facebook {
    display: block !important;
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
    overflow: visible;
    background: transparent !important;
}

.postbody .content .bbvideo.vdo-facebook .fb-video,
.postbody .content .bbvideo.vdo-facebook span,
.postbody .content .bbvideo.vdo-facebook iframe {
    max-width: 100% !important;
}

@supports not (aspect-ratio: 16 / 9) {
    .postbody .content .bbvideo {
        height: 0 !important;
        padding-bottom: 56.25%;
    }
}

#postingbox button.button-icon-only.bbcode-img {
    padding-top: 2px;
    margin-top: 2px;
    padding-right: 4px;
    margin-right: 0;
    margin-left: 1px;
    padding-left: 5px;
    padding-bottom: 2px;
}

.hidden_video {
    display: none;
}

@media only screen and (max-width: 600px) {
    .hidden_video {
        display: block;
    }
}

.left-box.action-media button.button.button-icon-only.video.btn-post-type {
    height: 25px;
    line-height: 0 !important;
    font-size: 14px;
    border-radius: 4px !important;
    width: fit-content;
    padding: 1em 0.9em;
    margin-right: 0.5em;
    background-color: #0000 !important;
    box-shadow: 0 0 0 1px #DADADA  inset !important;
    border: 1px solid #DADADA;
    color: #555 !important;
    margin-top: 3%;
}

.messagebox_overlay {
    z-index: 999;
}
