/* Global Mobile Responsive Styles for FSL */

@media (max-width: 768px) {
    /* Base adjustments */
    body {
        font-size: 16px !important;
        overflow-x: hidden;
        padding-top: 140px !important;
    }
    
    /* Container padding */
    .max-w-7xl,
    .max-w-6xl,
    .max-w-5xl {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    
    /* Typography scale */
    h1, .text-5xl, .text-4xl {
        font-size: 28px !important;
        line-height: 1.2 !important;
    }
    
    /* Fix for page titles being covered by nav on mobile */
    .max-w-5xl > h1:first-child,
    .max-w-6xl > h1:first-child,
    .max-w-7xl > h1:first-child {
        margin-top: 24px !important;
    }
    
    h2, .text-3xl {
        font-size: 24px !important;
        line-height: 1.3 !important;
    }
    
    h3, .text-2xl {
        font-size: 20px !important;
        line-height: 1.4 !important;
    }
    
    .text-xl {
        font-size: 18px !important;
    }
    
    .text-lg {
        font-size: 17px !important;
    }
    
    /* Touch-friendly interactive elements */
    button,
    a.button,
    input[type="button"],
    input[type="submit"],
    .btn {
        min-height: 44px !important;
        min-width: 44px !important;
        font-size: 16px !important;
        padding: 12px 20px !important;
    }
    
    /* Form inputs */
    input,
    select,
    textarea {
        font-size: 16px !important; /* Prevents zoom on iOS */
        min-height: 44px !important;
        padding: 12px 16px !important;
    }
    
    /* Grid layouts - stack on mobile */
    .grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    
    /* Flex layouts - stack on mobile */
    .flex-col-mobile {
        flex-direction: column !important;
    }
    
    /* Tables - horizontal scroll */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -16px;
        padding: 0 16px;
    }
    
    table {
        min-width: 600px;
        font-size: 14px;
    }
    
    table th,
    table td {
        padding: 12px 8px !important;
    }
    
    /* Cards */
    .card {
        padding: 16px !important;
        margin-bottom: 16px !important;
    }
    
    /* Modals */
    .modal-content {
        margin: 20px !important;
        max-height: calc(100vh - 40px) !important;
        overflow-y: auto;
    }
    
    /* Hide desktop-only elements */
    .desktop-only {
        display: none !important;
    }
    
    /* Show mobile-only elements */
    .mobile-only {
        display: block !important;
    }
    
    /* Spacing adjustments */
    .mb-8 {
        margin-bottom: 24px !important;
    }
    
    .mb-6 {
        margin-bottom: 20px !important;
    }
    
    .p-8 {
        padding: 20px !important;
    }
    
    .p-6 {
        padding: 16px !important;
    }
    
    /* Better navigation spacing */
    nav {
        padding: 12px 16px !important;
    }
    
    /* Stats/metrics - stack vertically */
    .stats-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    /* Images responsive */
    img {
        max-width: 100%;
        height: auto;
    }
}

/* Small phones (under 375px) */
@media (max-width: 374px) {
    body {
        font-size: 14px !important;
    }
    
    h1, .text-5xl, .text-4xl {
        font-size: 24px !important;
    }
    
    h2, .text-3xl {
        font-size: 20px !important;
    }
    
    button,
    a.button {
        font-size: 14px !important;
        padding: 10px 16px !important;
    }
}

/* Tablet landscape (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .max-w-7xl {
        padding-left: 24px !important;
        padding-right: 24px !important;
    }
    
    .grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
