/* Responsive Aspect Ratio Container */
.uvp-wrapper {
    position: relative;
    width: 100%;
    /* Default to 16:9 aspect ratio if not explicitly defined by parent */
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: #000;
    border-radius: 4px; /* Optional slight rounding for a modern feel */
}

/* Ensure the Plyr wrapper takes full width/height */
.uvp-wrapper .plyr,
.uvp-wrapper .plyr__video-wrapper {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

/* Object-fit cover for HTML5 video elements so they fill the container without black bars */
.uvp-wrapper .plyr video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* Ensure iframe (YouTube) covers the container gracefully */
.uvp-wrapper .plyr__video-embed iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Fallback for older browsers without aspect-ratio support */
@supports not (aspect-ratio: 16 / 9) {
    .uvp-wrapper {
        padding-top: 56.25%; /* 16:9 Aspect Ratio */
        height: 0;
    }
}

/* If controls are hidden, prevent clicks from pausing the video */
.uvp-wrapper.uvp-no-controls::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    background: transparent;
    cursor: default;
}

/* Custom Mute Button Overlay */
.uvp-custom-mute-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s ease;
}

.uvp-custom-mute-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.uvp-custom-mute-btn svg {
    width: 24px;
    height: 24px;
    display: block;
}
