/**
 * Mobile Preview Windows CSS
 * Styles for Mac Preview-style windows on mobile devices
 */

@media (max-width: 767px) {
    /* Preview Windows Container */
    #preview-windows-container {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1000; /* Ensure above mobile UI */
        pointer-events: none; /* Allow clicks to pass through container */
    }
    
    /* Individual Preview Windows - iOS Style */
    .preview-window {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        max-height: 100vh;
        border-radius: 0;
        box-shadow: none;
        pointer-events: auto; /* Re-enable clicks for the window */
        transform: none !important; /* Override any transforms */
        background-color: white;
        z-index: 2000;
        display: flex;
        flex-direction: column;
    }
    
    /* Window Header - iOS Style */
    .preview-window .window-header {
        height: 44px;
        padding: 0 15px;
        border-radius: 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        background-color: #f2f2f7;
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(0,0,0,0.1);
    }
    
    /* Window Buttons - iOS Style */
    .preview-window .window-buttons {
        display: none; /* Hide macOS style buttons */
    }
    
    /* Add iOS style Done button */
    .preview-window .window-header:before {
        content: 'Done';
        color: #007aff;
        font-size: 17px;
        font-weight: 400;
        cursor: pointer;
    }
    
    /* Window Title - iOS Style */
    .preview-window .window-title {
        font-size: 17px;
        font-weight: 600;
        text-align: center;
        flex: 1;
    }
    
    /* Preview Content - iOS Style */
    .preview-window .preview-body {
        padding: 0;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #f2f2f7;
    }
    
    /* Resize Handle - Hide on mobile */
    .preview-window .resize-handle {
        display: none;
    }
    
    /* Ensure images fit properly - iOS Style */
    .preview-window .preview-body img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        padding: 0;
        margin: 0;
    }
    
    /* Video styling - match image styling */
    .preview-window .preview-body video {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        padding: 0;
        margin: 0;
        width: 100%;
    }
    
    .preview-window .preview-body .video-preview {
        padding: 0;
        margin: 0;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .preview-window .preview-body .image-preview {
        padding: 0;
        margin: 0;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Text content styling - iOS Style */
    .preview-window .preview-body .text-content {
        padding: 20px;
        font-size: 16px;
        line-height: 1.5;
        width: 100%;
        height: 100%;
        overflow-y: auto;
        background-color: white;
    }
}
