@import '../../themes/default/elements/divider.variables';

@if $use-divider {
  /*******************************
  //@-        Divider
  *******************************/
  
  .ui.divider {
    margin: $divider-margin;
  
    line-height: 1;
    height: 0;
  
    font-weight: $divider-font-weight;
    text-transform: $divider-text-transform;
    letter-spacing: $divider-letter-spacing;
    color: $divider-color;
  
    user-select: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  }
  
  /*--------------
        Basic
  ---------------*/
  
  .ui.divider:not(.vertical):not(.horizontal) {
    border-top: $divider-shadow-width solid $divider-shadow-color;
    border-bottom: $divider-highlight-width solid $divider-highlight-color;
  }
  
  /*--------------
      Coupling
  ---------------*/
  
  /* Allow divider between each column row */
  .ui.grid > .column + .divider,
  .ui.grid > .row > .column + .divider {
    left: auto;
  }
  
  /*--------------
     Horizontal
  ---------------*/
  
  .ui.horizontal.divider {
    display: table;
    white-space: nowrap;
  
    height: auto;
    margin: $divider-horizontal-margin;
    line-height: 1;
    text-align: center;
  }
  
  .ui.horizontal.divider:before,
  .ui.horizontal.divider:after {
    content: '';
    display: table-cell;
    position: relative;
    top: 50%;
    width: 50%;
    background-repeat: no-repeat;
  }
  
  .ui.horizontal.divider:before {
    background-position: right $divider-in-horizontal-position-margin top 50%;
  }
  .ui.horizontal.divider:after {
    background-position: left $divider-in-horizontal-position-margin top 50%;
  }
  
  /*--------------
      Vertical
  ---------------*/
  
  .ui.vertical.divider {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 50%;
  
    margin: 0;
    padding: 0;
    width: auto;
    height: 50%;
  
    line-height: 0;
    text-align: center;
    transform: translateX(-50%);
  }
  
  .ui.vertical.divider:before,
  .ui.vertical.divider:after {
    position: absolute;
    left: 50%;
    content: '';
    z-index: 3;
  
    border-left: $divider-shadow-width solid $divider-shadow-color;
    border-right: $divider-highlight-width solid $divider-highlight-color;
  
    width: 0;
    height: $divider-vertical-height;
  }
  
  .ui.vertical.divider:before {
    top: -100%;
  }
  .ui.vertical.divider:after {
    top: auto;
    bottom: 0;
  }
  
  /* Inside grid */
  @media only screen and (max-width : $largest-mobile-screen) {
  
    .ui.stackable.grid .ui.vertical.divider,
    .ui.grid .stackable.row .ui.vertical.divider {
      display: table;
      white-space: nowrap;
      height: auto;
      margin: $divider-horizontal-margin;
      overflow: hidden;
      line-height: 1;
      text-align: center;
      position: static;
      top: 0;
      left: 0;
      transform: none;
    }
  
    .ui.stackable.grid .ui.vertical.divider:before,
    .ui.grid .stackable.row .ui.vertical.divider:before,
    .ui.stackable.grid .ui.vertical.divider:after,
    .ui.grid .stackable.row .ui.vertical.divider:after {
      left: 0;
      border-left: none;
      border-right: none;
      content: '';
      display: table-cell;
      position: relative;
      top: 50%;
      width: 50%;
      background-repeat: no-repeat;
    }
  
    .ui.stackable.grid .ui.vertical.divider:before,
    .ui.grid .stackable.row .ui.vertical.divider:before {
      background-position: right $divider-in-horizontal-position-margin top 50%;
    }
    .ui.stackable.grid .ui.vertical.divider:after,
    .ui.grid .stackable.row .ui.vertical.divider:after {
      background-position: left $divider-in-horizontal-position-margin top 50%;
    }
  }
  
  /*--------------
        Icon
  ---------------*/
  
  .ui.divider > .icon {
    margin: $divider-icon-margin;
    font-size: $divider-icon-size;
    height: 1em;
    vertical-align: middle;
  }
  
  /*--------------
       Header
  ---------------*/
  .ui.horizontal.divider[class*="left aligned"] {
    &:before {
      display: none;
    }
    &:after {
      width: 100%;
    }
  }
  .ui.horizontal.divider[class*="right aligned"] {
    &:before {
      width: 100%;
    }
    &:after {
      display: none;
    }
  }
  
  /*******************************
            Variations
  *******************************/
  
  /*--------------
      Hidden
  ---------------*/
  
  .ui.hidden.divider {
    border-color: transparent !important;
  }
  .ui.hidden.divider:before,
  .ui.hidden.divider:after {
    display: none;
  }
  
  /*--------------
      Inverted
  ---------------*/
  
  .ui.divider.inverted,
  .ui.vertical.inverted.divider,
  .ui.horizontal.inverted.divider {
    color: $divider-inverted-text-color;
  }
  .ui.divider.inverted,
  .ui.divider.inverted:after,
  .ui.divider.inverted:before {
    border-top-color: $divider-inverted-shadow-color !important;
    border-left-color: $divider-inverted-shadow-color !important;
    border-bottom-color: $divider-inverted-highlight-color !important;
    border-right-color: $divider-inverted-highlight-color !important;
  }
  
  /*--------------
      Fitted
  ---------------*/
  
  .ui.fitted.divider {
    margin: 0;
  }
  
  /*--------------
      Clearing
  ---------------*/
  
  .ui.clearing.divider {
    clear: both;
  }
  
  /*--------------
      Section
  ---------------*/
  
  .ui.section.divider {
    margin-top: $divider-section-margin;
    margin-bottom: $divider-section-margin;
  }
  
  /*--------------
       Sizes
  ---------------*/
  
  .ui.divider {
    font-size: $divider-medium;
  }
}

@import '../../themes/default/elements/divider.style';