/* 顶栏内嵌搜索 */
.header-search {
    position: relative;
    width: 100%;
    max-width: 620px;
    margin: 0 auto;
    z-index: 5;
}

.header-search__inner {
    position: relative;
    display: flex;
    align-items: stretch;
    height: 44px;
    border: 1.5px solid #2e91f6;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.15s;
}

.header-search__inner:focus-within {
    box-shadow: 0 0 0 3px rgba(46, 145, 246, 0.12);
}

.header-search__inner > input,
.header-search__input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0 14px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #1e293b;
    font-size: 14px;
}

.header-search__inner > input::placeholder,
.header-search__input::placeholder {
    color: #94a3b8;
}

.header-search__inner > input::-webkit-search-cancel-button,
.header-search__input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    height: 16px;
    width: 16px;
    margin-right: 4px;
    background:
        linear-gradient(45deg, transparent 43%, #94a3b8 45%, #94a3b8 55%, transparent 57%),
        linear-gradient(-45deg, transparent 43%, #94a3b8 45%, #94a3b8 55%, transparent 57%);
    cursor: pointer;
}

.header-search__submit {
    flex-shrink: 0;
    width: 88px;
    height: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: #2e91f6;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}

.header-search__submit:hover {
    background: #1f7ad4;
}

.header-search__submit:active {
    transform: scale(0.98);
}

.header-search__panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 1010;
    display: none;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.header-search__list {
    width: 100%;
}

.searchList {
    list-style: none;
    margin: 0;
    padding: 6px;
    max-height: 320px;
    overflow-y: auto;
}

.searchList li {
    padding: 10px 12px;
    border-radius: 8px;
    color: #0f172a;
    font-size: 14px;
    line-height: 1.5;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.searchList li:hover,
.searchList li:focus {
    background: #eff6ff;
    color: #2563eb;
}

.searchList li + li {
    margin-top: 2px;
}

@media (max-width: 768px) {
    .header-search__inner {
        height: 42px;
    }

    .header-search__inner > input {
        font-size: 16px;
    }

    .header-search__submit {
        width: 72px;
        font-size: 13px;
    }

    .searchList {
        max-height: 50vh;
    }
}
