/* ===== HEADER COMPONENT STYLES ===== */

.header-component {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--header-height);
    background: var(--header-bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    box-shadow: none;
    z-index: 999;
    border-bottom: 1px solid #e5e7eb;
    transition: var(--transition);
}

.header-title {
    display: flex;
    align-items: center;
}

.header-title h1 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* remove breadcrumb-specific styling */

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 300px;
}

.header-search .input-group {
    width: 100%;
}

.search-with-shortcut {
    position: relative;
}

.search-shortcut-right {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 0.75rem;
    pointer-events: none;
    z-index: 10;
    background: white;
    padding: 0 4px;
}

.header-search .form-control {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-left: none;
    color: var(--text-primary);
    font-size: 0.875rem;
    height: 36px;
    border-radius: 0 6px 6px 0;
    padding-right: 60px; /* Make room for shortcut */
}

.header-search .form-control::placeholder {
    color: #9ca3af;
}

.header-search .form-control:focus {
    border-color: #cbd5e1;
    border-left: none;
    box-shadow: none;
    color: var(--text-primary);
    outline: none;
}

.header-search .input-group-text {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-right: none;
    color: #9ca3af;
    border-radius: 6px 0 0 6px;
}

.search-shortcut {
    color: #9ca3af;
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-user .user-info {
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
}

.header-user .btn {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    color: #374151;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    height: 36px;
}

.header-user .btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #111827;
}

.btn-icon {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    color: #374151;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #111827;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111827;
    font-weight: 600;
}

/* ===== GLOBAL SEARCH OVERLAY ===== */
.global-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: none;
    pointer-events: none;
}

.global-search-overlay.show {
    display: block;
    pointer-events: all;
}

.search-overlay-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.search-overlay-content {
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    padding: 2rem;
    min-width: 600px;
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
}

.search-overlay-header h3 {
    display: none;
}

/* Overlay Search Bar */
.overlay-search-bar {
    margin-bottom: 1.5rem;
}

.overlay-search-bar .input-group {
    position: relative;
}

.overlay-search-bar .form-control {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    padding-right: 60px;
    font-size: 0.875rem;
    height: 36px;
}

.overlay-search-bar .form-control:focus {
    border-color: #cbd5e1;
    box-shadow: none;
}

.overlay-search-bar .input-group-text {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-right: none;
    border-radius: 6px 0 0 6px;
    color: #9ca3af;
    padding: 0.5rem 1rem;
}

.search-shortcut-overlay {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 0.875rem;
    background: white;
    padding: 0 4px;
    pointer-events: none;
}

/* Overlay Search Bar */
.overlay-search-bar {
    margin-bottom: 1.5rem;
    position: relative;
}

.overlay-search-input {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.5rem 1rem 0.5rem 2.75rem !important;
    font-size: 0.875rem;
    height: 36px;
    width: 100%;
    text-align: left;
}

.overlay-search-input:focus {
    border: 1px solid #cbd5e1 !important;
    box-shadow: none;
    outline: none;
}

.overlay-search-input::before {
    content: "\f002";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}

.overlay-search-bar::before {
    content: "\f002";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
    z-index: 10;
}


/* Search Categories */
.search-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.search-category-btn {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #374151;
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    transition: none;
}

.search-category-btn:hover {
    background: #f9fafb;
    border-color: #cbd5e1;
    color: #111827;
}

.search-category-btn.active {
    background: #374151;
    border-color: #374151;
    color: white;
}

.search-category-btn:focus {
    background: #f9fafb;
    border-color: #cbd5e1;
    box-shadow: none;
    outline: none;
}






/* Responsive header */
@media (max-width: 768px) {
    .header-component {
        left: 0;
        padding: 0 0.5rem;
    }
    
    .header-search {
        width: 200px;
    }
    
    .search-shortcut {
        display: none;
    }
    
    .header-user .user-info {
        display: none;
    }
    
    .search-overlay-content {
        min-width: 90vw;
        padding: 1.5rem;
    }
    
    
    .search-categories {
        gap: 0.5rem;
    }
    
    .overlay-search-input {
        font-size: 0.9rem;
    }
}
