@import "./globals/streams";

@mixin globals {
  // variables:
  //--wc-z-index: auto;
  //z-index: calc(var(--wc-z-index) - 10);





  * {
    -moz-box-sizing: border-box;
    box-sizing: border-box;
  }

  /* commons: */
  .wcInvisible {
    display: none !important;
  }

  .wcHidden {
    visibility: hidden;
  }

  .wcLeft {
    float: left;
  }

  input {
    width: auto;
    display: inline;
  }
  label {
    width: auto;
    display: inline;
  }

  a.wcFunctional, a.wcFunctional:focus {
    outline: none;
    text-decoration: none !important;
    padding: 0;
    border: none;
    line-height: 12px;
    font-weight: normal;
  }

  button.wcFunctional, button.wcFunctional:hover, button.wcFunctional:active, button.wcFunctional:focus {
    outline: none;
    padding: initial;
    border: none;
    line-height: 12px;
    font-weight: normal;
    border-radius: 0;
    width: auto;
    background: none;
  }

  img.wcFunctional {
    padding: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    display: inline;
    height: auto;
  }

  .wcButton {
    display: inline-block;
  }

  .wcCenter {
    display: flex;
    height: 100%;
    align-items: center;
    justify-content: center;
  }

  progress.wcMainProgressBar {
    width: 100%;
    font-size: 1em;
  }

  a.wcDebugLink {
    color: #f00;
  }

  img.wcChannelAvatar {
    max-width: 25px;
    margin: 0 4px 2px 0;
    border-radius: 50%;
    box-shadow: none;
    border: none;
    display: inline-block;
    vertical-align: middle;
    flex-grow: 0;
  }

  a.wcChannelClose {
    width: 17px;
    height: 17px;
    background: transparent url(../../gfx/icons/x.svg) no-repeat 50%;
    background-size: 100%;
    display: inline-block;
    vertical-align: middle;
    border: 1px solid #A6A6A6;
    border-radius: 50%;
    margin-left: 8px;
    text-decoration: none;
    transition: all .2s ease-in;

    &:hover {
      background-color: #f7f7f7;
    }
  }

  span.wcUnreadMessagesCount {
    background-color: rgba(212, 19, 13, 1);
    color: #fff;
    border-radius: 3px;
    padding: 1px 3px;
    margin-left: 5px;
  }

  /* Progress bar cross-browser styling */
  progress, progress[role] {
    height: 5px;
    margin-top: 10px;
    line-height: 5px;
    display: block;
    appearance: none;
    -moz-appearance: none;
    -webkit-appearance: none;
    border: none;
    background-size: auto;
  }

  progress[role]:after {
    background-image: none;
  }

  progress[role] strong {
    display: none;
  }

  /* Progress bar - background */
  progress, progress[role][aria-valuenow] {
    background: #ccc !important;
  }

  progress::-webkit-progress-bar {
    background: #ccc;
    border-radius: 5px !important;
  }

  /* Progress bar - foreground */
  progress {
    color: #5789FF;
    border-radius: 5px !important;
  }

  progress::-moz-progress-bar {
    background: #5789FF;
    border-radius: 5px !important;
  }

  progress::-webkit-progress-value {
    background: #5789FF;
    border-radius: 5px !important;
  }

  progress[aria-valuenow]:before {
    background: #5789FF;
    border-radius: 5px !important;
  }

  .wcErrorBox {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 1px solid #dfdfdf;

    &:before {
      content: '';
      margin-right: 5px;
      width: 23px;
      height: 20px;
      background: url("../../gfx/icons/warnings.svg") 0px 0 no-repeat;
    }
  }

  .wcCounter {
    font-size: 80%;
  }

  .wcRedCounter {
    color: #ffffff !important;
    background-color: #ff0000;
    font-size: .6em;
    display: inline-block;
    border-radius: 50%;
    text-align: center;
    margin-left: 5px;
    width: 22px;
    height: 22px;
  }

  .wcStatus {
    display: inline-block;
    height: 10px;
    width: 10px;
    border-radius: 50%;

    &.wcOnline {
      background: rgb(9, 193, 121);
    }
    &.wcOffline {
      background: rgba(244, 31, 31, 0.5);
    }
  }

  .ScrollbarsCustom-Scroller {
    overscroll-behavior: contain;
  }

  //loader:
  .wcLoaderContainer {
    display: flex;
    flex-direction: row;
    align-items: center;

    &.wcLoaderContainerCenter {
      justify-content: center;
    }

    .wcLoader {
      display: inline-block;
      position: relative;
      width: 32px;
      height: 32px;
    }

    .wcLoader div {
      box-sizing: border-box;
      display: block;
      position: absolute;
      width: 26px;
      height: 26px;
      margin: 4px;
      border: 4px solid #A6A6A6;
      border-radius: 50%;
      animation: wcLoader 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
      border-color: #A6A6A6 transparent transparent transparent;
    }

    .wcLoader div:nth-child(1) {
      animation-delay: -0.45s;
    }

    .wcLoader div:nth-child(2) {
      animation-delay: -0.3s;
    }

    .wcLoader div:nth-child(3) {
      animation-delay: -0.15s;
    }

    @keyframes wcLoader {
      0% {
        transform: rotate(0deg);
      }
      100% {
        transform: rotate(360deg);
      }
    }

    .wcLoaderText {
      font-size: .8em;
      line-height: .8em;
      margin-left: 2px;
    }

  }

  @include global-streams;
}