/* Mobile Experience Enhancements */

/* Ensure all touch targets meet minimum 48px requirement */
@media (max-width: 768px) {
    /* Button minimum touch targets */
    button, 
    .btn,
    input[type="button"],
    input[type="submit"],
    a.button,
    .nav-item a {
        min-height: 48px !important;
        min-width: 48px !important;
        padding: 12px 16px !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Navigation improvements */
    nav a,
    nav button {
        min-height: 48px !important;
        padding: 12px 16px !important;
        margin: 4px 0;
    }
    
    /* Form elements touch targets */
    input[type="text"],
    input[type="email"],
    textarea,
    select {
        min-height: 48px !important;
        padding: 12px !important;
        font-size: 16px !important; /* Prevents iOS zoom */
    }
    
    /* Meeting card improvements */
    .meeting-card {
        margin-bottom: 16px;
        padding: 16px !important;
    }
    
    .meeting-card button {
        width: 100%;
        margin-top: 8px;
    }
    
    /* Chat widget mobile optimization */
    .bpm-chat-widget {
        bottom: 20px !important;
        right: 20px !important;
        left: 20px !important;
        width: auto !important;
        max-height: 70vh !important;
    }
    
    /* Improved spacing for mobile */
    .container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    
    /* Better text scaling */
    body {
        font-size: 16px !important;
        line-height: 1.5 !important;
    }
    
    h1 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }
    
    h2 {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
    }
    
    /* Ensure proper contrast and visibility */
    .text-gray-600 {
        color: #4a5568 !important;
    }
    
    /* Mobile-friendly modal and overlay improvements */
    .modal,
    .overlay {
        padding: 20px !important;
    }
    
    /* Improved focus indicators for keyboard navigation */
    button:focus,
    a:focus,
    input:focus,
    textarea:focus {
        outline: 3px solid #4299e1 !important;
        outline-offset: 2px !important;
    }
}

/* Enhanced accessibility for all screen sizes */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip link for keyboard navigation */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}