/* =====================================================================
   Шаблон sotbit:search.title (mobile)
   Внешняя обёртка повторяет разметку bitrix:search.title (mobile):
     .search-mobile, .search-mobile__container, .search-mobile__backdrop,
     .search-mobile__close.
   Внутренние элементы — оригинальные классы sotbit, чтобы JS
   SotbitTitleSmartsearch работал без изменений.
   Включены правила, перенесённые из additional.css.
   ===================================================================== */

/* =====================================================================
   МОБИЛЬНЫЙ ОВЕРЛЕЙ
   ===================================================================== */

.search-mobile {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    z-index: 200;
}

.search-mobile.search-mobile--opened {
    display: flex;
}

.search-mobile__backdrop {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: -1;
}

.search-mobile__container {
    display: flex;
    align-items: flex-start;
    justify-content: center;
	align-items: center;
    gap: 30px;
    position: relative;
    height: 70px;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 20px;
    background-color: #ffffff;
    z-index: 201;
}

.search-mobile__close {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
    fill: #001f31;
}

.search-mobile__close:hover {
    fill: #004e7b;
}

/* =====================================================================
   ВНУТРЕННИЙ ПОИСК sotbit ВНУТРИ .search-mobile__container
   ===================================================================== */

.search-mobile .smartsearch-title__wrap {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    font-size: 16px;
    line-height: 46px;
}

.search-mobile .smartsearch-title__wrap form {
    width: 100%;
    height: 100%;
}

.search-mobile .smartsearch-title__input-conteiner {
    position: relative;
}

/* -------- Поле ввода --------
   Специфичность .search-mobile .smartsearch-title__input[type='text']
   = (0,0,3,0) — выше, чем (0,0,2,1) у .header input[type='text']
   из additional.css — наши правила гарантированно выигрывают. */
.search-mobile .smartsearch-title__input[type='text'] {
    display: inline-flex;
    box-sizing: border-box;
    width: 100%;
    height: 40px;
    padding: 6px 44px 6px 40px;
    font-size: 16px;
    line-height: 20px;
    color: #4e4e4e;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    outline: none;
}

.search-mobile .smartsearch-title__input[type='text']::placeholder {
    font-size: 16px;
    color: #abb5be;
    opacity: 1;
}

/* Декоративная «лупа» слева */
.search-mobile .smartsearch-title__input-conteiner::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 8px;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M11 2C6.02944 2 2 6.02944 2 11C2 15.9706 6.02944 20 11 20C13.125 20 15.078 19.2635 16.6177 18.0319L20.2929 21.7071C20.6834 22.0976 21.3166 22.0976 21.7071 21.7071C22.0976 21.3166 22.0976 20.6834 21.7071 20.2929L18.0319 16.6177C19.2635 15.078 20 13.125 20 11C20 6.02944 15.9706 2 11 2ZM4 11C4 7.13401 7.13401 4 11 4C14.866 4 18 7.13401 18 11C18 14.866 14.866 18 11 18C7.13401 18 4 14.866 4 11Z' fill='%234E4E4E'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    z-index: 1;
}

/* -------- Иконки-кнопки справа -------- */
.search-mobile .smartsearch-title__wrap .icon-wrapper {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
}

.search-mobile .smartsearch-title__wrap .search-title__icon {
    display: none;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    color: #4e4e4e;
    transition: color 0.2s, background-color 0.2s;
}

.search-mobile .smartsearch-title__wrap .search-title__icon.show {
    display: inline-flex;
}

.search-mobile .smartsearch-title__wrap .search-title__icon.speech {
    color: #8450db;
}

.search-mobile .smartsearch-title__wrap .search-title__icon:hover {
    color: #004e7b;
}

.search-mobile .smartsearch-title__wrap .search-title__icon svg {
    width: 18px;
    height: 18px;
}

/* =====================================================================
   ПАНЕЛЬ РЕЗУЛЬТАТОВ (mobile)
   ===================================================================== */

.search-mobile .smartsearch-title__result {
    position: absolute;
    top: 105%;
    left: -20px;
    width: calc(100% + 40px);
    box-sizing: border-box;
    background-color: #ffffff;
    box-shadow: 0px 4px 24px rgba(69, 44, 113, 0.1);
    border-radius: 0 0 24px 24px;
    overflow: auto;
    z-index: 205;
    max-height: 330px;
    padding: 12px 16px;
    font-size: 14px;
    line-height: 16px;
    color: #4e4e4e;
}

.search-mobile .smartsearch-title__result .m-auto {
    margin: auto;
}

.search-mobile .smartsearch-title__items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.search-mobile .smartsearch-title__result .result-group {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 8px;
    width: 100%;
}

.search-mobile .smartsearch-title__result .result-group .result-group__title {
    max-width: 100%;
    color: #abb5be;
}

/* -------- Пункт результата -------- */
.search-mobile .smartsearch-title__result-item {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.search-mobile .smartsearch-title__result-item:hover {
    background-color: #004e7b;
    color: #ffffff;
}

.search-mobile .smartsearch-title__result-item:hover .item-name,
.search-mobile .smartsearch-title__result-item:hover .item-name b,
.search-mobile .smartsearch-title__result-item:hover .item-price,
.search-mobile .smartsearch-title__result-item:hover .item-price .old,
.search-mobile .smartsearch-title__result-item:hover .section,
.search-mobile .smartsearch-title__result-item:hover .all-result {
    color: #ffffff;
}

.search-mobile .smartsearch-title__result-item .item-img {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
}

.search-mobile .smartsearch-title__result-item .item-img > a {
    display: inline-block;
}

.search-mobile .smartsearch-title__result-item .item-img img {
    width: 30px;
    height: 30px;
    max-width: 30px;
    max-height: 30px;
    object-fit: contain;
    border-radius: 5px;
}

.search-mobile .smartsearch-title__result-item .item-name {
    color: #001f31;
    font-size: 14px;
    font-weight: 400;
    line-height: 140%;
    text-decoration: none;
    transition: color 0.2s;
}

.search-mobile .smartsearch-title__result-item .item-name b {
    color: #8450db;
}

.search-mobile .smartsearch-title__result-item .item-price {
    margin-top: 2px;
    font-size: 14px;
    font-weight: 700;
    line-height: 140%;
}

.search-mobile .smartsearch-title__result-item .item-price .old {
    color: #abb5be;
    font-weight: 500;
    text-decoration: line-through;
    margin-left: 4px;
}

.search-mobile .smartsearch-title__result-item .section {
    margin-top: 2px;
    font-size: 12px;
    line-height: 140%;
    color: #abb5be;
}

.search-mobile .smartsearch-title__result-item .all-result {
    color: #004e7b;
    font-size: 14px;
    font-weight: 500;
    line-height: 140%;
    text-decoration: none;
}

/* -------- Скроллбар -------- */
.search-mobile .smartsearch-title__result::-webkit-scrollbar-button {
    display: none;
}
.search-mobile .smartsearch-title__result::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
.search-mobile .smartsearch-title__result::-webkit-scrollbar-track {
    background-color: #f0f0f0;
    border-radius: 8px;
}
.search-mobile .smartsearch-title__result::-webkit-scrollbar-thumb {
    background-color: #888;
    border-radius: 8px;
}
.search-mobile .smartsearch-title__result::-webkit-scrollbar-thumb:hover {
    background-color: #555;
}

/* =====================================================================
   ИСТОРИЯ ЗАПРОСОВ (mobile)
   ===================================================================== */

.search-mobile .smartsearch-title__req_history {
    position: absolute;
    top: 105%;
    left: -20px;
    width: calc(100% + 40px);
    background: #ffffff;
    box-shadow: 0px 4px 24px rgba(69, 44, 113, 0.1);
    border-radius: 0 0 24px 24px;
    overflow: hidden;
    display: none;
    z-index: 205;
    padding: 0 !important;
}

.search-mobile .smartsearch-title__req_history.show {
    display: block;
}

.search-mobile .smartsearch-title__req_history_content {
    padding: 12px 16px;
    max-height: 40vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #8450db #eee;
}

.search-mobile .smartsearch-title__req_history .smartsearch-title__result-item {
    padding: 6px 0;
    border-radius: 0;
    background-color: transparent;
}

.search-mobile .smartsearch-title__req_history .smartsearch-title__result-item:hover {
    background-color: transparent;
}

.search-mobile .smartsearch-title__req_history_title {
    margin-bottom: 8px;
    font-size: 14px;
    color: #abb5be;
}

.search-mobile .smartsearch-title__wrap .icon {
    color: #abb5be;
    display: inline-flex;
    align-items: center;
}

.search-mobile .smartsearch-title__wrap .delete-item {
    margin-left: auto;
    cursor: pointer;
}

.search-mobile .smartsearch-title__req_history .item {
    list-style: none;
}

/* =====================================================================
   ПРАВИЛА, ПЕРЕНЕСЁННЫЕ ИЗ additional.css
   ===================================================================== */

/* Скрыть псевдоэлементы-маркеры у пунктов результатов
   (аналог .result-list-item::before) */
.search-mobile .smartsearch-title__result-item::before,
.search-mobile .smartsearch-title__req_history .item::before,
.search-mobile .smartsearch-title__items > li::before {
    display: none !important;
    content: none !important;
}

/* Ссылка-пункт результата — как .result-list-item-link */
.search-mobile .smartsearch-title__result-item-link {
    color: #001f31;
}