/*!
 * Copyright (C) 2023 StApps
 * This program is free software: you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation, version 3.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program. If not, see <https://www.gnu.org/licenses/>.
 */
$icon-size: 22px;

app-root ion-searchbar[class*='sc-ion-searchbar-'] {
  --border-radius: var(--border-radius-default);
  --background: var(--ion-item-background) !important;
  --box-shadow: none;

  height: 38px;
  padding-top: 0;
  padding-bottom: 0;

  &.filterable {
    position: relative;
    padding-right: 0;
    padding-left: 0;

    ion-menu-button {
      position: absolute;
      z-index: 1;
      right: 5px;
    }

    .searchbar-clear-button {
      right: 8px;
    }
  }

  ion-icon {
    font-size: $icon-size;
  }

  ion-icon.searchbar-search-icon {
    top: 50%;
    left: var(--spacing-sm);
    transform: translateY(-50%);
    color: var(--ion-color-medium-shade);
  }

  input.searchbar-input {
    padding: var(--spacing-xs) calc(var(--spacing-lg) + #{$icon-size}) var(--spacing-xs)
      calc(var(--spacing-lg) + #{$icon-size});
  }
}
