/// _components.input.scss -*- Mode: scss; indent-tabs-mode: nil; basic-offset: 2; fill-column: 80 -*-

.input-checkbox-container {
  label {
    cursor: pointer;
    display: inline-block;
    margin-left: $inuit-global-spacing-unit-small;
    vertical-align: middle;
  }

  label p {
    margin: 0;
  }

  label p.caption {
    @include inuit-font-size($pf-font-small, none);
  }
}


.input-container {
  padding-bottom: $inuit-global-spacing-unit-small;

  &.input-container--last {
    @extend .u-padding-bottom;
    @extend .u-padding-bottom\@tablet;
  }

  label {
    cursor: pointer;
    display: block;
    color: $pf-input-label;
    font-weight: 600;
    font-size: 75%;
    text-transform: uppercase;
  }

  label.radio {
    display: block;
    padding-top: $inuit-global-spacing-unit-small;
    width: 100%;
    font-size: inherit;
    font-weight: inherit;
    text-transform: none;
  }

  input:not([type=radio]), select {
    border: 2px solid $pf-input-border;
    border-radius: .25rem;
    background-color: $pf-input-background;
    padding: $inuit-global-spacing-unit-small;
    transition: border-color 0.15s linear;
    width: 100%;
    -webkit-appearance: none;

    &:focus {
      outline: none;
    }
  }

  .error {
    input, select {
      border-color: $pf-color-error;
    }
    .error_message {
      color: $pf-color-error;
      font-size: 80%;
    }
  }

  // Container for input field with inner button
  .input-extend {
    position: relative;

    input {
      padding-right: 5em;
    }

    .c-btn {
      position: absolute;
      right: 0; top: 0; bottom: 0;
      border-radius: 5px;
      margin: 1em;
      background-color: $pf-color-secondary;
      color: #fff;
      line-height: $inuit-global-line-height * 2/3;
      text-transform: uppercase;
      border: 0;
    }
  }

  select {
    background-color: white;
    height: $spacing-unit + $inuit-global-font-size * 1.2;
  }
}
