/* === Header search: absolute right (fixed width), responsive fallback === */

/* Make header wrap a positioned container */
.site-header .wrap {
    position: relative; /* safe: only adds positioning, doesn't change layout */
}

/* Position the search inside the header wrap (right side) */
.site-header .wrap .ic-header-search {
    position: absolute;
    right: 20px;                 /* distance from right edge of header wrap */
    top: 50%;
    transform: translateY(-50%);
    width: 280px;                /* desired fixed width */
    max-width: 40vw;             /* responsive max width on medium screens */
    z-index: 9999;
    display: block;
    box-sizing: border-box;
}

/* Input fills the search container */
.site-header .wrap .ic-header-search #ic-search {
    width: 100%;
    padding: 8px 10px;
    font-size: 14px;
    border-radius: 4px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

/* Suggestions dropdown positioned under the input */
.site-header .wrap .ic-header-search .ic-suggestions-list {
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    left: 0;
    top: calc(100% + 4px);
    width: 100%;
    background: #fff;
    border: 1px solid #ccc;
    max-height: 300px;
    overflow-y: auto;
    display: none; /* shown by your JS */
    z-index: 10000;
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

/* Suggestion item */
.site-header .wrap .ic-header-search .ic-suggestions-list li {
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

/* Thumbnail in suggestion */
.site-header .wrap .ic-header-search .ic-suggestions-list img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

/* Hover / highlighted state */
.site-header .wrap .ic-header-search .ic-suggestions-list li:hover,
.site-header .wrap .ic-header-search .ic-suggestions-list li.highlight {
    background-color: #f0f0f0;
}

/* Responsive: on small screens, revert to normal flow under header */
@media (max-width: 900px) {
    .site-header .wrap .ic-header-search {
        position: static;
        transform: none;
        width: 100%;
        max-width: none;
        margin-top: 10px;
    }

    .site-header .wrap .ic-header-search #ic-search {
        width: 100%;
    }

    .site-header .wrap .ic-header-search .ic-suggestions-list {
        position: absolute; /* still absolute to dropdown correctly relative to input */
        left: 0;
        top: calc(100% + 4px);
        width: 100%;
    }
}