@import "./miniui.scss";

.tooltip,
.popovers {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    max-width: 250px;
    background-color:rgba(0,0,0,1);
    padding: 0.5em 1em;
    font-size: 12px;
    font-weight: normal;
    font-style: normal;
    color: #fff;
    line-height: 1.4em;
    border-radius: 4px;
    border-width: 1px;
    border-style:solid;
    border-color: rgba(0,0,0,1);
    -webkit-box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.1);
    box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.1);

    animation-iteration-count: 1;
    animation-fill-mode: both;
    transform-origin: 0 0;
    opacity: .5;
    transform: scale(0, 0);
  	transition: opacity 0.2s ease 0s, transform 0.2s ease 0s;

    &.visible {
      opacity: 1;
      transform: scale(1, 1);
      transition: opacity 0.2s ease 0s, transform 0.2s ease 0s;
    }

    &.transitioning {
      display: block;
    }

    .header {
        padding: 0em 0em 0.5em;
        font-size: 1.125em;
        line-height: 1.2;
        font-weight: bold;
    }

    &::before {
        position: absolute;
        content: "";
        width: 7px;
        height: 7px;
        overflow: hidden;
        display: block;
        background-image: none;
        background-color: rgba(0,0,0,1);
        -webkit-transform: rotate(45deg);
        -moz-transform: rotate(45deg);
        -ms-transform: rotate(45deg);
          transform: rotate(45deg);
        z-index: 2;
        border-style:solid;
        border-width: 1px;
        border-color: rgba(0,0,0,1);
    }

    .button {
        width: 100%;
    }

    /*--------------
         Position
    ---------------*/

    /*--- Left ---*/
    &.left {
      transform-origin: right center;

      &::before {
        top: 50%;
        right: -4px;
        bottom: auto;
        left: auto;
        margin-top: -3px;
        border-bottom-width: 0;
        border-left-width: 0;
      }
    }

    /*--- Bottom ---*/
    &.bottom {
      transform-origin: center top;

      &::before {
        margin-left: -3px;
        top: -4px;
        left: 50%;
        right: auto;
        bottom: auto;
        border-right-width: 0;
        border-bottom-width: 0;
      }
    }

    /*--- Top ---*/
    &.top {
      transform-origin: center bottom;

      &::before {
        top: auto;
        right: auto;
        bottom: -4px;
        left: 50%;
        margin-left: -3px;
        border-top-width: 0;
        border-left-width: 0;
      }
    }

    /*--- Right ---*/
    &.right {
      transform-origin: left center;

      &::before {
        top: 50%;
        left: -4px;
        bottom: auto;
        right: auto;
        margin-top: -3px;
        border-top-width: 0;
        border-right-width: 0;
      }
    }

    .pop-title {
      font-size: 1.25em;
      font-weight: normal;
      margin: 0 0 0.5em 0;
    }

    /*--------------
         Colors
    ---------------*/
    &.pop-dark {
      background-color:rgba(0,0,0,1);
      color: #fff;
      border-color: rgba(0,0,0,1);
    }
    &.pop-white::before {
      background-color:rgba(0,0,0,1);
      border-color: rgba(0,0,0,1);
    }

    &.pop-white {
      background-color: #fff;
      color: #666;
      border-color:rgba(39, 41, 43, 0.15);
    }
    &.pop-white::before {
      background-color: #fff;
      border-color: rgba(39, 41, 43, 0.15);
    }

    &.pop-yellow {
      background-color: #fff8db;
      color: #b58105;
      border-color:rgba(39, 41, 43, 0.15);
    }
    &.pop-yellow::before {
      background-color: #fff8db;
      border-color: rgba(39, 41, 43, 0.15);
    }

    &.pop-red {
      background-color: #ffe8e6;
      color: #d95c5c;
      border-color:rgba(39, 41, 43, 0.15);
    }
    &.pop-red::before {
      background-color: #ffe8e6;
      border-color: rgba(39, 41, 43, 0.15);
    }
}
