:host {
  display: inline-block;
}

.search-field {
  position: relative;

  display: flex;
  flex-flow: row nowrap;
  gap: 5px;
  align-items: center;

  min-width: 220px;
  height: 34px;
  padding: 3px 8px;

  background-color: var(--color-gray-fff);

  .search-icon {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .clear-icon {
    cursor: pointer;
    margin-top: 3px;
    opacity: 1;
    transition: opacity 0.2s ease;

    &:hover {
      opacity: 0.7;
    }
  }

  .search-input {
    flex: 1 1 auto;
    width: 0;
    border: none transparent;
    outline: none;

    &.input {
      background-color: var(--color-gray-fff);
    }

    &:focus {
      border: none transparent;
      outline: none;
    }
  }
}

.search-field.focused::after {
  border: var(--input-outline);
  border-radius: 3px;
}

.search-field::after {
  pointer-events: none;
  content: '';

  position: absolute;
  top: 0;
  left: 0;
  inset: 0;

  border: solid 1px var(--color-gray-eee);
  border-radius: 3px;
}
