/**
 * Video on Hover Styles
 */

.wp-block-surge-blocks-video-on-hover {
    position: relative;
    overflow: hidden;
    /* Default min-height to ensure visibility if content is empty */
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Ensure border radius clips content */
    isolation: isolate;
    /* Reset box-sizing to ensure padding works correctly */
    box-sizing: border-box;
}

/* Media Container - Strictly Absolute Background */
.wp-block-surge-blocks-video-on-hover .surge-video-hover-media {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none; /* Allow clicks to pass through to content */
    margin: 0;
    padding: 0;
    border: none;
}

/* Image - Full Cover */
.wp-block-surge-blocks-video-on-hover .surge-bg-image {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    opacity: 1;
    transition: opacity 0.4s ease-in-out;
    z-index: 1;
    margin: 0;
    padding: 0;
    border: none;
}

/* Video - Full Cover */
.wp-block-surge-blocks-video-on-hover .surge-bg-video {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    z-index: 2;
    margin: 0;
    padding: 0;
    border: none;
}

/* Overlay */
.wp-block-surge-blocks-video-on-hover .surge-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: 3;
    pointer-events: none;
}

/* Content Container - Relative Foreground */
.wp-block-surge-blocks-video-on-hover .surge-video-hover-content {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    /* Ensure content respects padding from supports */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center content vertically by default */
}

/* Hover State */
.wp-block-surge-blocks-video-on-hover.is-hovering .surge-bg-image {
    opacity: 0;
}

.wp-block-surge-blocks-video-on-hover.is-hovering .surge-bg-video {
    opacity: 1;
}

/* Editor Specific Placeholders */
.surge-block-placeholder {
    padding: 20px;
    background: #f0f0f0;
    border: 1px dashed #ccc;
    text-align: center;
    color: #666;
    z-index: 20;
    position: relative;
}