/* Editor Styles */
.seor-video-notch-block-editor {
    padding: 20px;
    border: 1px dashed #ccc;
    background: #f9f9f9;
    text-align: center;
}

.seor-video-trigger-btn {
    display: inline-block;
    padding: 15px 30px;
    background-color: var(--wp--preset--color--primary, #000);
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
    transition: background-color 0.3s ease;
}

.seor-video-trigger-btn:hover {
    background-color: var(--wp--preset--color--secondary, #333);
}

/* Popup Styles */
.seor-video-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.seor-video-popup.is-active {
    opacity: 1;
    pointer-events: auto;
}

.seor-video-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, var(--overlay-opacity, 0.8));
    backdrop-filter: blur(3px);
    cursor: pointer;
}

.seor-video-popup-content {
    position: relative;
    z-index: 10;
    padding: 0; /* No fixed padding */
    width: 80vw;
    max-width: 1100px;
    max-height: 80vh;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    display: grid; /* Grid to center the video easily */
    place-items: center;
    box-sizing: border-box;
    overflow: visible;
}

/* Ensure video fits well and is responsive */
.seor-video-popup-content .video-js {
    width: 92% !important; /* This creates the "padding" look while maintaining ratio */
    height: 92% !important;
}

/* Bottom-right Animated Close Notch */
.seor-video-popup-close {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 60px;
    cursor: pointer;
    z-index: 20;
    overflow: visible;
}

/* Background of the close notch (Layer 1) */
.close-notch-bg {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background-color: var(--wp--preset--color--primary, #000);
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.seor-video-popup-close:hover .close-notch-bg {
    width: 120px; /* Grows on hover */
    height: 120px;
    background-color: var(--wp--preset--color--secondary, #333);
}

/* Layer 2: animated double notch */
.close-notch-layer-2 {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 180px; 
    height: 180px;
    background: color-mix(in srgb, var(--wp--preset--color--primary, #000) 50%, transparent);
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
    transform: scale(0);
    transform-origin: bottom right;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
    opacity: 0;
    pointer-events: none;
    z-index: 0;
}

.seor-video-popup-close:hover .close-notch-layer-2 {
    transform: scale(1);
    opacity: 1;
}

/* The X icon */
.seor-video-popup-close .close-icon {
    position: absolute;
    bottom: 8px; /* Moved down from 12px */
    right: 10px; /* Moved right from 15px */
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    z-index: 2;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.seor-video-popup-close:hover .close-icon {
    bottom: 18px; /* Adjusted for 120px hover state */
    right: 22px;
    font-size: 28px;
    transform: rotate(90deg);
}

