/**
 * Styles for Company YouTube Video Modal (VN Food Theme)
 */

.wt-youtube-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s ease;
    padding: 60px 20px 20px 20px;
    box-sizing: border-box;
}

.wt-youtube-modal.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Backdrop mờ nền hiện đại */
.wt-youtube-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
}

/* Container chứa Video */
.wt-youtube-modal__container {
    position: relative;
    width: 100%;
    max-width: 960px;
    overflow: visible;
    transform: scale(0.92) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 2;
}

.wt-youtube-modal.is-active .wt-youtube-modal__container {
    transform: scale(1) translateY(0);
}

/* Nút Đóng Tròn Nằm Phía Trên Ngoài Khung Video */
.wt-youtube-modal__close {
    position: absolute;
    top: -46px;
    right: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.25s ease, transform 0.25s ease, color 0.25s ease;
    padding: 0;
    outline: none;
}

.wt-youtube-modal__close svg {
    width: 18px;
    height: 18px;
    stroke: #ffffff;
    stroke-width: 2.2;
    transition: transform 0.25s ease;
}

.wt-youtube-modal__close:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.08) rotate(90deg);
}

.wt-youtube-modal__close:active {
    transform: scale(0.95);
}

/* Video Wrapper Tỉ lệ 16:9 Chuẩn & Bo góc */
.wt-youtube-modal__video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    background: #000000;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.wt-youtube-modal__video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .wt-youtube-modal {
        padding: 50px 14px 14px 14px;
    }

    .wt-youtube-modal__close {
        top: -42px;
        right: 0;
        width: 34px;
        height: 34px;
    }

    .wt-youtube-modal__close svg {
        width: 16px;
        height: 16px;
    }

    .wt-youtube-modal__video-wrapper {
        border-radius: 14px;
    }
}
