<header class="header py-2">
    <div class="container">
        <div class="d-flex align-items-center justify-content-between">
            <div class="header__left">
                <a href="<?php echo base_url(); ?>">
                    <img class="header__logo" src="<?php echo base_url(); ?>assets/img/logo-color.svg" alt="" class="header__logo">
                </a>
            </div>
            <div class="header__right">
                <div class="d-flex align-items-center gap-3">
                    <div class="cursor-pointer" data-bs-toggle="modal" data-bs-target="#filesSearchModal">
                        <svg fill="#000000" height="22px" width="22px" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 488.4 488.4" xml:space="preserve"> <g> <g> <path d="M0,203.25c0,112.1,91.2,203.2,203.2,203.2c51.6,0,98.8-19.4,134.7-51.2l129.5,129.5c2.4,2.4,5.5,3.6,8.7,3.6 s6.3-1.2,8.7-3.6c4.8-4.8,4.8-12.5,0-17.3l-129.6-129.5c31.8-35.9,51.2-83,51.2-134.7c0-112.1-91.2-203.2-203.2-203.2 S0,91.15,0,203.25z M381.9,203.25c0,98.5-80.2,178.7-178.7,178.7s-178.7-80.2-178.7-178.7s80.2-178.7,178.7-178.7 S381.9,104.65,381.9,203.25z"/> </g> </g> </svg>
                    </div>
                    <div id="dropdownMenuButton1" class="cursor-pointer" data-bs-toggle="dropdown" aria-expanded="false">
                        <img class="" src="<?php echo base_url(); ?>assets/img/icons/user.png" alt="">
                    </div>
                    <ul class="dropdown-menu">
                        <?php
                            if(isset($user_data) && !empty($user_data)){
                        ?>
                            <li class="pointer-none mb-2"><a class="dropdown-item fw-bold" href="javascript:void(0);"><?php echo $user_data->first_name." ".$user_data->last_name; ?></a></li>
                            <li>
                                <a class="dropdown-item" href="<?php echo base_url(); ?>profile">
                                    <svg width="16" height="16" version="1.1" viewbox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m1 1v4h4v-4h-4zm5 1v2h8v-2h-8zm-5 4v4h4v-4h-4zm5 1v2h8v-2h-8zm-5 4v4h4v-4h-4zm1 1h2v2h-2v-2zm4 0v2h8v-2h-8z"/></svg>
                                    Settings
                                </a>
                            </li>
                            <li>
                                <a class="dropdown-item" href="<?php echo base_url(); ?>logout">     
                                    <svg width="16" height="16" version="1.1" viewbox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g fill="none" stroke="#000" stroke-linecap="round" stroke-width="2"><path d="m10.75 3.9862a5.5 5.5 0 0 1 2.563 6.1868 5.5 5.5 0 0 1-5.3131 4.077 5.5 5.5 0 0 1-5.3127-4.077 5.5 5.5 0 0 1 2.5627-6.1867"/><path d="m8 1.7637v5.972"/></g></svg>
                                    Log out
                                </a>
                            </li>
                        <?php
                            }else{
                        ?>
                                <li>
                                    <a class="dropdown-item" href="<?php echo base_url(); ?>login">
                                        Login
                                    </a>
                                </li>
                        <?php
                            }
                        ?>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</header>

<!-- Files Search Modal -->
<!-- 
<div class="modal fade" id="filesSearchModal" tabindex="-1">
    <div class="modal-dialog modal-dialog-scrollable modal-dialog-centered" style="max-width:640px;">
        <div class="modal-content">
            <div class="modal-header border-0">
                <h1 class="modal-title fs-5" id="exampleModalLabel">Unified search</h1>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="px-3">
                <input type="text" class="form-control" id="seachText" placeholder="Search apps, files, tags, messages...">
                <button class="btn btn-secondary btn-sm p-2 mt-1" data-bs-toggle="dropdown">
                    <svg fill="#303030" width="20" height="20" viewBox="0 0 24 24" class="material-design-icon__svg"><path d="M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3M7 7H9V9H7V7M7 11H9V13H7V11M7 15H9V17H7V15M17 17H11V15H17V17M17 13H11V11H17V13M17 9H11V7H17V9Z"></path></svg>
                    Places
                </button>
                <ul class="dropdown-menu">
                    <li><a class="dropdown-item" href="#"><i class="fa fa-file me-2"></i>Files</a></li>
                    <li><a class="dropdown-item" href="#"><i class="fa fa-file me-2"></i>In Folder</a></li>
                    <li><a class="dropdown-item" href="#"><i class="fa fa-tag me-2"></i>Tags</a></li>
                    <li><a class="dropdown-item" href="#"><i class="fa fa-plus me-2"></i>Apps</a></li>
                    <li><a class="dropdown-item" href="#"><i class="fa fa-cog me-2"></i>Settings</a></li>
                </ul>
                <button class="btn btn-secondary btn-sm p-2 mt-1" data-bs-toggle="dropdown">
                    <svg fill="#303030" width="20" height="20" viewBox="0 0 24 24" class="material-design-icon__svg"><path d="M9,10H7V12H9V10M13,10H11V12H13V10M17,10H15V12H17V10M19,3H18V1H16V3H8V1H6V3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3M19,19H5V8H19V19Z"></path></svg>
                    Date
                </button>
                <ul class="dropdown-menu">
                    <li><a class="dropdown-item" href="#"></i>Today</a></li>
                    <li><a class="dropdown-item" href="#"></i>Last 7 Days</a></li>
                    <li><a class="dropdown-item" href="#"></i>Last 30 Days</a></li>
                </ul>
                <div class="dropdown-center d-inline-block">
                    <button class="btn btn-secondary btn-sm p-2 mt-1" data-bs-toggle="dropdown">
                        <svg fill="#303030" width="20" height="20" viewBox="0 0 24 24" class="material-design-icon__svg"><path d="M12,5.5A3.5,3.5 0 0,1 15.5,9A3.5,3.5 0 0,1 12,12.5A3.5,3.5 0 0,1 8.5,9A3.5,3.5 0 0,1 12,5.5M5,8C5.56,8 6.08,8.15 6.53,8.42C6.38,9.85 6.8,11.27 7.66,12.38C7.16,13.34 6.16,14 5,14A3,3 0 0,1 2,11A3,3 0 0,1 5,8M19,8A3,3 0 0,1 22,11A3,3 0 0,1 19,14C17.84,14 16.84,13.34 16.34,12.38C17.2,11.27 17.62,9.85 17.47,8.42C17.92,8.15 18.44,8 19,8M5.5,18.25C5.5,16.18 8.41,14.5 12,14.5C15.59,14.5 18.5,16.18 18.5,18.25V20H5.5V18.25M0,20V18.5C0,17.11 1.89,15.94 4.45,15.6C3.86,16.28 3.5,17.22 3.5,18.25V20H0M24,20H20.5V18.25C20.5,17.22 20.14,16.28 19.55,15.6C22.11,15.94 24,17.11 24,18.5V20Z"></path></svg>
                        People
                    </button>
                    <ul class="dropdown-menu" style="min-width: 240px;">
                        <div class="input-group px-3 mb-2">
                            <input type="text" class="form-control" placeholder="Search people">
                            <div class="input-group-text cursor-pointer">
                                <i class="fa fa-search"></i>
                            </div>
                        </div>
                        <li><a class="dropdown-item" href="#"></i>Aash Narayan</a></li>
                        <li><a class="dropdown-item" href="#"></i>Aash Narayan</a></li>
                        <li><a class="dropdown-item" href="#"></i>Aash Narayan</a></li>
                        <li><a class="dropdown-item" href="#"></i>Aash Narayan</a></li>
                    </ul>
                </div>
                <button class="btn btn-secondary btn-sm p-2 mt-1">
                    <svg fill="#303030" width="20" height="20" viewBox="0 0 24 24" class="material-design-icon__svg"><path d="M14,12V19.88C14.04,20.18 13.94,20.5 13.71,20.71C13.32,21.1 12.69,21.1 12.3,20.71L10.29,18.7C10.06,18.47 9.96,18.16 10,17.87V12H9.97L4.21,4.62C3.87,4.19 3.95,3.56 4.38,3.22C4.57,3.08 4.78,3 5,3V3H19V3C19.22,3 19.43,3.08 19.62,3.22C20.05,3.56 20.13,4.19 19.79,4.62L14.03,12H14Z"></path></svg>
                    Filter in current view
                </button>
            </div>
            <div class="modal-body" id="search_result">
                <div class="seacheResults" style="display:none;">
                    <h6 class="text-primary pt-1">In folder</h6>
                    <div class="list-group">
                        <a href="#" class="list-group-item list-group-item-action border-0">
                            <div class="d-flex align-items-center gap-3">
                                <i class="fa fa-file fs-2"></i>
                                <div>
                                    <div class="fw-bold fs-14">Editable files</div>
                                    <div class="text-muted fs-14">in Marketing/Concrete Canvas (CC)/EN/9 - CC MARKETING TOOLS/9.2...</div>
                                </div>
                            </div>
                        </a>
                        <a href="#" class="list-group-item list-group-item-action border-0">
                            <div class="d-flex align-items-center gap-3">
                                <i class="fa fa-file fs-2"></i>
                                <div>
                                    <div class="fw-bold fs-14">Editable files</div>
                                    <div class="text-muted fs-14">in Marketing/Concrete Canvas (CC)/EN/9 - CC MARKETING TOOLS/9.2...</div>
                                </div>
                            </div>
                        </a>
                        <a href="#" class="list-group-item list-group-item-action border-0">
                            <div class="d-flex align-items-center gap-3">
                                <i class="fa fa-file fs-2"></i>
                                <div>
                                    <div class="fw-bold fs-14">Editable files</div>
                                    <div class="text-muted fs-14">in Marketing/Concrete Canvas (CC)/EN/9 - CC MARKETING TOOLS/9.2...</div>
                                </div>
                            </div>
                        </a>
                        <a href="#" class="list-group-item list-group-item-action border-0">
                            <div class="d-flex align-items-center gap-3">
                                <i class="fa fa-file fs-2"></i>
                                <div>
                                    <div class="fw-bold fs-14">Editable files</div>
                                    <div class="text-muted fs-14">in Marketing/Concrete Canvas (CC)/EN/9 - CC MARKETING TOOLS/9.2...</div>
                                </div>
                            </div>
                        </a>
                        <a href="#" class="list-group-item list-group-item-action border-0">
                            <div class="d-flex align-items-center gap-3">
                                <i class="fa fa-file fs-2"></i>
                                <div>
                                    <div class="fw-bold fs-14">Editable files</div>
                                    <div class="text-muted fs-14">in Marketing/Concrete Canvas (CC)/EN/9 - CC MARKETING TOOLS/9.2...</div>
                                </div>
                            </div>
                        </a>
                        <a href="#" class="list-group-item list-group-item-action border-0">
                            <div class="d-flex align-items-center gap-3">
                                <i class="fa fa-file fs-2"></i>
                                <div>
                                    <div class="fw-bold fs-14">Editable files</div>
                                    <div class="text-muted fs-14">in Marketing/Concrete Canvas (CC)/EN/9 - CC MARKETING TOOLS/9.2...</div>
                                </div>
                            </div>
                        </a>
                    </div>
                    <div class="cursor-pointer fw-bold fs-14 ms-3 mt-3">...Load more results</div>
                </div>
                <div id="searchEmpty" class="text-center py-5 my-5" style="display: block;">
                    <svg fill="#8a8a8a" width="46px" height="46px" viewBox="0 0 24 24">
                        <path d="M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z"></path>
                    </svg>
                    <div class="text-muted mt-3">Start typing to search</div>
                </div> 



            </div>
        </div>
    </div>
</div>-->

<div class="modal fade" id="filesSearchModal" tabindex="-1">
    <div class="modal-dialog modal-dialog-scrollable modal-dialog-centered" style="max-width:640px;">
        <div class="modal-content">
            <div class="modal-header border-0">
                <h1 class="modal-title fs-5" id="exampleModalLabel">Unified search</h1>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="px-3">
                <input type="text" autofocus class="form-control" id="seachText" placeholder="Search apps, files, tags, messages...">
                <!-- <button class="btn btn-secondary btn-sm p-2 mt-1" data-bs-toggle="dropdown">
                    <svg fill="#303030" width="20" height="20" viewBox="0 0 24 24" class="material-design-icon__svg"><path d="M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3M7 7H9V9H7V7M7 11H9V13H7V11M7 15H9V17H7V15M17 17H11V15H17V17M17 13H11V11H17V13M17 9H11V7H17V9Z"></path></svg>
                    Places
                </button>
                <ul class="dropdown-menu">
                    <li><a class="dropdown-item" href="#"><i class="fa fa-file me-2"></i>Files</a></li>
                    <li><a class="dropdown-item" href="#"><i class="fa fa-file me-2"></i>In Folder</a></li>
                    <li><a class="dropdown-item" href="#"><i class="fa fa-tag me-2"></i>Tags</a></li>
                    <li><a class="dropdown-item" href="#"><i class="fa fa-plus me-2"></i>Apps</a></li>
                    <li><a class="dropdown-item" href="#"><i class="fa fa-cog me-2"></i>Settings</a></li>
                </ul>
                <button class="btn btn-secondary btn-sm p-2 mt-1" data-bs-toggle="dropdown">
                    <svg fill="#303030" width="20" height="20" viewBox="0 0 24 24" class="material-design-icon__svg"><path d="M9,10H7V12H9V10M13,10H11V12H13V10M17,10H15V12H17V10M19,3H18V1H16V3H8V1H6V3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3M19,19H5V8H19V19Z"></path></svg>
                    Date
                </button>
                <ul class="dropdown-menu">
                    <li><a class="dropdown-item" href="#"></i>Today</a></li>
                    <li><a class="dropdown-item" href="#"></i>Last 7 Days</a></li>
                    <li><a class="dropdown-item" href="#"></i>Last 30 Days</a></li>
                </ul>
                <div class="dropdown-center d-inline-block">
                    <button class="btn btn-secondary btn-sm p-2 mt-1" data-bs-toggle="dropdown">
                        <svg fill="#303030" width="20" height="20" viewBox="0 0 24 24" class="material-design-icon__svg"><path d="M12,5.5A3.5,3.5 0 0,1 15.5,9A3.5,3.5 0 0,1 12,12.5A3.5,3.5 0 0,1 8.5,9A3.5,3.5 0 0,1 12,5.5M5,8C5.56,8 6.08,8.15 6.53,8.42C6.38,9.85 6.8,11.27 7.66,12.38C7.16,13.34 6.16,14 5,14A3,3 0 0,1 2,11A3,3 0 0,1 5,8M19,8A3,3 0 0,1 22,11A3,3 0 0,1 19,14C17.84,14 16.84,13.34 16.34,12.38C17.2,11.27 17.62,9.85 17.47,8.42C17.92,8.15 18.44,8 19,8M5.5,18.25C5.5,16.18 8.41,14.5 12,14.5C15.59,14.5 18.5,16.18 18.5,18.25V20H5.5V18.25M0,20V18.5C0,17.11 1.89,15.94 4.45,15.6C3.86,16.28 3.5,17.22 3.5,18.25V20H0M24,20H20.5V18.25C20.5,17.22 20.14,16.28 19.55,15.6C22.11,15.94 24,17.11 24,18.5V20Z"></path></svg>
                        People
                    </button>
                    <ul class="dropdown-menu" style="min-width: 240px;">
                        <div class="input-group px-3 mb-2">
                            <input type="text" class="form-control" placeholder="Search people">
                            <div class="input-group-text cursor-pointer">
                                <i class="fa fa-search"></i>
                            </div>
                        </div>
                        <li><a class="dropdown-item" href="#"></i>Aash Narayan</a></li>
                        <li><a class="dropdown-item" href="#"></i>Aash Narayan</a></li>
                        <li><a class="dropdown-item" href="#"></i>Aash Narayan</a></li>
                        <li><a class="dropdown-item" href="#"></i>Aash Narayan</a></li>
                    </ul>
                </div>
                <button class="btn btn-secondary btn-sm p-2 mt-1">
                    <svg fill="#303030" width="20" height="20" viewBox="0 0 24 24" class="material-design-icon__svg"><path d="M14,12V19.88C14.04,20.18 13.94,20.5 13.71,20.71C13.32,21.1 12.69,21.1 12.3,20.71L10.29,18.7C10.06,18.47 9.96,18.16 10,17.87V12H9.97L4.21,4.62C3.87,4.19 3.95,3.56 4.38,3.22C4.57,3.08 4.78,3 5,3V3H19V3C19.22,3 19.43,3.08 19.62,3.22C20.05,3.56 20.13,4.19 19.79,4.62L14.03,12H14Z"></path></svg>
                    Filter in current view
                </button> -->
            </div>
            <div class="modal-body">
                <div class="seacheResults">
                    <!-- <h6 class="text-primary pt-1">In folder</h6> -->
                    <div class="list-group" id="search_result">
                        <?php
                            $this->load->view("templates/components/search_result");
                        ?>
                    </div>
                    <div class="cursor-pointer fw-bold fs-14 ms-3 mt-3 search_load_more">...Load more results</div>
                </div>
            </div>

            <input type="hidden" id="search_page_no" value="1" />
        </div>
    </div>
</div>