/* Copyright 2015 The Chromium Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file. */

:host {
  -webkit-padding-end: 10px;
  box-sizing: border-box;
  display: flex;
  justify-content: flex-end;
}

[hidden] {
  display: none !important;
}

paper-input-container {
  margin-top: 2px;
  max-width: 200px;
  padding: 2px 0;
  width: 100%;
}

#searchTerm {
  --paper-input-container-color: rgb(192, 199, 205);
  --paper-input-container-focus-color: rgb(192, 199, 205);
  --paper-input-container-input: {
    color: inherit;
    font-size: inherit;
  };
  --paper-input-container-input-color: rgb(192, 199, 205);
  color: rgb(192, 199, 205);
  z-index: 0;
}

#searchTerm input[type='search']::-webkit-search-decoration,
#searchTerm input[type='search']::-webkit-search-cancel-button,
#searchTerm input[type='search']::-webkit-search-results-button {
  -webkit-appearance: none;
}

#searchTerm input[type='search']::-webkit-search-cancel-button {
  display: none;
}

#searchTerm input[type='search'] {
  padding-right: 20px;
}

paper-icon-button {
  --iron-icon-height: 20px;
  --iron-icon-width: 20px;
  --paper-icon-button: {
    height: 32px;
    padding: 6px;
    width: 32px;
  };
}

#searchTerm paper-icon-button {
  --iron-icon-height: 16px;
  --iron-icon-width: 16px;
  --paper-icon-button: {
    -webkit-margin-end: -8px;
    height: 32px;
    padding: 8px;
    width: 32px;
  };
  position: absolute;
  right: 0;
  top: -4px;
  z-index: 1;
}

:host-context([dir='rtl']) #searchTerm paper-icon-button {
  left: 0;
  right: auto;
}

:host-context([dir='rtl']) #searchTerm input[type='search'] {
  padding-left: 20px;
  padding-right: 0;
}
