/**
 * Video component styles for filterable components
 * Follows the JPK theme's design system
 */

/* Video component styling - base styles */
.filterable-card[data-type="video"] {
    & .card-content {
        padding: 0;
        height: 100%;
    }
}

/* Video container - base styles for all videos */
.video-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    
    & iframe,
    & object,
    & embed,
    & video {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border: 0;
        display: block;
    }
}

/* Landscape video - 16:9 aspect ratio */
.video-container.landscape {
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
}

/* Portrait video - 9:16 aspect ratio (taller, like social media stories/reels) */
.video-container.portrait {
    padding-bottom: 177.78%; /* 9:16 aspect ratio */
    height: 0;
}

/* Additional styles to ensure portrait videos display correctly */
.filterable-card[data-type="video"]:not(.double-col) {
    /* Match social media story/reel aspect ratio */
    aspect-ratio: 9 / 16;
    
    & .card-content {
        height: 100%;
        display: flex;
        flex-direction: column;
        padding: 0; /* Remove any padding to ensure full coverage */
    }
    
    & .video-container {
        flex: 1;
        height: 100%; /* Ensure the container takes full height */
        position: absolute; /* Position absolutely to fill the card */
        top: 0;
        left: 0;
        width: 100%;
    }
    
    /* Make sure the iframe fills the container */
    & .video-container iframe,
    & .video-container object,
    & .video-container embed,
    & .video-container video {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
}
