/* Treysan Video Popup - Modern Avant-Garde Design */

:root {
    --tvp-backdrop: rgba(0, 0, 0, 0.85);
    --tvp-primary: #ffffff;
    --tvp-accent: #e50914; /* Subtle nod to modern video players */
    --tvp-transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    --tvp-z-index: 999999;
}

#treysan-video-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--tvp-backdrop);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: var(--tvp-z-index);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#treysan-video-popup-overlay.tvp-visible {
    opacity: 1;
    visibility: visible;
}

.tvp-container {
    position: relative;
    width: 90%;
    max-width: 1000px;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#treysan-video-popup-overlay.tvp-visible .tvp-container {
    transform: scale(1);
}

.tvp-video-wrapper {
    width: 100%;
    height: 100%;
}

.tvp-video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Close Button - Minimalist & Accessible */
.tvp-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--tvp-transition);
    z-index: 10;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.tvp-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

.tvp-close-btn::before,
.tvp-close-btn::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background-color: var(--tvp-primary);
    border-radius: 2px;
}

.tvp-close-btn::before {
    transform: rotate(45deg);
}

.tvp-close-btn::after {
    transform: rotate(-45deg);
}

/* Accessibility Focus Ring */
.tvp-close-btn:focus-visible {
    outline: 2px solid var(--tvp-primary);
    outline-offset: 4px;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .tvp-container {
        width: 95%;
        border-radius: 12px;
    }
    
    .tvp-close-btn {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
    }
}
