@import url("../../features/play-button.css");

.video-thumbnail {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 2rem auto 0;
    cursor: pointer;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-thumbnail:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.video-thumbnail img {
    width: 100%;
    display: block;
    filter: brightness(80%);
    transition: filter 0.3s ease;
}

.video-thumbnail:hover img {
    filter: brightness(60%);
}

#play-area {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
}

.video-dialog {
    padding: 0;
    border: none;
    width: 95%;
    max-width: 900px;
    background: transparent;
    margin: auto;
}

.video-dialog::backdrop {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
}

/* DIALOG CONTENT — very important */
.video-dialog-content {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 12px;
    overflow: hidden;

    isolation: isolate;
    z-index: 10;
}

button.video-dialog-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--black-a70);
    border: none;
    color: var(--vermilion);
    font-size: 26px;
    cursor: pointer;
    padding: 3px 10px;
    border-radius: 6px;
    z-index: 999999 !important;
}

button.video-dialog-close:hover {
    background: var(--vermilion);
    color: var(--white);
}

/* IFRAME */
#videoPlayer iframe {
    width: 100%;
    aspect-ratio: 16/9;
    display: block;
    border: none;
    pointer-events: auto;
    position: relative;
    z-index: 1;
}

@media (max-width: 900px) {
    .video-thumbnail {
        border-radius: 12px;
    }
}