@use '../global/variables' as var;
@use '../mixins/font-size' as fontSize;

// ------------------------------
// セレクトメニュー
// ------------------------------

@mixin select(
  $border-radius: var.$acms-form-select-border-radius,
  $background-color: var.$acms-form-select-bg-color,
  $background-color-hover: var.$acms-form-select-hover-bg-color,
  $text-align: var.$acms-form-select-text-align,
  $font-size: var.$acms-form-select-font-size,
  $text-color: var.$acms-form-select-text-color,
  $active-text-color: $text-color,
  $hover-text-color: $text-color,
  $padding: var.$acms-form-select-padding,
  $line-height: var.$acms-form-select-line-height
) {
  position: relative;
  display: inline-block;
  min-height: var.$acms-form-height;
  padding: $padding;
  padding-right: var.$acms-form-select-padding-right;
  line-height: $line-height;
  color: $text-color;
  text-align: $text-align;
  text-decoration: none;
  vertical-align: middle;
  appearance: none;
  background: url(#{var.$acms-form-select}) right center;
  background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxOCIgaGVpZ2h0PSI1IiB2aWV3Qm94PSIwIDAgMTggNSI+PGc+PGc+PHBhdGggZmlsbD0ibm9uZSIgZD0iTTAgMGgxOHY1SDB6Ii8+PHBhdGggZmlsbD0iIzk5OSIgZD0iTTQuMjIgMGg0LjIyTDYuMzMgMi41IDQuMjIgNSAyLjExIDIuNSAwIDBoNC4yMnoiLz48L2c+PC9nPjwvc3ZnPg==')
    right center;
  background-color: $background-color;
  background-repeat: no-repeat;
  border: var.$acms-form-select-border;
  border-radius: $border-radius;
  transition: all 0.2s;

  @include fontSize.font-size($font-size);

  &:hover {
    color: $hover-text-color;
    background-color: $background-color-hover;
    border: var.$acms-form-select-border-hover;
  }
}
