.tml-search {
  position: relative;
  width: clamp(190px, 17vw, 250px);
  color: #fff;
  font-family: inherit;
}

.tml-search__field {
  position: relative;
  display: flex;
  align-items: center;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 12px;
  background: rgba(255, 255, 255, .07);
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.tml-search__field:focus-within {
  border-color: #fab41e;
  background: rgba(255, 255, 255, .11);
  box-shadow: 0 0 0 3px rgba(250, 180, 30, .16);
}

.tml-search__icon {
  display: grid;
  flex: 0 0 38px;
  place-items: center;
  color: rgba(255, 255, 255, .76);
}

.tml-search__icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.tml-search__input {
  min-width: 0;
  width: 100%;
  height: 100%;
  padding: 0 34px 0 0;
  border: 0 !important;
  outline: 0 !important;
  color: #fff !important;
  background: transparent !important;
  box-shadow: none !important;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
}

.tml-search__input::placeholder {
  color: rgba(255, 255, 255, .6);
  opacity: 1;
}

.tml-search__input::-webkit-search-cancel-button {
  display: none;
}

.tml-search__clear {
  position: absolute;
  right: 6px;
  display: none;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  color: rgba(255, 255, 255, .78);
  background: transparent;
  font: 400 22px/1 system-ui, sans-serif;
  cursor: pointer;
}

.tml-search__clear.is-visible {
  display: grid;
  place-items: center;
}

.tml-search__clear:hover,
.tml-search__clear:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, .12);
  outline: 0;
}

.tml-search__panel {
  position: absolute;
  z-index: 10020;
  top: calc(100% + 10px);
  right: 0;
  width: min(440px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid rgba(14, 18, 25, .1);
  border-radius: 14px;
  color: #171a20;
  background: #fff;
  box-shadow: 0 18px 54px rgba(6, 10, 16, .24);
}

.tml-search__panel[hidden] {
  display: none !important;
}

.tml-search__status {
  min-height: 38px;
  margin: 0;
  padding: 12px 14px 8px;
  color: #68707d;
  font-size: 11px;
  line-height: 1.4;
}

.tml-search.is-loading .tml-search__status::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 7px;
  border: 2px solid rgba(250, 180, 30, .28);
  border-top-color: #d99200;
  border-radius: 50%;
  vertical-align: -1px;
  animation: tml-search-spin .65s linear infinite;
}

@keyframes tml-search-spin {
  to { transform: rotate(360deg); }
}

.tml-search__results {
  padding: 0 7px 7px;
}

.tml-search__result {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 20px;
  gap: 11px;
  align-items: center;
  min-height: 68px;
  padding: 7px;
  border-radius: 10px;
  color: #171a20 !important;
  text-decoration: none !important;
}

.tml-search__result:hover,
.tml-search__result:focus-visible {
  color: #171a20 !important;
  background: #f3f4f6;
  outline: 2px solid #fab41e;
  outline-offset: -2px;
}

.tml-search__thumb {
  width: 54px;
  height: 54px;
  overflow: hidden;
  border-radius: 8px;
  background: #f1f2f4;
}

.tml-search__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tml-search__copy {
  min-width: 0;
}

.tml-search__copy strong,
.tml-search__copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tml-search__copy strong {
  color: #171a20;
  font-size: 13px;
  line-height: 1.3;
}

.tml-search__copy small {
  margin-top: 4px;
  color: #707784;
  font-size: 10px;
  line-height: 1.3;
}

.tml-search__arrow {
  color: #d99200;
  font-size: 16px;
}

.tml-search--mobile {
  display: none;
}

@media (max-width: 1120px) {
  .tml-hdr-actions > .tml-search:not(.tml-search--mobile) {
    display: none;
  }

  .tml-search--mobile {
    display: block;
    width: 100%;
    margin: 0 0 26px;
  }

  .tml-search--mobile .tml-search__field {
    height: 50px;
    border-color: rgba(255, 255, 255, .3);
    background: rgba(255, 255, 255, .09);
  }

  .tml-search--mobile .tml-search__input {
    font-size: 15px;
  }

  .tml-search--mobile .tml-search__panel {
    position: static;
    width: 100%;
    max-height: min(52vh, 430px);
    margin-top: 9px;
    overflow-y: auto;
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tml-search__field {
    transition: none;
  }

  .tml-search.is-loading .tml-search__status::before {
    animation: none;
  }
}
