.custom-search {
    position: relative;
    /*margin-bottom: 15px;*/
}

.custom-search .search-wrapper {
    position: relative;
    display: inline-block;
}

.custom-search .search-input {
    width: 100%;
    box-sizing: border-box;
}

.custom-search .search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    display: none;
    background-color: #fff;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    max-height: 300px;
    overflow-y: auto;
}

.custom-search .suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-search .suggestion-item:hover,
.custom-search .suggestion-item.active {
    background-color: #f5f5f5;
}

.custom-search .all-results {
    padding: 8px 12px;
    text-align: center;
    border-top: 1px solid #eee;
    font-weight: bold;
    cursor: pointer;
}

.custom-search .all-results:hover {
    background-color: #f5f5f5;
}

.custom-search .search-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

/* When button is hidden, give full width to search input */
form:not(:has(button)) .search-wrapper {
    width: 100%;
}

form:not(:has(button)) .search-input {
    width: 100%;
}
