﻿.popover {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1060;
    display: block;
    max-width: 400px;
    font-size: $popover-font-size;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0,0,0,.2);
    border-radius: 0.3rem;
    .arrow
    {
        position: absolute;
        display: block;
        width: 1rem;
        height: 0.5rem;
        margin: 0 0.3rem;
        &::before, &::after
        {
            position: absolute;
            display: block;
            content: "";
            border-color: transparent;
            border-style: solid;
        }
    }
}
/*.bs-popover-top {
    margin-bottom: .5rem;
    .arrow
    {
        bottom: calc((#{.5rem} + #{1px}) * -1);
    }
    .arrow::before,.arrow::after {
        border-width: .5rem (1rem / 2) 0;
    }
    .arrow::before {
        bottom: 0;
        border-top-color: rgba(0,0,0,.25);
    }
    .arrow::after {
        bottom: 1px;
        border-top-color: #fff;
    }
}*/

.bs-popover-right {
    margin-left: 0.5rem;
    .arrow
    {
        left: calc((#{.5rem} + #{1px}) * -1);
        width: .5rem;
        height: 1rem;
        margin: .3rem 0;
    }
    .arrow::before,.arrow::after {
        border-width: (1rem / 2) .5rem (1rem / 2) 0;
    }
    .arrow::before {
        left: 0;
        border-right-color: rgba(0,0,0,.25);
    }
    .arrow::after {
        left: 1px;
        border-right-color: #fff;
    }
}
/*.bs-popover-bottom {
    margin-top: 0.5rem;
    .arrow
    {
        top: calc((#{.5rem} + #{1px}) * -1);
    }
    .arrow::before,.arrow::after {
        border-width: 0 (1rem / 2) .5rem (1rem / 2);
    }
    .arrow::before {
        top: 0;
        border-bottom-color: rgba(0,0,0,.25);
    }
    .arrow::after {
        top: 1px;
        border-bottom-color: #fff;
    }
    .popover-header::before {
        position: absolute;
        top: 0;
        left: 50%;
        display: block;
        width: 1rem;
        margin-left: (1rem / -2);
        content: "";
        border-bottom: 1px solid $popover-header-bg;
    }
}*/
/*.bs-popover-left {
    margin-right: 0.5rem;
    .arrow {
        right: calc((#{.5rem} + #{1px}) * -1);
        width: .5rem;
        height: 1rem;
        margin: .3rem 0;
    }
    .arrow::before,
    .arrow::after {
        border-width: (1rem / 2) 0 (1rem / 2) .5rem;
    }
    .arrow::before {
        right: 0;
        border-left-color: rgba(0,0,0,.25);
    }
    .arrow::after {
        right: 1px;
        border-left-color: #fff;
    }
}
.bs-popover-auto {
    &[x-placement^="top"]
    {
        @extend .bs-popover-top;
    }
    &[x-placement^="right"] {
        @extend .bs-popover-right;
    }
    &[x-placement^="bottom"] {
        @extend .bs-popover-bottom;
    }
    &[x-placement^="left"] {
        @extend .bs-popover-left;
    }
}*/
.popover-header, h3.popover-title {
    padding: 0.5rem 0.75rem;
    margin-bottom: 0;
    font-size: 1rem;
    color: inherit;
    background-color: #f7f7f7;
    border-bottom: 1px solid #ebebeb;
    border-top-left-radius: calc(0.3rem - 1px);
    border-top-right-radius: calc(0.3rem - 1px);
    &:empty {
        display: none;
    }
}
.popover-body, .popover-content {
    padding: 0.5rem 0.75rem;
    color: #212529;
}