/* Našeptávač pod vyhledávacím polem v hlavičce. */

.app-header-search.has-suggest,
.app-search-drawer form.has-suggest {
    position: relative;
}

.search-suggest {
    position: absolute;
    z-index: 160;
    top: calc(100% + 8px);
    left: 0;
    width: min(430px, calc(100vw - 26px));
    max-height: min(68vh, 470px);
    overflow-y: auto;
    padding: 6px;
    border: 1px solid var(--border-strong);
    border-radius: 16px;
    background: var(--panel-bg-strong);
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px) saturate(150%);
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.search-suggest[hidden] {
    display: none;
}

.app-search-drawer .search-suggest {
    right: 0;
    width: auto;
}

.search-suggest-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px 6px;
    color: var(--muted-2);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.search-suggest-head button {
    padding: 0;
    border: 0;
    background: none;
    color: var(--accent);
    font: inherit;
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
}

.search-suggest-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 7px 9px;
    border-radius: 12px;
    color: var(--text);
    text-decoration: none;
}

.search-suggest-item.is-active,
.search-suggest-item:hover {
    background: var(--accent-soft);
}

.search-suggest-item.is-active {
    outline: 1px solid rgba(255, 77, 104, .35);
}

.search-suggest-poster {
    display: grid;
    overflow: hidden;
    width: 36px;
    height: 52px;
    flex: 0 0 36px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: linear-gradient(145deg, var(--surface-3), var(--surface));
    color: var(--muted-2);
    font-size: 16px;
    font-weight: 850;
}

.search-suggest-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-suggest-icon {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    border-radius: 10px;
    background: var(--surface-3);
    color: var(--muted);
    font-size: 15px;
}

.search-suggest-text {
    min-width: 0;
    flex: 1;
}

.search-suggest-text strong {
    display: block;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-suggest-text small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}

.search-suggest-all strong {
    color: var(--accent);
}

.search-suggest-note {
    margin: 0;
    padding: 12px 11px;
    color: var(--muted);
    font-size: 12px;
}

.search-suggest-note a {
    color: var(--accent);
    font-weight: 800;
}

.search-suggest-skeleton {
    display: grid;
    gap: 8px;
    padding: 0 9px 10px;
}

.search-suggest-skeleton i {
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(100deg, var(--surface-2) 20%, var(--surface-3) 42%, var(--surface-2) 64%);
    background-size: 260% 100%;
    animation: search-suggest-shimmer 1.15s linear infinite;
}

@keyframes search-suggest-shimmer {
    from { background-position: 130% 0; }
    to { background-position: -130% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .search-suggest-skeleton i {
        animation: none;
    }
}

@media (max-width: 820px) {
    .search-suggest {
        max-height: min(60vh, 420px);
    }
}
