/* ==========================================================================
   ФИКС ПОЛЯ ПОИСКА — v2 (усиленные селекторы с ID)
   Перебивает даже самые специфичные правила и inline-стили.
   ========================================================================== */

/* ---- ТЁМНАЯ ТЕМА: гарантированно светлый текст ввода ---- */
html body:not(.light-theme) input#sIn.search-input,
html body:not(.light-theme) input#sIn,
html body:not(.light-theme) input#mobileSearchInput.search-input,
html body:not(.light-theme) input#mobileSearchInput,
html body:not(.light-theme) .search-container .search-bar input.search-input,
html body:not(.light-theme) .search-bar input.search-input,
html body:not(.light-theme) .search-bar input,
html body:not(.light-theme) .mobile-search-bar input.search-input,
html body:not(.light-theme) .mobile-search-bar input,
html body:not(.light-theme) input.search-input {
    color: #f0f0ff !important;
    -webkit-text-fill-color: #f0f0ff !important;
    caret-color: #f0f0ff !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    outline: none !important;
    border: 0 !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    text-shadow: none !important;
    font-weight: 400 !important;
    opacity: 1 !important;
    filter: none !important;
    mix-blend-mode: normal !important;
}

/* На всякий случай — если что-то где-то ставит ::selection с тёмным фоном */
html body:not(.light-theme) input#sIn::selection,
html body:not(.light-theme) input#mobileSearchInput::selection,
html body:not(.light-theme) input.search-input::selection {
    background: rgba(0, 243, 255, 0.35) !important;
    color: #ffffff !important;
}

/* Автозаполнение Chrome */
html body:not(.light-theme) input#sIn:-webkit-autofill,
html body:not(.light-theme) input#sIn:-webkit-autofill:hover,
html body:not(.light-theme) input#sIn:-webkit-autofill:focus,
html body:not(.light-theme) input#sIn:-webkit-autofill:active,
html body:not(.light-theme) input#mobileSearchInput:-webkit-autofill,
html body:not(.light-theme) input#mobileSearchInput:-webkit-autofill:hover,
html body:not(.light-theme) input#mobileSearchInput:-webkit-autofill:focus,
html body:not(.light-theme) input#mobileSearchInput:-webkit-autofill:active,
html body:not(.light-theme) input.search-input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #2b2b3a inset !important;
    box-shadow: 0 0 0 1000px #2b2b3a inset !important;
    -webkit-text-fill-color: #f0f0ff !important;
    color: #f0f0ff !important;
    caret-color: #f0f0ff !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Обёртка search-bar: фон не меняется ни в каком состоянии */
html body:not(.light-theme) .search-container .search-bar,
html body:not(.light-theme) .search-container .search-bar:hover,
html body:not(.light-theme) .search-container .search-bar:focus,
html body:not(.light-theme) .search-container .search-bar:focus-within,
html body:not(.light-theme) .search-container .search-bar:active,
html body:not(.light-theme) .search-bar,
html body:not(.light-theme) .search-bar:hover,
html body:not(.light-theme) .search-bar:focus,
html body:not(.light-theme) .search-bar:focus-within,
html body:not(.light-theme) .mobile-search-bar,
html body:not(.light-theme) .mobile-search-bar:focus-within {
    background: #2b2b3a !important;
    background-color: #2b2b3a !important;
    background-image: none !important;
    color: #f0f0ff !important;
}

/* ---- СВЕТЛАЯ ТЕМА: тёмный текст, белый фон ---- */
html body.light-theme input#sIn.search-input,
html body.light-theme input#sIn,
html body.light-theme input#mobileSearchInput.search-input,
html body.light-theme input#mobileSearchInput,
html body.light-theme .search-container .search-bar input.search-input,
html body.light-theme .search-bar input.search-input,
html body.light-theme .search-bar input,
html body.light-theme .mobile-search-bar input,
html body.light-theme input.search-input {
    color: #17182f !important;
    -webkit-text-fill-color: #17182f !important;
    caret-color: #17182f !important;
    background: transparent !important;
    background-color: transparent !important;
    outline: none !important;
    box-shadow: none !important;
}
html body.light-theme .search-container .search-bar,
html body.light-theme .search-container .search-bar:focus-within,
html body.light-theme .search-bar,
html body.light-theme .search-bar:focus-within,
html body.light-theme .mobile-search-bar {
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
}