/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
@import "../style/index";

@mixin uicore-inputs-labeled-select {

  display:                    block;
  padding:                    0;
  margin:                     0 0 $uicore-unbordered-padding;
  text-align:                 left;
  font-family:                $uicore-font-family;
  font-size:                  $uicore-font-size;
  font-weight:                $uicore-font-weight-normal;
  cursor:                     pointer;

  > .uicore-label {

    padding:                0;
    margin:                 0;
    border:                 0 none transparent;
    display:                block;
    font-size:              $uicore-font-size;
    font-weight:            $uicore-font-weight-semibold;
    line-height:            $uicore-line-height;
    text-align:             left;
    color:                  $buic-text-color;
  }

  > .uicore-message {

    display:                block;
    font-size:              $uicore-font-size-small;
    line-height:            $uicore-line-height;
    color:                  $buic-text-color-muted;
  }


  /// Status colors ----------------------------------------------------------

  $status-colors: (
    success:    $buic-foreground-success,
    warning:    $buic-foreground-warning,
    error:      $buic-foreground-alert
  );

  @each $status, $color in $status-colors {

    &.#{$status},
    &.#{$status} > .uicore-message {

      color:              $color;
    }

    &.#{$status} {
      > select,
      > .uicore-inputs-select {

        border-color:       $color;
        box-shadow:         $buic-inputs-boxshadow 0px 1px 1px inset;

        &:focus {

          border-color:   $color;
          box-shadow:     $buic-focus-boxshadow-gradient1 0px 1px 1px inset, rgba( $color, 0.15 ) 0px 0px 0px 2px;
        }
      }
    }
  }
}
