.switch-places {
  display: block;
  position: absolute;
  z-index: 1;
  top: 14px;
  padding-top: 7px;
  margin-left: -8px;
  height: 22px;
  background-color: #fff;
  cursor: pointer;

  &:after,
  &:before {
    content: '';
    display: block;
    width: 13px;
    height: 8px;
    transition: transform .2s ease-in-out;
  }

  &:before {
    background: url("data:image/svg+xml,%3Csvg%20width%3D%2213%22%20height%3D%228%22%20viewBox%3D%220%200%2013%208%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8%204.43v3l5-3.5-5-3.5v3H0v1h8z%22%20fill%3D%22%230BB8DC%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E") no-repeat center center;
  }

  &:after {
    background: url("data:image/svg+xml,%3Csvg%20width%3D%2213%22%20height%3D%228%22%20viewBox%3D%220%200%2013%208%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%204.43v3l-5-3.5%205-3.5v3h8v1H5z%22%20fill%3D%22%230BB8DC%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E") no-repeat center center;
  }

  &:hover {
    &:after {
      transform: translateX(-2px);
    }

    &:before {
      transform: translateX(2px);
    }
  }

  &.disabled {
    display: none;
  }
}

.input-wrapper {
  position: relative;
  flex-grow: 1;

  .form-label {
    font-family: 'ProximaNova-Semibold', sans-serif;
    font-size: 10px;
    line-height: 12px;
    position: absolute;
    top: -17px;
    left: 15px;
    visibility: hidden;
    letter-spacing: 1.11px;
    text-transform: uppercase;
    opacity: 0;
    color: #000;
    transition: opacity .2s ease, visibility .2s ease;
  }

  &:last-of-type .form-input {
    border-right: 0;
  }

  .form-input {
    font-family: $font-family;
    font-size: 14px;
    box-sizing: border-box;
    height: 45px;
    padding: 14px 40px 12px 12px;
    transition: background-color, .2s ease;
    color: #000;
    border: 0;
    border-bottom: 3px solid #E4E4E4;
    border-right: 1px solid rgba(0, 0, 0, .1);
    background-color: #E4E4E4;
    width: 100%;

    &:focus + .form-label,
    &:valid + .form-label {
      visibility: visible;
      opacity: 1;
    }

    &.hover,
    &:hover {
      border-bottom: 3px solid #FFC890;
    }

    &.active,
    &:focus {
      border-bottom: 3px solid #FF9334;
    }
  }

  .iata {
    position: absolute;
    top: 18px;
    right: 12px;
    font-size: 10px;
    letter-spacing: .6px;
    color: rgba(0, 0, 0, 0.4);
  }

  &.from {
    .form-input {
      border-radius: 3px 0 0 3px;
    }
  }

  &.options {
    .form-input {
      border-radius: 0 3px 3px 0;
    }
  }

  &.date {
    .pseudo-input {
      font-family: 'ProximaNova-Regular', sans-serif;
      font-size: 14px;
      position: absolute;
      top: 0;
      padding: 17px 0 0 14px;
      white-space: nowrap;
      max-width: calc(100% - 50px);
      color: darkgray;

      .depart, .return {
        display: inline;
        color: rgb(169, 169, 169);
        &.hidden {
          display: none;
        }
        &.active {
          color: #000000;
        }
      }

      .return:before {
        display: inline;
        content: '—';
        margin-right: 4px;
      }
    }

    &.active {
      .icon-calendar path {
        opacity: 0.6;
      }
    }
  }
}

.form .input-wrapper {
  border: 1px solid #ccc;
  border-right: 0;
  border-left: 0;

  &:first-of-type {
    border-left: 1px solid #ccc;
    border-radius: 3px 0 0 3px;
  }

  @include breakpoint(tablet) {

    margin-bottom: 10px;

    &.from,
    &.to,
    &.date,
    &.options {
      width: 50%;
    }

    &.to .form-input {
      border-radius: 0 3px 3px 0;
    }
    &.date .form-input {
      border-radius: 3px 0 0 3px;
    }
  }
}
