/* ========================================
   HEADER LAYOUT FIX - PREVENTS TOGGLE SQUISHING
   Must load AFTER main.css to override
   ======================================== */

/* Brand line container - proper flex layout */
.brand-line {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 20px !important;
    flex-wrap: nowrap !important;
    position: relative !important;
}

/* Tagline - allow shrinking but not too much */
.tagline {
    flex-shrink: 1 !important;
    min-width: 300px !important;
}

/* Mode toggle - NEVER shrink */
.mode-toggle {
    flex-shrink: 0 !important;
    min-width: fit-content !important;
}

/* Controls wrapper - NEVER shrink, fixed position */
.header-controls-wrapper {
    display: inline-flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex-shrink: 0 !important;
    min-width: fit-content !important;
    margin-left: 15px !important;
}

/* Settings button wrapper */
.header-controls-wrapper .toggle-btn-wrapper {
    flex-shrink: 0 !important;
    min-width: 44px !important;
}

/* Settings button itself */
.toggle-btn {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    flex-shrink: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(91, 155, 213, 0.08) !important;
    border: 1px solid rgba(91, 155, 213, 0.2) !important;
    border-radius: 10px !important;
    color: #5b9bd5 !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    font-size: 20px !important;
}

.toggle-btn:hover {
    background: rgba(91, 155, 213, 0.15) !important;
    border-color: rgba(91, 155, 213, 0.4) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 16px rgba(91, 155, 213, 0.2) !important;
}

/* Download button wrapper */
.header-controls-wrapper > div:not(.toggle-btn-wrapper) {
    flex-shrink: 0 !important;
    min-width: 44px !important;
}

/* Download button */
.download-icon-btn {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    flex-shrink: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(91, 155, 213, 0.08) !important;
    border: 1px solid rgba(91, 155, 213, 0.2) !important;
    border-radius: 10px !important;
    color: #5b9bd5 !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.download-icon-btn:hover {
    background: rgba(91, 155, 213, 0.15) !important;
    border-color: rgba(91, 155, 213, 0.4) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 16px rgba(91, 155, 213, 0.2) !important;
}

.download-icon-btn svg {
    width: 20px !important;
    height: 20px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2 !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .brand-line {
        flex-direction: column !important;
        gap: 15px !important;
    }
    
    .tagline {
        min-width: auto !important;
    }
    
    .header-controls-wrapper {
        margin-left: 0 !important;
    }
}

@media (max-width: 480px) {
    .toggle-btn,
    .download-icon-btn {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
    }
    
    .toggle-btn {
        font-size: 18px !important;
    }
    
    .download-icon-btn svg {
        width: 18px !important;
        height: 18px !important;
    }
}