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


/*******************************
            Theme
*******************************/

@type    : 'module';
@element : 'popup';

@import (multiple) '../../theme.config';


/*******************************
            Popup
*******************************/

.ui.popup {
  display: none;
  position: absolute;
  top: 0px;
  right: 0px;

  /* Fixes content being squished when inline (moz only) */
  min-width: min-content;
  z-index: @zIndex;

  border: @border;
  line-height: @lineHeight;
  max-width: @maxWidth;
  background-color: @background;

  padding: @verticalPadding @horizontalPadding;
  font-weight: @fontWeight;
  font-style: @fontStyle;
  color: @color;

  border-radius: @borderRadius;
  box-shadow: @boxShadow;
}
.ui.popup > .header {
  padding: 0em;

  font-family: @headerFont;
  font-size: @headerFontSize;
  line-height: @headerLineHeight;
  font-weight: bold;
}
.ui.popup > .header + .content {
  padding-top: @headerDistance;
}

.ui.popup:before {
  position: absolute;
  content: '';
  width: @arrowSize;
  height: @arrowSize;

  background: @arrowBackground;
  transform: rotate(45deg);

  z-index: @arrowZIndex;
  box-shadow: @arrowBoxShadow;
}

/*******************************
            Types
*******************************/

/*--------------
     Spacing
---------------*/

.ui.popup {
  margin: 0em;
}

/* Extending from Top */
.ui.top.popup {
  margin: 0em 0em @popupDistanceAway;
}
.ui.top.left.popup {
  transform-origin: left bottom;
}
.ui.top.center.popup {
  transform-origin: center bottom;
}
.ui.top.right.popup {
  transform-origin: right bottom;
}

/* Extending from Vertical Center */
.ui.left.center.popup {
  margin: 0em @popupDistanceAway 0em 0em;
  transform-origin: right 50%;
}
.ui.right.center.popup {
  margin: 0em 0em 0em @popupDistanceAway;
  transform-origin: left 50%;
}

/* Extending from Bottom */
.ui.bottom.popup {
  margin: @popupDistanceAway 0em 0em;
}
.ui.bottom.left.popup {
  transform-origin: left top;
}
.ui.bottom.center.popup {
  transform-origin: center top;
}
.ui.bottom.right.popup {
  transform-origin: right top;
}

/*--------------
     Pointer
---------------*/

/*--- Below ---*/
.ui.bottom.center.popup:before {
  margin-left: @arrowOffset;
  top: @arrowOffset;
  left: 50%;
  right: auto;
  bottom: auto;
  box-shadow: @bottomArrowBoxShadow;
}

.ui.bottom.left.popup {
  margin-left: @boxArrowOffset;
}
.ui.bottom.left.popup:before {
  top: @arrowOffset;
  left: @arrowDistanceFromEdge;
  right: auto;
  bottom: auto;
  margin-left: 0em;
  box-shadow: @bottomArrowBoxShadow;
}

.ui.bottom.right.popup {
  margin-right: @boxArrowOffset;
}
.ui.bottom.right.popup:before {
  top: @arrowOffset;
  right: @arrowDistanceFromEdge;
  bottom: auto;
  left: auto;
  margin-left: 0em;
  box-shadow: @bottomArrowBoxShadow;
}

/*--- Above ---*/
.ui.top.center.popup:before {
  top: auto;
  right: auto;
  bottom: @arrowOffset;
  left: 50%;
  margin-left: @arrowOffset;
}
.ui.top.left.popup {
  margin-left: @boxArrowOffset;
}
.ui.top.left.popup:before {
  bottom: @arrowOffset;
  left: @arrowDistanceFromEdge;
  top: auto;
  right: auto;
  margin-left: 0em;
}
.ui.top.right.popup {
  margin-right: @boxArrowOffset;
}
.ui.top.right.popup:before {
  bottom: @arrowOffset;
  right: @arrowDistanceFromEdge;
  top: auto;
  left: auto;
  margin-left: 0em;
}

/*--- Left Center ---*/
.ui.left.center.popup:before {
  top: 50%;
  right: @arrowOffset;
  bottom: auto;
  left: auto;
  margin-top: @arrowOffset;
  box-shadow: @leftArrowBoxShadow;
}

/*--- Right Center  ---*/
.ui.right.center.popup:before {
  top: 50%;
  left: @arrowOffset;
  bottom: auto;
  right: auto;
  margin-top: @arrowOffset;
  box-shadow: @rightArrowBoxShadow;
}

/*******************************
            Coupling
*******************************/

/* Immediate Nested Grid */
.ui.popup > .ui.grid:not(.padded) {
  width: @nestedGridWidth;
  margin: @nestedGridMargin;
}

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

.ui.loading.popup {
  display: block;
  visibility: hidden;
  z-index: @loadingZIndex;
}

.ui.animating.popup,
.ui.visible.popup {
  display: block;
}

.ui.visible.popup {
  transform: translateZ(0px);
  backface-visibility: hidden;
}


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

/*--------------
     Basic
---------------*/

.ui.basic.popup:before {
  display: none;
}


/*--------------
     Wide
---------------*/

.ui.wide.popup {
  max-width: @wideWidth;
}
.ui[class*="very wide"].popup {
  max-width: @veryWideWidth;
}

@media only screen and (max-width: @largestMobileScreen) {
  .ui.wide.popup,
  .ui[class*="very wide"].popup {
    max-width: @maxWidth;
  }
}


/*--------------
     Fluid
---------------*/

.ui.fluid.popup {
  width: 100%;
  max-width: none;
}


/*--------------
     Colors
---------------*/

/* Inverted colors  */
.ui.inverted.popup {
  background: @invertedBackground;
  color: @invertedColor;
  border: @invertedBorder;
  box-shadow: @invertedBoxShadow;
}
.ui.inverted.popup .header {
  background-color: @invertedHeaderBackground;
  color: @invertedHeaderColor;
}
.ui.inverted.popup:before {
  background-color: @invertedArrowColor;
  box-shadow: none !important;
}

/*--------------
     Flowing
---------------*/

.ui.flowing.popup {
  max-width: none;
}


/*--------------
     Sizes
---------------*/

.ui.mini.popup {
  font-size: @mini;
}
.ui.tiny.popup {
  font-size: @tiny;
}
.ui.small.popup {
  font-size: @small;
}
.ui.popup {
  font-size: @medium;
}
.ui.large.popup {
  font-size: @large;
}
.ui.huge.popup {
  font-size: @huge;
}


.loadUIOverrides();