@use '../../00-settings/settings' as *;
@use '../../00-mixins/mixins' as *;
@use '../../11-base/forms/forms' as *;

select {
  @include field-base;
  $svg-shevron-down: svg-icon('shevron-down', coloring('gray'), 24, 24);

  @each $theme, $colors in $themes {
    // Apply the default section as default color scheme if there is no section
    // defined in the DOM.
    .cs--#{$theme} & {
      &,
      &:focus {
        $button-color: set-themified-property($colors, 'color-tertiary', 'button-secondary-background');

        padding-right: 3rem;
        background-image: svg-url($svg-shevron-down), svg-as-background("square", $button-color, 44, 44);
        background-repeat: no-repeat;
        background-position: right .5rem center, right 0 center;
      }

      &:hover {
        $button-hover-color: set-themified-property($colors, 'color-tertiary', 'button-secondary-hover-background');

        background-image: svg-url($svg-shevron-down), svg-as-background("square", $button-hover-color, 44, 44);
        cursor: pointer;
      }

      &:disabled {
        background-image: svg-as-background(
          "lock-closed",
          coloring("gray-medium"),
          20,
          20
        );
      }
    }
  }

  &::-ms-expand { // stylelint-disable-line selector-no-vendor-prefix
    display: none;
  }

  &::-ms-value { // stylelint-disable-line selector-no-vendor-prefix
    @include theme('color', 'color-tertiary', 'default-text-color');

    background: none; // remove blue background on ie10/ie11 when selected
  }
}
