/* Responsive video display */
.df-video-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
}

.df-video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.df-video-container video,
.df-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Desktop video - show only on desktop */
.df-video-desktop {
    display: block;
}

.df-video-mobile {
    display: none;
}

/* Mobile video - show only on mobile */
@media (max-width: 767px) {
    .df-video-desktop {
        display: none;
    }
    
    .df-video-mobile {
        display: block;
    }
}

/* YouTube wrapper */
.df-youtube-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Poster and play button */
.df-video-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
}

.df-video-poster.hidden {
    display: none;
}

.df-play-button {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    outline: none;
    transition: transform 0.2s ease;
}

.df-play-button:hover {
    transform: scale(1.1);
}

.df-play-button:focus {
    outline: 2px solid #fff;
    outline-offset: 4px;
}

.df-play-button i {
    font-size: 68px;
    color: #fff;
}

.df-play-button img,
.df-play-button svg {
    max-width: 100%;
    height: auto;
    display: block;
}

.df-play-button svg {
    width: 100px;
    height: 100px;
}

.df-play-button.hidden {
    display: none;
}

/* Loading indicator */
.df-video-loading {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: df-video-spin 1s linear infinite;
    z-index: 5;
}

.df-video-loading.show {
    display: block;
}

@keyframes df-video-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Background Mode - Video as Background */
.df-video-wrapper.df-video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.df-video-wrapper.df-video-background .df-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding-bottom: 0;
    overflow: hidden;
}

.df-video-wrapper.df-video-background .df-video-container video,
.df-video-wrapper.df-video-background .df-video-container iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

/* Hide controls in background mode */
.df-video-wrapper.df-video-background video {
    pointer-events: none;
}

/* Play button default */
.df-video-wrapper .df-play-button {
    background: transparent !important;
    border-radius: 100px !important;
    padding: 0px !important;
}

/* Hide poster and play button in background mode */
.df-video-wrapper.df-video-background .df-video-poster,
.df-video-wrapper.df-video-background .df-play-button {
    display: none !important;
}

/* Hide loading indicator in background mode */
.df-video-wrapper.df-video-background .df-video-loading {
    display: none !important;
}

