/* =============================================
   TeleFinder — поиск [2026-10-28]: поле (шапка/главная), выпадающий список, мобильная панель
   ============================================= */
.tf-s { position: relative; }
.tf-s-form {
    display: flex; align-items: center; gap: 8px;
    background: #F1F5F9; border: 1.5px solid transparent; border-radius: 12px;
    padding: 0 6px 0 12px; height: 44px; transition: background .15s, border-color .15s, box-shadow .15s;
}
.tf-s-form:hover { background: #EBF0F6; }
.tf-s.is-open .tf-s-form, .tf-s-form:focus-within {
    background: #fff; border-color: var(--color-primary); box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}
.tf-s-ico { color: #64748B; flex-shrink: 0; display: flex; }
.tf-s-form:focus-within .tf-s-ico { color: var(--color-primary); }
.tf-s-input {
    flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent;
    font: 500 15px/1 var(--font-family); color: #0F172A;
}
.tf-s-input::placeholder { color: #94A3B8; font-weight: 400; }
.tf-s-input::-webkit-search-cancel-button { display: none; }
.tf-s-clear {
    width: 28px; height: 28px; border-radius: 50%; border: 0; background: #E2E8F0; color: #475569;
    display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
}
.tf-s-clear[hidden] { display: none; }
.tf-s-clear:hover { background: #CBD5E1; }
.tf-s-key {
    font: 600 11px/1 var(--font-family); color: #94A3B8; border: 1px solid #CBD5E1; border-radius: 6px;
    padding: 4px 7px; flex-shrink: 0;
}
.tf-s-form:focus-within .tf-s-key { display: none; }

/* --- выпадающий список --- */
.tf-s-drop {
    position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 1200;
    background: #fff; border: 1px solid #E2E8F0; border-radius: 16px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, .16), 0 2px 6px rgba(15, 23, 42, .06);
    max-height: min(70vh, 560px); overflow-y: auto; overscroll-behavior: contain; padding: 8px; text-align: left;
}
.tf-s-drop[hidden] { display: none; }
.tf-s-sec {
    font: 700 11px/1 var(--font-family); letter-spacing: .06em; text-transform: uppercase; color: #64748B;
    padding: 12px 10px 8px; display: flex; align-items: center; gap: 6px;
}
.tf-s-count { background: #EFF6FF; color: var(--color-primary); border-radius: 10px; padding: 3px 7px; letter-spacing: 0; }
.tf-s-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 8px 8px; }
.tf-s-chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px;
    background: #F1F5F9; color: #1E293B; font: 600 13px/1 var(--font-family); text-decoration: none;
    border: 1px solid transparent; cursor: pointer; transition: background .12s, border-color .12s;
}
.tf-s-chip:hover, .tf-s-chip.is-active { background: #EFF6FF; border-color: #BFDBFE; color: var(--color-primary); }
.tf-s-chip span { color: #64748B; font-weight: 500; }
.tf-s-chip--recent svg { color: #94A3B8; }
.tf-s-list { display: flex; flex-direction: column; }
.tf-s-row, .tf-s-col {
    display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px;
    text-decoration: none; color: inherit; transition: background .1s;
}
.tf-s-row:hover, .tf-s-col:hover, .tf-s-row.is-active, .tf-s-col.is-active { background: #F1F5F9; }
.tf-s-av {
    width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; overflow: hidden; background: #E2E8F0;
    display: flex; align-items: center; justify-content: center; color: #fff; font: 700 13px/1 var(--font-family);
}
.tf-s-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tf-s-info { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.tf-s-name { font: 700 14px/1.3 var(--font-family); color: #0F172A; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tf-s-name mark { background: #FEF08A; color: inherit; border-radius: 3px; padding: 0 1px; }
.tf-s-meta { font: 500 12px/1.2 var(--font-family); color: #64748B; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tf-s-18 { font: 700 10px/1 var(--font-family); color: #fff; background: #DC2626; border-radius: 6px; padding: 4px 6px; flex-shrink: 0; }
/* [2026-10-28] в поиске 18+ не размываем — человек сам это ищет; окно возраста — на странице канала */
.tf-s-col__i {
    width: 40px; height: 40px; border-radius: 10px; background: #EFF6FF; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.tf-s-more {
    display: block; width: calc(100% - 16px); margin: 6px 8px 4px; height: 42px; border-radius: 10px;
    border: 1.5px solid #E2E8F0; background: #fff; color: var(--color-primary); font: 700 14px/1 var(--font-family); cursor: pointer;
}
.tf-s-more:hover { background: #EFF6FF; border-color: #BFDBFE; }
.tf-s-fixed { margin: 6px 8px 2px; padding: 10px 12px; border-radius: 10px; background: #FFFBEB; color: #92400E; font: 500 13px/1.35 var(--font-family); }
.tf-s-empty { padding: 18px 12px 6px; display: flex; flex-direction: column; gap: 6px; font: 400 14px/1.4 var(--font-family); color: #475569; }
.tf-s-empty b { color: #0F172A; font-size: 15px; }
.tf-s-add {
    display: block; margin: 4px 8px 8px; padding: 12px; border-radius: 10px; background: #F8FAFC;
    color: var(--color-primary); font: 700 14px/1 var(--font-family); text-align: center; text-decoration: none;
}
.tf-s-skel { display: flex; align-items: center; gap: 12px; padding: 10px; }
.tf-s-skel__av { width: 40px; height: 40px; border-radius: 10px; }
.tf-s-skel__l { flex: 1; display: flex; flex-direction: column; gap: 7px; }
.tf-s-skel__l i { display: block; height: 11px; border-radius: 6px; width: 70%; }
.tf-s-skel__l i + i { width: 40%; }
.tf-s-skel__av, .tf-s-skel__l i {
    background: linear-gradient(90deg, #EEF2F7 25%, #E2E8F0 37%, #EEF2F7 63%); background-size: 400% 100%;
    animation: tfShimmer 1.2s ease infinite;
}
@keyframes tfShimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
/* --- поиск в шапке (все страницы, кроме главной) --- */
.navbar__inner { gap: 16px; }
.tf-hs { flex: 0 1 340px; margin-left: auto; margin-right: 12px; }
.tf-hs .tf-s-form { height: 42px; }
.tf-hs-toggle, .tf-hs-close { display: none; }
@media (min-width: 1025px) {
    .tf-hs { margin-left: 28px; margin-right: auto; }
    .navbar__nav { position: static; transform: none; margin: 0; }
    .navbar__actions { margin-left: 8px; }
}
@media (min-width: 1025px) and (max-width: 1340px) { .tf-hs { flex-basis: 260px; margin-left: 20px; } }
@media (min-width: 1025px) and (max-width: 1100px) { .tf-hs { flex-basis: 220px; } .tf-hs .tf-s-key { display: none; } }

@media (min-width: 1025px) { .tf-hs .tf-s-drop { width: 460px; right: auto; } }

/* телефон/планшет: значок 🔍 → панель под шапкой на всю ширину */
@media (max-width: 1024px) {
    .navbar__inner { gap: 0; }
    .navbar__actions { order: 1; }
    .tf-hs-toggle {
        display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-left: auto; flex-shrink: 0;
        border: 0; border-radius: 50%; background: transparent; color: var(--color-primary); cursor: pointer; order: 2;
        padding: 0; transition: background .15s, color .15s; -webkit-tap-highlight-color: transparent;
    }
    .tf-hs-toggle svg { width: 23px; height: 23px; display: block; }
    .tf-hs-toggle:hover, .tf-hs-toggle:active { background: rgba(37, 99, 235, .08); }
    .tf-hs-toggle[aria-expanded="true"] { background: #DBEAFE; color: var(--color-primary-dark, #1D4ED8); }
    .navbar__hamburger { width: 40px; height: 40px; margin-left: 4px; }
    @media (min-width: 769px) { .tf-hs-toggle { margin-left: 12px; } }
    .navbar__hamburger { margin-left: 4px; }
    .tf-hs {
        position: fixed; left: 0; right: 0; top: var(--navbar-height); z-index: 1150; margin: 0;
        background: #fff; padding: 10px 12px 12px; border-bottom: 1px solid #E2E8F0;
        box-shadow: 0 12px 30px rgba(15, 23, 42, .12); display: none;
    }
    .tf-hs.is-mobile-open { display: block; }
    .tf-hs .tf-s { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
    .tf-hs .tf-s-form { flex: 1 1 0; min-width: 0; height: 46px; background: #fff; border-color: var(--color-primary); box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); }
    .tf-hs .tf-s-input { font-size: 16px; }   /* 16px — iOS не увеличивает страницу при фокусе */
    .tf-hs .tf-s-key { display: none; }
    .tf-hs-close { display: block; flex: 0 0 auto; border: 0; background: none; color: var(--color-primary); font: 700 15px/1 var(--font-family); padding: 10px 4px; cursor: pointer; }
    .tf-hs .tf-s-drop {
        position: static; width: 100%; margin-top: 10px; border: 0; box-shadow: none; padding: 0 0 8px;
        max-height: calc(100dvh - var(--navbar-height) - 90px); border-radius: 0;
    }
    .tf-hs .tf-s-row, .tf-hs .tf-s-col { padding: 11px 6px; }
    .tf-hs .tf-s-av, .tf-hs .tf-s-col__i { width: 44px; height: 44px; }
    .tf-hs .tf-s-name { font-size: 15px; }
    .tf-hs .tf-s-meta { font-size: 13px; }
    .tf-hs .tf-s-chip { padding: 10px 14px; font-size: 14px; }
    body.tf-hs-lock { overflow: hidden; }
}

/* --- большой поиск на главной (тот же размер, новый вид) --- */
.hero__search-wrapper.tf-s-hero-wrap { background: transparent; box-shadow: none; padding: 0; max-width: 820px; }
.tf-s--hero .tf-s-form {
    height: 64px; padding: 0 8px 0 20px; border-radius: 16px; background: #fff;
    border: 1.5px solid #CBD5E1; box-shadow: 0 10px 30px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .04);
}
.tf-s--hero .tf-s-form:hover { background: #fff; border-color: #94A3B8; }
.tf-s--hero.is-open .tf-s-form, .tf-s--hero .tf-s-form:focus-within {
    border-color: var(--color-primary); box-shadow: 0 0 0 5px rgba(37, 99, 235, .12), 0 10px 30px rgba(15, 23, 42, .08);
}
.tf-s--hero .tf-s-ico svg { width: 22px; height: 22px; }
.tf-s--hero .tf-s-input { font-size: 17px; }
.tf-s-btn {
    height: 48px; padding: 0 26px; border: 0; border-radius: 12px; background: var(--color-primary); color: #fff;
    font: 700 15px/1 var(--font-family); cursor: pointer; flex-shrink: 0; transition: background .15s, transform .15s;
}
.tf-s-btn:hover { background: var(--color-primary-dark); transform: translateY(-1px); }
.tf-s-popular { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; font: 500 14px/1 var(--font-family); color: #64748B; }
.tf-s-popular a { color: #1E293B; background: rgba(255, 255, 255, .7); border: 1px solid #E2E8F0; border-radius: 999px; padding: 7px 12px; text-decoration: none; }
.tf-s-popular a:hover { border-color: #BFDBFE; color: var(--color-primary); background: #fff; }
.tf-s--hero .tf-s-drop { top: calc(100% + 10px); }
@media (max-width: 640px) {
    .tf-s--hero .tf-s-form { height: 56px; padding: 0 6px 0 14px; border-radius: 14px; }
    .tf-s--hero .tf-s-input { font-size: 16px; }
    .tf-s-btn { height: 44px; padding: 0 14px; }
    .tf-s-btn span { display: none; }
    .tf-s--hero .tf-s-key { display: none; }
    .tf-s-popular { gap: 6px; font-size: 13px; }
    .tf-s-popular > span { width: 100%; text-align: center; }
}
.tf-s-btn svg { display: none; }
@media (max-width: 640px) { .tf-s-btn svg { display: block; } }
