/* Luxury Curtain Frontend Styles */

/* Video Preview Box */
.lvo-video-preview {
    position: fixed;
    z-index: 999999; /* Higher z-index to avoid chat bubble conflicts */
    cursor: pointer;
    transition: all 0.3s ease-out;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border: 2px solid #d4af37; /* Luxury gold */
}

.lvo-video-preview.bottom-right {
    bottom: 100px; /* Move up to avoid chat bubbles */
    right: 24px;
}

.lvo-video-preview.bottom-left {
    bottom: 100px; /* Move up to avoid chat bubbles */
    left: 24px;
}

.lvo-video-preview.top-right {
    top: 24px;
    right: 24px;
}

/* Portrait dimensions */
.lvo-video-preview.portrait.small {
    width: 64px;
    height: 112px;
}

.lvo-video-preview.portrait.expanded {
    width: 208px;
    height: 320px;
}

/* Landscape dimensions */
.lvo-video-preview.landscape.small {
    width: 112px;
    height: 64px;
}

.lvo-video-preview.landscape.expanded {
    width: 320px;
    height: 208px;
}

.lvo-preview-content {
    position: relative;
    width: 100%;
    height: 100%;
}

.lvo-preview-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lvo-preview-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lvo-play-icon {
    width: 24px;
    height: 24px;
    color: white;
    fill: currentColor;
}

.lvo-preview-indicator {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background: #d4af37;
    border-radius: 50%;
    animation: lvo-pulse 2s infinite;
}

.lvo-preview-video {
    width: 100%;
    height: 100%;
}

.lvo-preview-labels {
    position: absolute;
    font-size: 10px;
    color: white;
    background: rgba(0, 0, 0, 0.7);
    padding: 4px 8px;
    border-radius: 4px;
}

.lvo-expand-label {
    top: 8px;
    right: 8px;
}

.lvo-audio-label {
    bottom: 8px;
    left: 8px;
}

/* Video Overlay Modal */
.lvo-video-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lvo-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.lvo-modal {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    width: 90vw;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
}

.lvo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.lvo-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
}

.lvo-close {
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: #6b7280;
    transition: all 0.2s;
}

.lvo-close:hover {
    background: #e5e7eb;
    color: #374151;
}

.lvo-content {
    padding: 24px;
}

.lvo-video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.lvo-video-container.portrait {
    padding-bottom: 177.78%; /* 9:16 aspect ratio */
    max-width: 400px;
    margin: 0 auto;
}

.lvo-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Loading spinner */
.lvo-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 2px solid white;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: lvo-spin 1s linear infinite;
}

/* Animations */
@keyframes lvo-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(212, 175, 55, 0);
    }
}

@keyframes lvo-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .lvo-video-preview.portrait.expanded {
        width: 156px;
        height: 240px;
    }
    
    .lvo-video-preview.landscape.expanded {
        width: 240px;
        height: 156px;
    }
    
    .lvo-modal {
        width: 95vw;
        margin: 20px;
    }
    
    .lvo-header {
        padding: 16px;
    }
    
    .lvo-content {
        padding: 16px;
    }
}