/* AZ Video Slider Frontend Styles */
.az-video-slider-container {
    width: 100%;
    margin-bottom: 30px;
}

.az-vw-title-heading {
    margin-bottom: 15px;
    font-size: 1.5em; /* Fallback size, usually overridden by theme's h2/h3 styles */
    font-weight: 600;
}

/* Main Slider (Style 1) */
.az-main-slider {
    margin-bottom: 10px;
    width: 100%;
    background: #fcfcfc;
    border: 1px solid #f1f1f1;
    position: relative;
    box-sizing: border-box;
}

.az-main-slider .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    aspect-ratio: 1 / 1;
    background: #fff;
    overflow: hidden;
}

.az-main-slider img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.az-video-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.az-video-wrapper iframe {
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
    border: none;
}

/* Video Slider (Shared / Style 2) */
.az-thumb-slider {
    width: 100%;
    position: relative;
}

.az-thumb-slider .swiper-slide {
    cursor: pointer;
    border: 2px solid transparent;
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #fff;
    box-sizing: border-box;
    overflow: hidden;
    opacity: 0.8;
    transition: opacity 0.3s, border-color 0.3s, box-shadow 0.3s;
}

/* Override for Style 2 when .az-style-2 is present */
.az-video-slider-container.az-style-2 .az-thumb-slider .swiper-slide {
    border: 1px solid #e2e2e2;
    opacity: 1;
}

.az-thumb-slider .swiper-slide:hover {
    opacity: 1;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.az-thumb-slider .swiper-slide-thumb-active {
    opacity: 1;
    border-color: #007cba;
}

.az-thumb-slider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Video Thumb Special Styling */
.az-video-thumb {
    border: 1px solid #e2e2e2;
}

.az-thumb-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #f9f9f9;
}

.az-play-icon {
    margin-bottom: 5px;
    width: 32px;
    height: 32px;
}

.az-thumb-text {
    font-size: 11px;
    color: #333;
    font-weight: 500;
}

/* Override swiper arrows for better contrast */
.az-main-slider .swiper-button-next,
.az-main-slider .swiper-button-prev,
.az-video-slider-container.az-style-2 .az-thumb-slider .swiper-button-next,
.az-video-slider-container.az-style-2 .az-thumb-slider .swiper-button-prev {
    color: #333;
    background: rgba(255,255,255,0.7);
    padding: 20px 15px;
    border-radius: 4px;
}

.az-main-slider .swiper-button-next:after, 
.az-main-slider .swiper-button-prev:after,
.az-video-slider-container.az-style-2 .az-thumb-slider .swiper-button-next:after, 
.az-video-slider-container.az-style-2 .az-thumb-slider .swiper-button-prev:after {
    font-size: 18px;
    font-weight: bold;
}

/* ===== Trung Tin - Lity popup ===== */

.lity {
    z-index: 999999 !important;
}

.lity-wrap,
.lity-container,
.lity-content{
    width:96vw !important;
    max-width:96vw !important;
}

.lity-iframe-container{
    width:96vw !important;
    max-width:96vw !important;
    height:88vh !important;
    padding-top:0 !important;
}

.lity-iframe-container iframe{
    width:100% !important;
    height:100% !important;
}

.lity-close{
    top:8px !important;
    right:8px !important;
    font-size:42px !important;
}

@media(min-width:992px){

    .lity-wrap,
    .lity-container,
    .lity-content{

        max-width:1200px !important;
    }

    .lity-iframe-container{

        max-width:1200px !important;
        height:85vh !important;
    }

}


/* ===== Trung Tin - Custom YouTube Modal ===== */
body.az-yt-modal-open {
    overflow: hidden !important;
}

.az-yt-modal {
    position: fixed;
    inset: 0;
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.az-yt-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.88);
}

.az-yt-modal-box {
    position: relative;
    z-index: 2;
    width: 96vw;
    height: 86vh;
    max-width: 1280px;
    background: #000;
}

.az-yt-modal-box iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.az-yt-modal-close {
    position: absolute;
    top: -46px;
    right: 0;
    width: 42px;
    height: 42px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 42px;
    line-height: 42px;
    cursor: pointer;
    z-index: 3;
}

@media (max-width: 768px) {
    .az-yt-modal-box {
        width: 96vw;
        height: 88vh;
    }

    .az-yt-modal-close {
        top: -44px;
        right: 0;
    }
}

/* Trung Tin - tránh nút X đè bánh răng YouTube trên mobile */
@media (max-width: 768px) {
    .az-yt-modal-close {
        top: -52px !important;
        right: -6px !important;
        width: 46px !important;
        height: 46px !important;
        font-size: 42px !important;
        line-height: 42px !important;
        background: rgba(0,0,0,.45) !important;
        border-radius: 50% !important;
    }

    .az-yt-modal-box {
        margin-top: 42px !important;
        height: calc(88vh - 42px) !important;
    }
}
