@import "../styles/base/fn.wxss";

@light: #fff;
@dark: #333;

.@{wuxClassNamePrefix}-popover {
    font-family: Monospaced Number,Chinese Quote,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: rgba(0, 0, 0, .65);
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    list-style: none;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1030;
    cursor: auto;
    user-select: text;
    white-space: normal;
    font-weight: 400;
    text-align: left;

    &:after {
        content: "";
        position: absolute;
        background: hsla(0, 0%, 100%, .01);
    }

    &__container {
        position: absolute;
        top: 0px;
        left: 0px;
        width: 100%;
    }

    &__element {
        display: inline-block;
        line-height: 1;
    }

    &--theme-dark &__inner {
        background-color: @dark;
    }
    
    &--theme-dark&--placement-top &__arrow,
    &--theme-dark&--placement-topLeft &__arrow,
    &--theme-dark&--placement-topRight &__arrow {
        border-top-color: @dark;
    }

    &--theme-dark&--placement-right &__arrow,
    &--theme-dark&--placement-rightBottom &__arrow,
    &--theme-dark&--placement-rightTop &__arrow {
        border-right-color: @dark;
    }

    &--theme-dark&--placement-bottom &__arrow,
    &--theme-dark&--placement-bottomLeft &__arrow,
    &--theme-dark&--placement-bottomRight &__arrow {
        border-bottom-color: @dark;
    }

    &--theme-dark&--placement-left &__arrow,
    &--theme-dark&--placement-leftBottom &__arrow,
    &--theme-dark&--placement-leftTop &__arrow {
        border-left-color: @dark;
    }

    &--theme-dark &__inner,
    &--theme-dark &__title {
        color: #fff;
    }

    &--placement-top,
    &--placement-topLeft,
    &--placement-topRight {
        padding-bottom: 10px;
    }

    &--placement-right,
    &--placement-rightBottom,
    &--placement-rightTop {
        padding-left: 10px;
    }

    &--placement-bottom,
    &--placement-bottomLeft,
    &--placement-bottomRight {
        padding-top: 10px;
    }

    &--placement-left,
    &--placement-leftBottom,
    &--placement-leftTop {
        padding-right: 10px;
    }

    &__inner {
        background-color: @light;
        background-clip: padding-box;
        border-radius: 4px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
        color: rgba(0, 0, 0, .65);
    }
    
    &__title {
        position: relative;
        min-width: 120px;
        margin: 0;
        padding: 5px 16px 4px;
        min-height: 32px;
        box-sizing: border-box;
        color: rgba(0, 0, 0, .85);
        font-weight: 500;

        &:after {
            .setBottomLine(#D9D9D9);
        }
    }
    
    &__inner-content {
        padding: 12px 16px;
    }
    
    &__arrow {
        width: 0;
        height: 0;
        position: absolute;
        display: block;
        border-color: transparent;
        border-style: solid;
        border-width: 8.48528137px;
    }

    &--placement-top &__arrow,
    &--placement-topLeft &__arrow,
    &--placement-topRight &__arrow {
        bottom: 4px;
        border-bottom-width: 0;
        border-top-color: @light;
    }

    &--placement-top &__arrow {
        left: 50%;
        transform: translateX(-50%);
    }

    &--placement-topLeft &__arrow {
        left: 16px;
    }
    
    &--placement-topRight &__arrow {
        right: 16px;
    }
    
    &--placement-right &__arrow,
    &--placement-rightBottom &__arrow,
    &--placement-rightTop &__arrow {
        left: 4px;
        border-left-width: 0;
        border-right-color: @light;
    }

    &--placement-right &__arrow {
        top: 50%;
        transform: translateY(-50%);
    }
    
    &--placement-rightTop &__arrow {
        top: 12px;
    }
    
    &--placement-rightBottom &__arrow {
        bottom: 12px;
    }
    
    &--placement-bottom &__arrow,
    &--placement-bottomLeft &__arrow,
    &--placement-bottomRight &__arrow {
        top: 4px;
        border-top-width: 0;
        border-bottom-color: @light;
    }

    &--placement-bottom &__arrow {
        left: 50%;
        transform: translateX(-50%);
    }
    
    &--placement-bottomLeft &__arrow {
        left: 16px;
    }
    
    &--placement-bottomRight &__arrow {
        right: 16px;
    }
    
    &--placement-left &__arrow,
    &--placement-leftBottom &__arrow,
    &--placement-leftTop &__arrow {
        right: 4px;
        border-right-width: 0;
        border-left-color: @light;
    }

    &--placement-left &__arrow {
        top: 50%;
        transform: translateY(-50%);
    }
    
    &--placement-leftTop &__arrow {
        top: 12px;
    }
    
    &--placement-leftBottom &__arrow {
        bottom: 12px;
    }
}