/* Search forms use the same MKТУ picker geometry and states as the new homepage. */
.search__mktu-selected:empty {
  display: none;
}

.search__mktu-selected:not(:empty) {
  margin: 20px 0;
}

.search-mktu-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .08);
  transition: background .2s ease;
}

button.search-mktu-chip { cursor: pointer; }

.search-mktu-chip__num {
  width: 19px;
  color: #f44336;
  font-size: 14px;
  font-weight: 500;
  line-height: 129%;
  letter-spacing: .04em;
}

.search-mktu-chip__text {
  width: 106px;
  overflow: hidden;
  color: #787885;
  font-size: 12px;
  line-height: 125%;
  letter-spacing: -.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-mktu-chip i {
  color: #787885;
  font-size: 15px;
}

button.search-mktu-chip:hover,
button.search-mktu-chip:focus-visible {
  background: #f0f0f1;
}

button.search-mktu-chip:active {
  background: #e1e1e3;
}

@media (max-width: 740px) {
  .search-mktu-chip__text { width: 82px; }
}

.search-form__mktu-field {
  position: relative;
  min-width: 0;
  align-self: end;
}

.search-form__mktu-field .search-form__input {
  width: 100%;
  min-width: 0;
}

.search-form__mktu-field .input__wrapper input {
  min-width: 0;
  width: 100%;
}

.search-form__mktu-field .search-mktu-picker[hidden],
.search-form__mktu-field .home-new-mktu__empty[hidden] {
  display: none;
}

.search-form__mktu-field .search-mktu-picker {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  padding: 8px;
  border: 1px solid #d2d2d6;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .16);
  color: #19191d;
}

.search-form__mktu-field .home-new-mktu__options {
  max-height: 250px;
  overflow-y: auto;
}

.search-form__mktu-field .home-new-mktu__option {
  width: 100%;
  display: grid;
  grid-template-columns: 20px 24px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  line-height: 17px;
}

.search-form__mktu-field .home-new-mktu__option:hover,
.search-form__mktu-field .home-new-mktu__option:focus-visible {
  background: #f3f8ed;
}

.search-form__mktu-field .home-new-mktu__option[data-selection="corresponding"] {
  background: #f0f0f1;
}

.search-form__mktu-field .home-new-mktu__option[data-selection="corresponding"]:hover,
.search-form__mktu-field .home-new-mktu__option[data-selection="corresponding"]:focus-visible {
  background: #e1e1e3;
}

.search-form__mktu-field .home-new-mktu__option b { font-size: 14px; }

.search-form__mktu-field .home-new-mktu__option[aria-selected="true"] .home-new-mktu__check {
  border-color: #d2d2d6;
  background: #5a5b6a;
}

.search-form__mktu-field .home-new-mktu__option[aria-selected="true"] .home-new-mktu__check i {
  transform: scale(1);
  opacity: 1;
}

.search-form__mktu-field .home-new-mktu__option:focus-visible .home-new-mktu__check {
  border-color: #5a5b6a;
  box-shadow: 0 0 0 2px #c4daff;
}

.search-form__mktu-field .home-new-mktu__highlight {
  padding: 0;
  border-radius: 2px;
  background: #ccff99;
  color: #19191d;
  font-weight: 700;
}

.search-form__mktu-field .home-new-mktu__empty {
  padding: 10px 8px;
  font-size: 13px;
  line-height: 18px;
}

.search-form__mktu-field .home-new-mktu__corresponding {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 8px;
  border-top: 1px solid #e1e1e3;
  font-size: 12px;
  line-height: 16px;
  cursor: pointer;
}

.search-form__mktu-field .home-new-mktu__corresponding .checkbox__label {
  font-size: 12px;
  line-height: 16px;
}

.search-form__mktu-field .home-new-mktu__actions {
  display: flex;
  gap: 8px;
  padding: 0 8px 6px;
}

.search-form__mktu-field .home-new-mktu__actions button {
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid #566b40;
  border-radius: 4px;
  background: #566b40;
  color: #fff;
  cursor: pointer;
  font-size: 12px;
}

.search-form__mktu-field .home-new-mktu__actions button:last-child {
  background: #fff;
  color: #566b40;
}

.search-form.--hide-mktu .search-form__mktu-field,
.search-form:has(.search-form__switch > .switch__wrapper > input:checked) .search-form__mktu-field {
  display: none;
}

@media (max-width: 940px) {
  .search-form__mktu-field { grid-column: 1; grid-row: 3; }
}

@media (max-width: 740px) {
  .search-form__mktu-field { width: 100%; order: 2; }
  .search-form__mktu-field label[data-item="mktu"] {
    padding-bottom: 0;
    text-decoration: none;
    cursor: text;
  }
  .search-form__mktu-field label[data-item="mktu"] .input__wrapper {
    display: flex;
  }
}
