/* Header search styling */
.header,
.nav,
#menu {
    overflow: visible !important;
}

#header-searchbox {
    position: relative;
    display: inline-block;
    overflow: visible;
}

#header-searchInput {
    padding: 6px 12px;
    width: 180px;
    height: auto;
    color: var(--primary);
    background: var(--entry);
    border: none;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
    line-height: 1.4;
    display: block;
    box-shadow: 0 0 0 2px var(--entry);
}

#header-searchInput:focus {
    background: var(--theme);
    box-shadow: 0 0 0 2px var(--tertiary);
}

#header-searchInput::placeholder {
    color: var(--secondary);
    opacity: 0.5;
}

#header-searchResults {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 180px;
    width: max-content;
    max-width: 350px;
    background: var(--entry);
    border: none;
    border-radius: 12px;
    max-height: 350px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: none;
    margin: 0;
    padding: 4px;
}

#header-searchResults li {
    list-style: none;
    border-radius: 6px;
    padding: 6px 10px;
    margin: 1px 0;
    margin-inline-start: 0 !important;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

#header-searchResults li:hover,
#header-searchResults li.header-search-focus {
    background-color: var(--theme);
    transform: translateX(2px);
}

.header-search-title {
    font-weight: 400;
    font-size: 13px;
    color: var(--primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

#header-searchResults a {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    outline: none;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    #header-searchbox {
        width: 100%;
    }
    
    #header-searchInput {
        width: 100%;
    }
    
    #header-searchResults {
        max-height: 250px;
        min-width: 100%;
        max-width: 100%;
        left: 0;
        right: 0;
    }
}

