/*!
 * # Semantic UI - Dimmer
 * http://github.com/semantic-org/semantic-ui/
 *
 *
 * Released under the MIT license
 * http://opensource.org/licenses/MIT
 *
 */

/*******************************
            Dimmer
*******************************/

.dimmable:not(body) {
  position: @dimmerDimmablePosition;
}

.ui.dimmer {
  display: none;
  position: @dimmerDimmerPosition;
  top: 0em !important;
  left: 0em !important;

  width: 100%;
  height: 100%;

  text-align: @dimmerTextAlign;
  vertical-align: @dimmerVerticalAlign;
  padding: @dimmerPadding;

  background-color: @dimmerBackgroundColor;
  opacity: @dimmerHiddenOpacity;
  line-height: @dimmerLineHeight;

  animation-fill-mode: both;
  animation-duration: @dimmerDuration;
  transition: @transition;

  flex-direction: column;
  align-items: center;
  justify-content: center;

  user-select: none;
  will-change: opacity;
  z-index: @dimmerZIndex;
}

/* Dimmer Content */
.ui.dimmer > .content {
  user-select: text;
  color: @dimmerTextColor;
}


/* Loose Coupling */
.ui.segment > .ui.dimmer {
  border-radius: inherit !important;
}

/* Scrollbars */
.addScrollbars() when (@useCustomScrollbars) {
  .ui.dimmer:not(.inverted)::-webkit-scrollbar-track {
    background: @trackInvertedBackground;
  }
  .ui.dimmer:not(.inverted)::-webkit-scrollbar-thumb {
    background: @thumbInvertedBackground;
  }
  .ui.dimmer:not(.inverted)::-webkit-scrollbar-thumb:window-inactive {
    background: @thumbInvertedInactiveBackground;
  }
  .ui.dimmer:not(.inverted)::-webkit-scrollbar-thumb:hover {
    background: @thumbInvertedHoverBackground;
  }
}
.addScrollbars();

/*******************************
            States
*******************************/

/* Animating */
.animating.dimmable:not(body),
.dimmed.dimmable:not(body) {
  overflow: @dimmerOverflow;
}

/* Animating / Active / Visible */
.dimmed.dimmable > .ui.animating.dimmer,
.dimmed.dimmable > .ui.visible.dimmer,
.ui.active.dimmer {
  display: flex;
  opacity: @dimmerVisibleOpacity;
}

/* Disabled */
.ui.disabled.dimmer {
  width: 0 !important;
  height: 0 !important;
}


/*******************************
           Variations
*******************************/

/*--------------
    Alignment
---------------*/

.ui[class*="top aligned"].dimmer {
  justify-content: flex-start;
}
.ui[class*="bottom aligned"].dimmer {
  justify-content: flex-end;
}

/*--------------
      Page
---------------*/

.ui.page.dimmer {
  position: @dimmerPageDimmerPosition;
  transform-style: @dimmerTransformStyle;
  perspective: @dimmerPerspective;
  transform-origin: center center;
}

body.animating.in.dimmable,
body.dimmed.dimmable {
  overflow: hidden;
}

body.dimmable > .dimmer {
  position: fixed;
}

/*--------------
    Blurring
---------------*/

.blurring.dimmable > :not(.dimmer) {
  filter: @dimmerBlurredStartFilter;
  transition: @dimmerBlurredTransition;
}
.blurring.dimmed.dimmable > :not(.dimmer) {
  filter: @dimmerBlurredEndFilter;
}

/* Dimmer Color */
.blurring.dimmable > .dimmer {
  background-color: @dimmerBlurredBackgroundColor;
}
.blurring.dimmable > .inverted.dimmer {
  background-color: @dimmerBlurredInvertedBackgroundColor;
}

/*--------------
    Aligned
---------------*/

.ui.dimmer > .top.aligned.content > * {
  vertical-align: top;
}
.ui.dimmer > .bottom.aligned.content > * {
  vertical-align: bottom;
}

/*--------------
    Inverted
---------------*/

.ui.inverted.dimmer {
  background-color: @dimmerInvertedBackgroundColor;
}
.ui.inverted.dimmer > .content > * {
  color: @dimmerInvertedTextColor;
}

/*--------------
     Simple
---------------*/

/* Displays without javascript */
.ui.simple.dimmer {
  display: block;
  overflow: hidden;
  opacity: 1;
  width: 0%;
  height: 0%;
  z-index: -100;
  background-color: @dimmerSimpleStartBackgroundColor;
}
.dimmed.dimmable > .ui.simple.dimmer {
  overflow: visible;
  opacity: 1;
  width: 100%;
  height: 100%;
  background-color: @dimmerSimpleEndBackgroundColor;
  z-index: @dimmerSimpleZIndex;
}

.ui.simple.inverted.dimmer {
  background-color: @dimmerSimpleInvertedStartBackgroundColor;
}
.dimmed.dimmable > .ui.simple.inverted.dimmer {
  background-color: @dimmerSimpleInvertedEndBackgroundColor;
}

