/* Desktop Preview Fixes for Plain Site */

/* Fix viewport issues on desktop preview */
@media screen and (min-width: 992px) {
    /* Force desktop layout on PC screens */
    body.has-mobile-tabs {
        padding-bottom: 0 !important;
    }
    
    /* Hide mobile navigation on desktop */
    .mobile-tab-bar {
        display: none !important;
    }
    
    /* Ensure main navbar is always visible on desktop */
    .navbar {
        display: flex !important;
        position: relative !important;
    }
    
    /* Fix any mobile-specific positioning */
    .container-fluid,
    .container,
    .row,
    .col {
        position: relative;
    }
    
    /* Ensure proper scrolling on desktop */
    body {
        overflow-y: auto !important;
        overflow-x: hidden;
    }
    
    /* Fix form controls for desktop */
    .form-control, 
    .form-select {
        font-size: 14px !important;
        height: auto !important;
    }
    
    /* Fix modal positioning on desktop */
    .modal {
        padding-right: 0 !important;
    }
    
    .modal-dialog {
        margin: 1.75rem auto !important;
        max-width: 500px;
    }
}

/* Desktop-specific improvements */
@media screen and (min-width: 1200px) {
    /* Better spacing for larger desktop screens */
    .container {
        max-width: 1140px;
    }
    
    /* Improved card layouts */
    .dashboard-card {
        margin-bottom: 2rem;
    }
    
    /* Better typography for desktop */
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.75rem; }
}

/* Fix for Replit preview iframe issues */
@media screen and (min-width: 768px) {
    /* Ensure content doesn't get cut off in preview */
    body {
        min-height: 100vh;
        padding-top: 0;
    }
    
    /* Fix any overflow issues */
    .main-content {
        width: 100%;
        overflow-x: hidden;
    }
    
    /* Ensure buttons work properly in preview */
    .btn, 
    button, 
    [role="button"] {
        cursor: pointer;
        touch-action: manipulation;
    }
    
    /* Fix dropdown menus in desktop preview */
    .dropdown-menu {
        position: absolute;
        z-index: 1000;
        display: none;
    }
    
    .dropdown-menu.show {
        display: block;
    }
}

/* Additional PC-specific optimizations */
@media screen and (min-width: 768px) and (hover: hover) {
    /* Enable hover effects only on devices that support hover */
    .nav-link:hover,
    .btn:hover,
    .card:hover {
        transition: all 0.2s ease;
    }
    
    /* Better focus indicators for keyboard navigation */
    .btn:focus,
    .form-control:focus,
    .nav-link:focus {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
}

/* Fix for any viewport width detection issues */
.desktop-only {
    display: none;
}

@media screen and (min-width: 992px) {
    .desktop-only {
        display: block;
    }
    
    .mobile-only {
        display: none;
    }
}