.b-smart-filter {
    background: #FF373A;
    border-radius: 20px;
    padding: 20px 25px;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-sizing: border-box;
    width: 100%;
    margin-bottom: 20px;
    display: block;
    clear: both;
}

/* Base style for Search Button */
.smart-filter__btn-show,
.btn-submit.org-control {
    background: #379ea1 !important;
    color: #fff !important;
    border: 2px solid #fff !important;
    border-radius: 4px;
    height: 38px;
    padding: 0 30px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
}

.smart-filter__btn-show:hover,
.btn-submit.org-control:hover {
    background: #379ea1 !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.smart-filter__container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
    /* Относительно этого контейнера будет позиционироваться список направлений */
}

.filter-show {
    display: none;
    background: #379ea1;
    color: #FF373A;
    padding: 12px 20px;
    border-radius: 10px;
    text-align: center;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 0;
    font-size: 16px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.bg-hidden-checkbox {
    display: none !important;
}

.filter-value-label {
    cursor: pointer;
    display: flex;
    align-items: center;
    width: 100%;
}

.dropdown_list__trip .filter-value-link svg path {
    fill: #379ea1;
}

.dropdown_list__trip .filter-value-label.is-selected a,
.dropdown_list__trip .filter-value-label.is-selected span.filter-value-link {
    color: #379ea1 !important;
    font-weight: bold;
}

.dropdown_list__trip .smart-filter__show-more {
    color: #379ea1;
}

.filter-value-label.disabled {
    opacity: 0.5;
    cursor: default !important;
}

.filter-value-label.disabled a,
.filter-value-label.disabled .filter-value-link {
    cursor: default !important;
}

.smart-filter__row {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Группы элементов */
.smart-filter__group {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Белые плашки для инпутов и селектов */
.b-smart-filter .smart-filter__box {
    background: #fff;
    border-radius: 4px;
    height: 38px !important;
    display: flex;
    align-items: center;
    padding: 0 10px;
    box-sizing: border-box;
}

.smart-filter__box--date {
    width: 125px;
}

.smart-filter__box--price {
    width: 90px;
}

/* Инпуты */
.smart-filter__input {
    border: none;
    background: transparent;
    font-size: 14px;
    color: #333;
    width: 100%;
    height: 100%;
    outline: none;
    padding: 0;
    box-sizing: border-box;
}

.smart-filter__box--date .smart-filter__input {
    background-image: url('data:image/svg+xml;utf8,<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" stroke="%23999" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>');
    background-repeat: no-repeat;
    background-position: right 0 center;
    padding-right: 20px;
}

/* Символы на красном фоне */
.smart-filter__symbol {
    font-weight: bold;
    font-size: 14px;
    color: #fff;
    white-space: nowrap;
}

.smart-filter__symbol--dash {
    margin: 0 -5px;
}

/* Чекбоксы */
.smart-filter__group--checkboxes {
    margin-left: 10px;
    gap: 20px;
    display: flex;
    align-items: center;
}

.smart-filter__checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
}

.smart-filter__checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 3px;
    border: none;
    cursor: pointer;
    position: relative;
    margin: 0;
    flex-shrink: 0;
}

.smart-filter__checkbox:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid #0c4852;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

/* Обновленные стили для селектов и дропдаунов */
.b-smart-filter .smart-filter__row--bottom {
    align-items: flex-end !important;
}

.b-smart-filter .form_item {
    display: inline-block;
    vertical-align: bottom;
}

.form_item--static {
    position: static !important;
}

.form_item--relative {
    position: relative;
    /* Для компактных списков (Вид путешествия, Организатор) */
}

.b-smart-filter .select.select_arrow {
    position: relative;
    width: 250px;
    height: 38px !important;
    cursor: pointer;
}

.select.select_arrow span {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    color: #999;
    display: flex;
    align-items: center;
    font-size: 14px;
    height: 100%;
    padding: 0 35px 0 12px;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.b-smart-filter .select.select_arrow::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%) !important;
    width: 10px;
    height: 10px;
    background-image: url('data:image/svg+xml, <svg width="11" height="6" viewBox="0 0 11 6" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.7803 5.78021C10.4874 6.0731 10.0126 6.0731 9.71967 5.78021L5.75 1.81054L1.78033 5.78021C1.48744 6.0731 1.01256 6.0731 0.719671 5.78021C0.426777 5.48731 0.426777 5.01244 0.719671 4.71955L5.21967 0.219548C5.51256 -0.0733452 5.98744 -0.0733451 6.28033 0.219548L10.7803 4.71955C11.0732 5.01244 11.0732 5.48731 10.7803 5.78021Z" fill="%23369da0"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    pointer-events: none;
    transition: transform 0.2s;
}

.b-smart-filter .select.select_arrow.active::after {
    background-image: url('data:image/svg+xml,<svg width="11" height="6" viewBox="0 0 11 6" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.7803 5.78021C10.4874 6.0731 10.0126 6.0731 9.71967 5.78021L5.75 1.81054L1.78033 5.78021C1.48744 6.0731 1.01256 6.0731 0.719671 5.78021C0.426777 5.48731 0.426777 5.01244 0.719671 4.71955L5.21967 0.219548C5.51256 -0.0733452 5.98744 -0.0733451 6.28033 0.219548L10.7803 4.71955C11.0732 5.01244 11.0732 5.48731 10.7803 5.78021Z" fill="%23379ea1"/></svg>') !important;
    transform: translateY(-50%) rotate(180deg) !important;
}

.dropdown {
    position: absolute;
    top: 100%;
    z-index: 1000;
    display: none;
    background: #fff;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    padding: 15px 16px 25px;
}

.b-smart-filter .dropdown_wide--country,
.b-smart-filter .dropdown_wide--trip,
.b-smart-filter .dropdown_wide--organizer {
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    max-width: none !important;
    margin-top: 10px !important;
    padding-top: 15px !important;
}

/* Для остальных списков, которые внутри .form_item--relative */
.form_item--relative .dropdown {
    left: 0;
    width: max-content;
    min-width: 100%;
}

.select.select_arrow.active + .dropdown {
    display: block;
}

.dropdown_list__country,
.dropdown_list__organizer {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.dropdown_item {
    font-size: 14px;
}

.dropdown_item a {
    color: #000;
    text-decoration: underline;
    transition: color 0.2s;
}

.dropdown_item a:hover {
    color: #379ea1;
    text-decoration: none;
}

/* Специфичные сетки для других списков */
.dropdown_wide--trip .dropdown_list__trip {
    display: flex !important;
    flex-wrap: wrap !important;
    flex-direction: row !important;
    gap: 20px 30px !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 20px !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.dropdown_wide--trip .type_sections {
    width: 170px !important;
    min-width: 140px !important;
    flex: 0 1 170px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    margin-bottom: 25px !important;
    border: none !important;
    padding: 0 !important;
}

.dropdown_wide--trip .section_name {
    font-weight: bold !important;
    font-size: 14px !important;
    color: #333 !important;
    padding-bottom: 10px !important;
    margin-bottom: 12px !important;
    border-bottom: 1px solid #eee !important;
    width: 100% !important;
}

.dropdown_wide--trip .type_items {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    width: 100% !important;
}

.dropdown_wide--trip .dropdown_item {
    border: none !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 14px !important;
}

.dropdown_wide--trip .dropdown_item label {
    border: none !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 8px !important;
    padding: 5px 0 !important;
    margin: 0 !important;
    width: 100% !important;
    cursor: pointer !important;
    white-space: normal !important;
    line-height: 1.3 !important;
    flex-shrink: 1 !important;
    min-width: 0 !important;
}

.dropdown_wide--trip .dropdown_item .filter-value-link {
    text-decoration: none !important;
    border: none !important;
    color: #333 !important;
    font-size: 13px !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 8px !important;
    white-space: normal !important;
    line-height: 1.3 !important;
    flex-shrink: 1 !important;
    min-width: 0 !important;
    width: 100% !important;
}

.dropdown_wide--trip .dropdown_item a.filter-value-link:hover {
    color: #FF373A !important;
}

.dropdown_wide--trip .dropdown_item label.disabled .filter-value-link:hover {
    color: #333 !important;
}

.dropdown_wide--trip .dropdown_item .filter-value-link span.icon {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    width: auto !important;
    height: auto !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    padding-top: 2px !important;
}

/* Specific fix for text span to allow shrinking and wrapping */
.dropdown_wide--trip .dropdown_item .filter-value-link span.filter-value-text,
.dropdown_item.dropdown_item-country label span {
    flex-shrink: 1 !important;
    display: block !important;
    white-space: normal !important;
    min-width: 0 !important;
}
.dropdown.dropdown_wide.dropdown_wide--organizer label,
.dropdown_item.dropdown_item-country label {
    padding: 0;
    border-bottom: none;
}

.dropdown_list__organizer {
    display: grid;
}

.dropdown.dropdown_wide.dropdown_wide--organizer {
    padding-top: 0;
}


/* Адаптивность */
@media (max-width: 1024px) {
    .select.select_arrow {
        width: 200px;
    }
}

@media (max-width: 767px) {
    body .b-smart-filter:not(.is-open) {
        padding: 0 !important;
    }

    body .b-smart-filter.is-open {
        padding: 20px 25px !important;
    }

    .filter-show {
        display: block;
    }

    .b-smart-filter:not(.is-open) .smart-filter__container {
        display: none;
    }

    .b-smart-filter.is-open .filter-show {
        margin-bottom: 20px;
    }

    .smart-filter__row--top {
        flex-direction: row !important;
        justify-content: flex-start;
        flex-wrap: wrap;
        display: flex !important;
    }

    .smart-filter__row--bottom {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .smart-filter__row--bottom .form_item {
        width: 100%;
    }

    .select.select_arrow,
    .btn-submit.org-control,
    .smart-filter__btn-show {
        width: 100%;
    }
}

@media (max-width: 620px) {
    .smart-filter__row--top {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .smart-filter__row--top .smart-filter__group {
        width: 100% !important;
        justify-content: flex-start;
        gap: 5px;
    }

    .smart-filter__row--top .smart-filter__group--checkboxes {
        margin-left: 0;
        justify-content: space-between;
        gap: 10px;
    }

    .smart-filter__row--top .smart-filter__box {
        flex: 1 1 45% !important; /* Forces 50% roughly */
        width: auto !important;
    }
}

/* Мобильный аккордеон для Вида путешествия (< 700px) */
@media (max-width: 700px) {
    .b-smart-filter .dropdown_wide--trip .dropdown_list__trip {
        display: block !important;
        max-width: 100% !important;
    }

    .b-smart-filter .dropdown_wide--trip .type_sections {
        width: 100% !important;
        flex: none !important;
        border-bottom: 1px solid #eee;
        padding-bottom: 0 !important;
    }

    .b-smart-filter .dropdown_wide--trip .type_sections:last-child {
        border-bottom: none;
    }

    .b-smart-filter .dropdown_wide--trip .section_name {
        padding: 15px 0;
        cursor: pointer;
        position: relative;
        font-weight: bold;
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0 !important;
        color: #333;
    }

    .b-smart-filter .dropdown_wide--trip .section_name::after {
        content: '';
        display: inline-block;
        width: 8px;
        height: 8px;
        border-right: 2px solid #ccc;
        border-bottom: 2px solid #ccc;
        transform: rotate(45deg);
        transition: transform 0.3s ease;
        margin-right: 10px;
    }

    .b-smart-filter .dropdown_wide--trip .type_sections.is-active .section_name::after {
        transform: rotate(-135deg);
    }

    /* Forced hide for items when section is not active */
    .b-smart-filter .dropdown_wide--trip .type_sections:not(.is-active) .type_items {
        display: none !important;
    }

    .b-smart-filter .dropdown_wide--trip .type_sections.is-active .type_items {
        display: flex !important;
        flex-direction: column !important;
        padding-bottom: 15px;
    }
}

/* Стили для тегов (chips) выбранных фильтров */
.smart-filter__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    padding: 0;
}

.smart-filter__tag {
    background: #fff;
    color:#379ea1;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(255, 55, 58, 0.1);
    transition: all 0.2s ease;
    border: 1px solid #379ea1;
    line-height: 1;
}

.smart-filter__tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.smart-filter__tag-remove {
    width: 14px;
    height: 14px;
    position: relative;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.smart-filter__tag-remove:hover {
    opacity: 1;
}

.smart-filter__tag-remove::before,
.smart-filter__tag-remove::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    width: 80%;
    height: 2px;
    background: #379ea1;
    border-radius: 1px;
}

.smart-filter__tag-remove::before {
    transform: translateY(-50%) rotate(45deg);
}

.smart-filter__tag-remove::after {
    transform: translateY(-50%) rotate(-45deg);
}

/* Стили для кнопки "Показать все" в списке видов активности */
.smart-filter__show-more {
    font-size: 11px;
    color: #FF373A;
    text-decoration: underline;
    cursor: pointer;
    margin-top: 5px;
    font-weight: bold;
    display: inline-block;
    transition: color 0.2s;
}

.smart-filter__show-more:hover {
    color: #333;
    text-decoration: none;
}

.type_items--collapsed {
    margin-top: 5px;
    border-top: 1px dashed #eee;
    padding-top: 5px;
}

/* Если тегов нет - скрываем контейнер */
.smart-filter__tags:empty {
    display: none;
}

.xdsoft_datetimepicker .xdsoft_calendar td:hover,
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box > div > div:hover {
    background: #379ea1 !important;
}

.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_default,
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_current,
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box > div > div.xdsoft_current {
    background: #0c4852 !important;
}
