/* Našepkávač vo vyhľadávacom poli + prázdny stav na stránke výsledkov.
   Farby sa berú z premenných child témy, aby roletka nevyzerala ako cudzí prvok. */

.tfs-wrap {
    position: relative;
    display: block;
    width: 100%;
}

.tfs-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 999;
    background: #fff;
    border: 1px solid var(--tfl-border, #d8dbe0);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(20, 10, 50, 0.14);
    max-height: 70vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 4px 0 0;
}

.tfs-panel[hidden] { display: none; }

.tfs-section {
    padding: 10px 14px 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--tfl-muted, #666);
}

.tfs-section + .tfs-section { border-top: 1px solid #eef0f3; }

.tfs-note,
.tfs-empty-note {
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--tfl-text, #1a1a1a);
    background: #fbf7ea;
    border-bottom: 1px solid #f0e6cc;
}

.tfs-opt {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    text-decoration: none !important;
    color: var(--tfl-text, #1a1a1a);
    border: none;
}

.tfs-opt:hover,
.tfs-opt.is-active {
    background: #f3f1fa;
    color: var(--tfl-text, #1a1a1a);
}

.tfs-opt mark {
    background: rgba(0, 229, 160, 0.28);
    color: inherit;
    padding: 0;
    border-radius: 2px;
}

.tfs-opt__img {
    width: 44px;
    height: 44px;
    flex: none;
    object-fit: contain;
    border-radius: 6px;
    background: #f5f6f8;
}

.tfs-opt__main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tfs-opt__title {
    font-size: 13.5px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tfs-opt__meta {
    font-size: 11.5px;
    color: var(--tfl-muted, #666);
}

.tfs-opt__side {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    text-align: right;
}

.tfs-opt__price {
    font-size: 13px;
    font-weight: 700;
    color: var(--tfl-price, #cc0000);
    white-space: nowrap;
}

.tfs-opt__stock { font-size: 11px; white-space: nowrap; }
.tfs-stock--in { color: #1a8f5a; }
.tfs-stock--backorder { color: #b8770b; }
.tfs-stock--out { color: var(--tfl-muted, #666); }

.tfs-opt--cat .tfs-opt__name {
    flex: 1;
    font-size: 13.5px;
    font-weight: 600;
}

.tfs-opt__count {
    font-size: 11.5px;
    color: var(--tfl-muted, #666);
    white-space: nowrap;
}

.tfs-opt--all {
    justify-content: space-between;
    margin-top: 4px;
    border-top: 1px solid #eef0f3;
    font-size: 13px;
    font-weight: 600;
    color: var(--tfl-primary, #2f196e);
    position: sticky;
    bottom: 0;
    background: #fff;
}

.tfs-opt--all:hover,
.tfs-opt--all.is-active { background: #f3f1fa; }

.tfs-opt__hint {
    font-size: 11px;
    font-weight: 400;
    color: var(--tfl-muted, #666);
}

/* ============================================
   Stránka výsledkov
   ============================================ */

.tfs-did-you-mean {
    margin: 0 0 16px;
    padding: 10px 14px;
    background: #fbf7ea;
    border: 1px solid #f0e6cc;
    border-radius: 8px;
    font-size: 14px;
}

.tfs-empty { max-width: 640px; margin: 8px 0 32px; }

.tfs-empty__lead {
    font-size: 18px;
    margin: 0 0 8px;
}

.tfs-empty__hint {
    font-size: 14px;
    line-height: 1.6;
    color: var(--tfl-muted, #666);
    margin: 0 0 20px;
}

.tfs-empty__cats {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tfs-empty__cats a {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--tfl-border, #d8dbe0);
    border-radius: 999px;
    font-size: 14px;
    text-decoration: none;
    color: var(--tfl-text, #1a1a1a);
    background: #fff;
}

.tfs-empty__cats a:hover {
    border-color: var(--tfl-primary, #2f196e);
    color: var(--tfl-primary, #2f196e);
}

.tfs-empty__cats span {
    font-size: 12px;
    color: var(--tfl-muted, #666);
}

/* Na desktope je pole v hlavičke úzke (~335 px) a názvy produktov sa do neho
   nezmestia. Roletka sa preto roztiahne doľava — vpravo je koniec poľa, takže
   nemá kam pretiecť. */
@media (min-width: 922px) {
    .tfs-panel {
        left: auto;
        right: 0;
        width: 480px;
    }
}

@media (max-width: 921px) {
    .tfs-panel {
        max-height: 60vh;
    }

    .tfs-opt__meta { display: none; }
}
