.sw-search-input {
  border: var(--search-bar-border);
  border-radius: var(--search-bar-border-radius);
  display: flex;
  flex-direction: column;
  max-width: var(--search-bar-max-width);
  width: 100%;
  position: relative;
  transition:
    height var(--transition-fast),
    border-color var(--transition-superfast);

  .input-container {
    align-items: flex-start;
    box-sizing: border-box;
    display: flex;
    flex: 0 0 auto;
    padding-left: var(--rhythm-5);
    padding-right: var(--rhythm-1);
    position: relative;
  }

  &:not(.disabled) {
    &:hover {
      border: var(--search-bar-border-hover);
    }

    &:focus-within {
      border: var(--search-bar-border-focus);
    }
  }

  &.has-logo {
    border-top: 1px solid transparent;

    .logo {
      left: var(--rhythm-1_5);
      max-height: var(--rhythm-2);
      position: absolute;
      top: calc(var(--rhythm-1_5) * -1 + var(--rhythm-0_25));
      width: var(--rhythm-14);
      z-index: 0;
    }

    &:before,
    &:after {
      background: var(--search-bar-border-color);
      content: '';
      height: 1px;
      position: absolute;
      top: -1px;
      transition: background-color var(--transition-superfast);
    }

    &:before {
      left: -1px;
      width: var(--rhythm-1);
    }
    &:after {
      left: var(--rhythm-16);
      right: -1px;
    }

    &:not(.disabled) {
      &:hover {
        border-top: 1px solid transparent;

        &:before,
        &:after {
          background: var(--search-bar-border-hover-color);
        }
      }

      &:focus-within {
        border-top: 1px solid transparent;

        &:before,
        &:after {
          background: var(--search-bar-border-focus-color);
        }
      }
    }
  }

  .filters-container {
    padding: var(--rhythm-1) 0;
    margin: 0 var(--rhythm-1);
    border-top: 1px solid var(--color-neutral-light);
  }

  .search-icon-container {
    left: var(--rhythm-0_5);
    position: absolute;

    .search-icon {
      display: flex;
      padding: var(--rhythm-1) var(--rhythm-0_5);
    }
    &.has-cross {
      margin-top: var(--rhythm-0_5);
    }
  }

  input[type='file'] {
    display: none;
  }
}

@media (min-width: 448px) {
  .sw-search-input {
    width: var(--search-bar-max-width);
  }
}
