// Copyright (c) 2014, 2025, Oracle and/or its affiliates.  Licensed under The Universal Permissive License (UPL), Version 1.0 as shown at https://oss.oracle.com/licenses/upl/

@import "../../utilities/oj.utilities";


// ----- start dependencies ---------

// set up include variables before importing dependencies
@if $includeSelectClasses != false {
  $includeIconClasses:              true !global;
  $includePopupClasses:             true !global;
  $includeLabelClasses:             true !global;
  $includeMessagingClasses:         true !global;
  $includeFormControlCommonClasses: true !global;
  $includeListboxClasses:           true !global;
}

// import dependencies
@import "../../common/helpers/oj.common.helpers"; 
@import "oj.alta.windows.icons";
@import "oj.alta.windows.messaging";
@import "oj.alta.windows.popup";
@import "oj.alta.windows.formcontrol.label";
@import "oj.alta.windows.formcontrol.common";
@import "oj.alta.windows.formcontrol.listbox";

// ----- end dependencies ---------


// import classes defined in the common directory
@import "../../common/widgets/oj.common.formcontrol.select";


@if $includeSelectClasses != false {
  @include module-include-once("alta.windows.select") {

    // arrow
    .oj-select-open-icon {
      @extend .oj-fwk-icon-caret03-s;
    }

    .oj-select-select::-ms-value {

        background-color: $formControlBgColor; 
        color: $formControlInputValueColor;  

    }

    .oj-select-select[disabled] {

        background: $formControlBgColor;         

    }

    .oj-select .oj-select-multiple-open-icon {
      display:none;
    }

    .oj-select .oj-select-select::-ms-expand {
      display:none;
    }

    .oj-select-select {
      -moz-appearance:none;
    }

    .oj-select-native.oj-enabled .oj-select-select:active {

        background-color: $formControlBgColor;        

    }

    .oj-select-native .oj-select-select[multiple] {
      overflow-x: hidden;
      overflow-y: scroll;
      padding-left: 0;
      padding-right: 0;

        min-height: calc(#{$formControlTriggerHeight} * 2);        
      
    }

    // windows mobile oj-select-many has a native select element with no icon, so doesn't need the padding-right here.
    .oj-form-control-text-align-right oj-select-many .oj-select .oj-select-select,
    oj-select-many.oj-form-control-text-align-right .oj-select .oj-select-select {
      @include oj-ltr() {
        padding-right: 0px;
      }
    }

    .oj-form-control-text-align-end oj-select-many .oj-select .oj-select-select,
    oj-select-many.oj-form-control-text-align-end .oj-select .oj-select-select {
      @include oj-ltr() {
        padding-right: 0px;
      }
      @include oj-rtl() {
        padding-left: 0px;
      }
    }
  }
}

