/* ux-builder/video/style.css */

/* =========================================
   1. VIDEO CONTAINER
   ========================================= */
.htdev-video {
    width: 100%;
    margin-bottom: 30px;
}

.htdev-video__wrapper {
    position: relative;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
}


/* =========================================
   2. THUMBNAIL STATE
   ========================================= */
.htdev-video__thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.htdev-video__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35);
    transition: background 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.htdev-video__wrapper:hover .htdev-video__overlay {
    background: rgba(0, 0, 0, 0.45);
}


/* =========================================
   3. TITLE
   ========================================= */
.htdev-video__title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -70%);
    z-index: 3;
    color: #fff;
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    line-height: 1.35;
    width: 80%;
    max-width: 700px;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

@media (max-width: 849px) {
    .htdev-video__title {
        font-size: 22px;
    }
}

@media (max-width: 549px) {
    .htdev-video__title {
        font-size: 17px;
        width: 90%;
        top: 36%;
    }

    .htdev-video__play-btn {
        top: 45%;
    }
}


/* =========================================
   4. PLAY BUTTON
   ========================================= */
.htdev-video__play-btn {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, 20%);
    z-index: 3;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    outline: none;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.htdev-video__play-btn:hover {
    transform: translate(-50%, 20%) scale(1.1);
}

.htdev-video__play-icon {
    width: 64px;
    height: 64px;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
    transition: filter 0.3s ease;
}

.htdev-video__play-btn:hover .htdev-video__play-icon {
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.4));
}

@media (max-width: 549px) {
    .htdev-video__play-icon {
        width: 48px;
        height: 48px;
    }

    .htdev-video__play-btn {
        top: 45%;
    }
}


/* =========================================
   5. PLAY TEXT
   ========================================= */
.htdev-video__play-text {
    position: absolute;
    top: 63%;
    left: 50%;
    transform: translate(-50%, 280%);
    z-index: 3;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.htdev-video__wrapper:hover .htdev-video__play-text {
    opacity: 1;
}

@media (max-width: 549px) {
    .htdev-video__play-text {
        font-size: 12px;
        top: 49%;
    }
}


/* =========================================
   6. PLAYER STATE (iframe)
   ========================================= */
.htdev-video__player {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 */
    background: #000;
}

.htdev-video__player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* When video is playing, hide the thumbnail */
.htdev-video__wrapper.is-playing .htdev-video__thumbnail {
    display: none;
}

.htdev-video__wrapper.is-playing .htdev-video__player {
    display: block !important;
}