/**
 * Mobile-specific fixes for site header
 */

/* Fix header controls from getting cut off on mobile */
@media (max-width: 767px) {
    /* Fix overall header container */
    .site-header {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Make sure header has proper spacing */
    .site-header-inner {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 15px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin: 0;
    }
    
    /* Ensure controls don't overflow */
    .header-controls {
        display: flex;
        gap: 10px;
        margin-left: auto;
        flex-shrink: 0;
    }
    
    /* Give logo less space on mobile */
    .site-header-logo {
        max-width: 65%;
        margin-right: 5px;
        font-size: 22px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Make sure icons have proper spacing */
    .search-icon-wrapper button,
    .theme-toggle-button {
        width: 36px;
        height: 36px;
        padding: 6px;
        flex-shrink: 0;
    }
    
    /* Fix icons alignment */
    .search-icon-wrapper svg,
    .theme-toggle-button svg {
        width: 20px;
        height: 20px;
    }
    
    /* Fix ticker container */
    .market-ticker-container {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }
    
    /* Fix search form container */
    .search-form-container {
        right: 0;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
    }
    
    /* Fix body overflow */
    body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100%;
    }
    
    /* Fix homepage content */
    .homepage-content {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .site-header-logo {
        max-width: 60%;
        font-size: 18px;
    }
    
    .search-icon-wrapper button,
    .theme-toggle-button {
        width: 32px;
        height: 32px;
        padding: 6px;
    }
    
    /* Ensure no horizontal scroll on smallest screens */
    html, body {
        max-width: 100%;
        overflow-x: hidden;
    }
    
    /* Fix potential grid overflow issues */
    .grid-col-span-12 {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin-left: 0;
        margin-right: 0;
        padding-left: 10px;
        padding-right: 10px;
    }
} 