/*
 * VT360 selected filters — independent panel for the search page.
 *
 * Move #vt360SelectedFilters as one block in vt360-search.php if another
 * location is preferred. The controller finds it by ID, not by its position.
 */
/* Блок вынесен из фиксированной строки фильтров в обычный поток левой 60%
   колонки (см. templates/search-page.php). Сам вынесен за пределы .container
   секции результатов (строка/карточки ниже имеют свой инсет 15px — Bootstrap
   .container, см. bootstrap.css, тот же инсет и у строки фильтров выше,
   .vtpopup-menu), поэтому этот же инсет 15px задан здесь явно — иначе края
   блока не совпадали бы с краями списка/строки фильтров на разных ширинах
   экрана. max-width сознательно нет — ширина всегда равна ширине колонки. */
.vt360-selected-filters-wrap {
  padding: 0 15px;
}

.vt360-selected-filters {
  box-sizing: border-box;
  width: 100%;
  margin: 10px 0 0 0;
  padding: 10px;
  border: 1px solid #e2e2e2;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.vt360-selected-filters[hidden] {
  display: none;
}

.vt360-selected-filters__items {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* Ссылка "Очистить всё" — визуально обычный подчёркнутый текст, без фона/рамки
   кнопки (это <button>, только для клавиатуры/скринридеров, см. разметку). */
.vt360-selected-filters__clear-all {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #4c7d1c;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  white-space: nowrap;
  cursor: pointer;
}

.vt360-selected-filters__clear-all:hover {
  color: #3a6015;
}

.vt360-selected-filters__clear-all:focus-visible {
  outline: 2px solid #6fae2e;
  outline-offset: 2px;
}

.vt360-selected-filters__chip {
  display: inline-flex;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 6px 10px;
  border-radius: 999px;
  background: #eef5e4;
  color: #4c7d1c;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

.vt360-selected-filters__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vt360-selected-filters__remove {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-size: 20px;margin-top: -3px;
  font-weight: 400;
  line-height: 1;
}

.vt360-selected-filters__remove:hover {
  background: rgba(76, 125, 28, 0.15);
}

.vt360-selected-filters__remove:focus-visible {
  outline: 2px solid #6fae2e;
  outline-offset: 2px;
}

@media (max-width: 767px) {
  .vt360-selected-filters {
    margin-top: 8px;
  }

  .vt360-selected-filters__items {
    gap: 6px;
  }

  .vt360-selected-filters__chip {
    max-width: 100%;
    padding: 6px 6px 6px 9px;
    font-size: 12px;
  }
}
