button.ui-datepicker-trigger{
  //@extend %button-reset;
  @extend %easy-icon;
  font-size: $font-h4;
  //input + &,
  //select + &,
  //textarea + & {
  //  display: inline-block;
  //  vertical-align: middle;
  //  margin-left: 0.5*$gap;
  //  line-height: $tab-height;
  //}
}
.ui{
  &-state-default{
    list-style: none;
    &, .ui-widget-content &, .ui-widget-header &{
      @extend %jqui-default-state;
    }
  }
  &-state{
    &-hover{
      background: none;
    }
    &-focus{
      background: $color-highlight !important;
      border-color: darken($color-highlight, 10%) !important;
      z-index: 1;
    }
  }
  &-sortable{
    &-helper{
      z-index: z($z-priority, draggable) !important;
    }
  }
  &-draggable{
    &-dragging{
      &.movable-list-item{
        max-width: $sidebar-width - 5*$box-padding !important;
        z-index: z($z-priority, draggable) !important;
      }
      display: inline-block;
      @extend %pseudo-draggable;
      padding: 0 0.5*$gap 0 2*$gap;
      &:before{
        @extend %translateY-correction;
        position: absolute;
        top: 50%;
        left: 0.5*$gap;
      }
    }
  }
  &-accordion{
    & &-content{
      padding: $box-padding;
    }
    & &-header{
      margin-top: -1px;
    }
  }
  &-widget {
    @extend %base-font;
    &-content {
      color: $color-text;
      border-color: $color-border;
      //border-bottom: none;
      //border-top: none;
      background: $color-foreground;
      a{
        &.button-positive{
          color: $button-positive-color;
        }
      }
    }
    &-overlay{
      background: darken($color-text, 5%);
      opacity: 0.75 ;
      //top: $topmenu-height;
      overflow: auto;
    }
    &-header{
      background: mix($color-background,$color-foreground);
      border-color: $color-border;
      //margin: -1px -1px 0;
      color: $color-text;
      a{
        color: $color-main;
      }
      .autoscroll &{
        border-left: none;
        border-right: none;
        margin: 0;
      }
    }
  }
  &-menu{
    @extend %material__elevation--depth_2;
    max-width: $media-collapse-small;
    & &-item{
      padding: .75*$gap $gap;
      margin: 0;
      border-left: none !important;
      border-right: none !important;
      border-top: 1px solid $color-border-minor;
      border-bottom: 1px solid $color-border-minor;
      margin-top: -1px;
      //@extend %truncate;

      @extend %flex;
      @extend %align-items-center;
      &:last-child{
        margin-bottom: -1px;
      }
      a{
        color: $color-text;
      }
      small{
        opacity: .5;
        line-height: 1;
      }
    }
    & &-divider{
      $divider-background: darken($color-highlight,10%);
      display: none;
      & + .ui-menu-item{
        background: $divider-background;
        border-color: $divider-background;
        a{
          color: $color-main !important;
          text-transform: uppercase;
        }
        &:hover, &.ui-state-focus{
          background: $divider-background !important;
          border-color: $divider-background !important;
          & + .ui-menu-item{
            border-top-color: $divider-background !important;
          }
        }
        small{
          display: none;
        }
        & + .ui-menu-item{
          border-top-color: $divider-background;
        }
      }
    }
  }
  &-resizable{
    &-w,&-e{
      top: 20%;
      height: 60%;
    }
    &-n,&-s{
      left: 20%;
      width: 60%;
    }
    &-handle{
      @extend %border-radius-infinite;
      background: $color-border;
    }

  }
  &-progressbar{
    height: 0.5*$gap - 2;
  }
  &-dialog{
    @extend %box;
    @extend %compositor-layer;
    overflow: visible !important;
    position: absolute;
    padding: 0 !important;
    margin-top: $topmenu-height + $gap;
    margin-bottom: $gap;
    background: mix(mix($color-background,$color-foreground),$color-foreground);
    @include respond-to(min-menu-collapse){
      margin-right: $servicebar-width;
    }
    .easy-freetext-search{
      position: relative;
      margin-bottom: $box-padding;
      input{
        @extend %input-block;
      }
      [class*='icon']{
        @extend %input-button-absolute;
      }
    }
    &-content{
      padding: $box-padding !important;
      h3.title {
        display: none;
      }
    }
    & &-button{
      &pane{
        @extend %form-actions;
        margin-top: 0;
        button{
          margin: 0;
          &+button{
            margin-left: 3px;
          }
          &.button{
            @include button($button-base-background,$button-base-color,$button-height);
          }
          &.button-positive, &.button-positive{
            @include button($button-positive-background,$button-positive-color,$button-height);
          }
        }

      }
      &set{
        float: none !important;
      }
    }
    &-titlebar{
      margin-bottom: 0;
      border: none;
      //border-bottom: 1px solid $color-border-minor;
      background: $color-foreground;
      color: $color-text;
      padding: $gap $box-padding !important;
      &-close{
        top: 50% !important;
        right: 0.5*$gap !important;
        margin: 0 !important;
        margin-top: -17px !important;
        height: 34px !important;
        width: 34px !important;
        background: none !important;
        border: none !important;
        &>.ui-icon{
          @extend %control-close;
          background: none !important;
          margin: 0 !important;
          top: 6px !important;
          left: 6px !important;
          height: 20px !important;
          width: 20px !important;
          @extend %rotate-45cw;
          &:before,&:after{
            //border-color: $white;
          }
          &:hover{
            &:before,&:after{
              //border-color: $color-important;
            }
          }
        }
        &>.ui-text{
          display: none;
        }
      }
    }
  }
  &-datepicker{
    z-index: z($z-priority,ui-widget) !important;
    padding: 0;
    table{
      margin-bottom: 0;
    }
    &-month,&-year{
      min-width: 0;
      margin: 3px !important;
    }
    &-week{
      &-col{
        text-align: center;
        @include small;
        background: $color-uberlight;
        tbody &{
          border-right: 1px solid $color-border-minor !important;
        }
      }
    }
    & &-today{
      a{
        background: $color-important !important;
        color: $color-foreground !important;
      }
    }
    & &-current-day{
      a{
        background: $color-positive !important;
        color: $color-foreground !important;
      }
    }
    &-calendar{
      thead{
        tr{
          border-bottom: 1px solid $color-border-minor;
        }
      }
      td{
        a{
          width: 1.5em;
          line-height: 1.5em;
          text-align: center;
          background: none !important;
          border-color: transparent !important;
          padding: 0 !important;
          margin: 0.2em !important;
          @include small;
          @extend %border-radius-infinite;
          &:hover{
            background: $color-positive !important;
            color: $color-foreground !important;
          }
        }
      }
    }
    &-buttonpane{
      margin: 0 !important;
    }
    &-prev,&-next{
      background: none !important;
      border: none !important;
      &, &-hover{
        top: 13px !important;
      }
      span{
        display: none !important;
      }
    }
    &-prev{
      @extend %control-arrow-prev;
      &, &-hover{
        left: .75*$box-padding !important;
      }
    }
    &-next{
      @extend %control-arrow-next;
      &, &-hover{
        right: .75*$box-padding !important;
      }
    }
  }
  &-autocomplete{
    //max-width: 400px !important;
    max-height: 80%;
    overflow: auto;
    @include respond-to(max-small-screen) {
      left: 10px !important;
      right: 10px !important;
      width: auto !important;
    }
  }
  &-front{
    z-index: z($z-priority,modal);
    &.ui-autocomplete{
      z-index: z($z-priority,modal) + 50;
    }
  }

}
