/* LISTOOL AI — Premium Search Overlay V97 */
:root {
    --search-z: 9999;
}

.search-open {
    overflow: hidden;
}

.header-search input,
.header-search button {
    cursor: pointer;
}

.listool-search-backdrop {
    position: fixed;
    inset: 0;
    z-index: var(--search-z);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 96px 20px 32px;
    background:
        radial-gradient(circle at 50% 0%, rgba(111, 77, 255, .22), transparent 34%),
        radial-gradient(circle at 20% 15%, rgba(0, 225, 255, .12), transparent 28%),
        rgba(2, 5, 15, .74);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    opacity: 0;
    transition: opacity .22s ease;
}

.listool-search-backdrop.is-open {
    display: flex;
    opacity: 1;
}

.listool-search-modal {
    width: min(920px, 100%);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 30px;
    background:
        linear-gradient(180deg, rgba(20, 24, 42, .94), rgba(8, 11, 24, .96)),
        rgba(8, 11, 24, .96);
    box-shadow: 0 32px 120px rgba(0,0,0,.62), inset 0 1px 0 rgba(255,255,255,.08);
    overflow: hidden;
    transform: translateY(12px) scale(.985);
    transition: transform .22s ease;
}

.listool-search-backdrop.is-open .listool-search-modal {
    transform: translateY(0) scale(1);
}

.listool-search-top {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border-bottom: 1px solid rgba(255,255,255,.09);
}

.listool-search-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 16px;
    color: rgba(255,255,255,.88);
    background: linear-gradient(135deg, rgba(124,92,255,.25), rgba(0,225,255,.12));
    border: 1px solid rgba(255,255,255,.1);
}

.listool-search-input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    color: #fff;
    background: transparent;
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    letter-spacing: -.02em;
}

.listool-search-input::placeholder {
    color: rgba(226,232,255,.42);
}

.listool-search-close {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 14px;
    color: rgba(255,255,255,.72);
    background: rgba(255,255,255,.05);
    cursor: pointer;
    transition: transform .18s ease, background .18s ease, color .18s ease;
}

.listool-search-close:hover {
    transform: translateY(-1px);
    background: rgba(255,255,255,.1);
    color: #fff;
}

.listool-search-body {
    max-height: min(68vh, 690px);
    overflow: auto;
    padding: 18px;
}

.listool-search-section + .listool-search-section {
    margin-top: 20px;
}

.listool-search-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 10px;
    color: rgba(226,232,255,.56);
    font-size: .76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .14em;
}

.listool-search-list {
    display: grid;
    gap: 10px;
}

.listool-search-result {
    position: relative;
    display: grid;
    grid-template-columns: 54px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 20px;
    color: inherit;
    text-decoration: none;
    background: rgba(255,255,255,.045);
    border: 1px solid rgba(255,255,255,.08);
    transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.listool-search-result:hover,
.listool-search-result.is-active {
    transform: translateY(-1px);
    background: rgba(255,255,255,.075);
    border-color: rgba(139, 116, 255, .42);
}

.listool-search-logo {
    width: 54px;
    height: 54px;
    border-radius: 17px;
    object-fit: cover;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
}

.listool-search-copy {
    min-width: 0;
}

.listool-search-name {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 4px;
    color: #fff;
    font-weight: 850;
    letter-spacing: -.01em;
}

.listool-search-desc {
    margin: 0;
    color: rgba(226,232,255,.62);
    font-size: .91rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.listool-search-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.listool-search-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 999px;
    color: rgba(255,255,255,.78);
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    font-size: .76rem;
    font-weight: 750;
    white-space: nowrap;
}

.listool-search-category-grid,
.listool-search-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.listool-search-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 13px;
    border-radius: 999px;
    color: rgba(255,255,255,.82);
    text-decoration: none;
    background: rgba(255,255,255,.055);
    border: 1px solid rgba(255,255,255,.09);
    transition: transform .18s ease, background .18s ease;
}

.listool-search-chip:hover {
    transform: translateY(-1px);
    background: rgba(255,255,255,.09);
}

.listool-search-empty,
.listool-search-loading {
    padding: 34px 18px;
    text-align: center;
    color: rgba(226,232,255,.62);
}

.listool-search-footer {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 18px 18px;
    color: rgba(226,232,255,.42);
    font-size: .78rem;
}

.listool-search-kbd {
    padding: 3px 7px;
    border-radius: 7px;
    color: rgba(255,255,255,.75);
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.1);
}

@media (max-width: 720px) {
    .listool-search-backdrop {
        align-items: stretch;
        padding: 0;
    }

    .listool-search-modal {
        width: 100%;
        min-height: 100dvh;
        border-radius: 0;
        border-left: 0;
        border-right: 0;
    }

    .listool-search-top {
        padding: 16px;
    }

    .listool-search-body {
        max-height: calc(100dvh - 132px);
    }

    .listool-search-result {
        grid-template-columns: 48px 1fr;
    }

    .listool-search-logo {
        width: 48px;
        height: 48px;
        border-radius: 15px;
    }

    .listool-search-meta {
        grid-column: 2;
        justify-content: flex-start;
    }

    .listool-search-footer {
        display: none;
    }
}
