@charset "UTF-8";

@import "../../style/function";

//-----------------------------------------------------
// popconfirm
//-----------------------------------------------------

// 结构注释
//-----------------------------------------------------
// .im-popconfirm
//  .im-popconfirm-wrap

$colorShadow: rgba(153, 153, 153, .2);
$colorTransparent: rgba(0, 0, 0, 0);

.im-popconfirm {
  position: absolute;
  top: 0;
  left: 0;
  z-index: $zIndexPopup;
  font-size: 12px;
  line-height: 1.5;
  white-space: normal;
  cursor: auto;

  &-inline {
    position: relative;
  }

  &-wrap {
    border: 1px solid $colorBorder;
    border-radius: 6px;
    min-width: 177px;
    background: $colorBg;
    background-clip: padding-box;
    box-shadow: 0 1px 6px $colorShadow;
  }

  &-title {
    margin: 0;
    border-bottom: 1px solid $colorBorder;
    padding: 0 16px;
    line-height: 32px;
    font-weight: bold;
    color: $color6;
  }

  &-content {
    padding: 8px 16px;
    color: $color6;
  }

  &-ft {
    border-top: 1px solid $colorBorder;
    padding: 10px;
    text-align: right;
  }

  &-arrow,
  &-arrow:after {
    display: block;
    position: absolute;
    border-style: solid;
    border-color: $colorTransparent;
    width: 0;
    height: 0;
  }

  &-arrow {
    border-width: 5px;
  }

  &-arrow:after {
    border-width: 4px;
    content: "";
  }
}


.im-popconfirm-top,
.im-popconfirm-topright,
.im-popconfirm-topleft {
  padding-bottom: 4px;

  .im-popconfirm-arrow {
    bottom: 0;
    border-top-color: $colorBorder;
    border-bottom-width: 0;
  }

  .im-popconfirm-arrow:after {
    bottom: 1px;
    margin-left: -4px;
    border-top-color: $colorBg;
    border-bottom-width: 0;
  }
}

.im-popconfirm-top {
  .im-popconfirm-arrow {
    margin-left: -5px;
    left: 50%;
  }
}

.im-popconfirm-topright {
  .im-popconfirm-arrow {
    right: 16px;
  }
}

.im-popconfirm-topleft {
  .im-popconfirm-arrow {
    left: 16px;
  }
}

.im-popconfirm-right,
.im-popconfirm-righttop,
.im-popconfirm-rightbottom {
  padding-left: 4px;

  .im-popconfirm-arrow {
    left: 0;
    border-right-color: $colorBorder;
    border-left-width: 0;
  }

  .im-popconfirm-arrow:after {
    bottom: -4px;
    left: 1px;
    border-right-color: $colorBg;
    border-left-width: 0;
  }
}

.im-popconfirm-right {
  .im-popconfirm-arrow {
    margin-top: -5px;
    top: 50%;
  }
}

.im-popconfirm-righttop {
  .im-popconfirm-arrow {
    top: 12px;
  }
}

.im-popconfirm-rightbottom {
  .im-popconfirm-arrow {
    bottom: 12px;
  }
}

.im-popconfirm-bottom,
.im-popconfirm-bottomright,
.im-popconfirm-bottomleft {
  padding-top: 4px;

  .im-popconfirm-arrow {
    top: 0;
    border-top-width: 0;
    border-bottom-color: $colorBorder;
  }

  .im-popconfirm-arrow:after {
    top: 1px;
    margin-left: -4px;
    border-top-width: 0;
    border-bottom-color: $colorBg;
  }
}

.im-popconfirm-bottom {
  .im-popconfirm-arrow {
    margin-left: -5px;
    left: 50%;
  }
}

.im-popconfirm-bottomright {
  .im-popconfirm-arrow {
    right: 16px;
  }
}

.im-popconfirm-bottomleft {
  .im-popconfirm-arrow {
    left: 16px;
  }
}

.im-popconfirm-left,
.im-popconfirm-leftbottom,
.im-popconfirm-lefttop {
  padding-right: 4px;

  .im-popconfirm-arrow {
    right: 0;
    border-right-width: 0;
    border-left-color: $colorBorder;
  }

  .im-popconfirm-arrow:after {
    right: 1px;
    bottom: -4px;
    border-right-width: 0;
    border-left-color: $colorBg;
  }
}

.im-popconfirm-left {
  .im-popconfirm-arrow {
    margin-top: -5px;
    top: 50%;
  }
}

.im-popconfirm-leftbottom {
  .im-popconfirm-arrow {
    bottom: 12px;
  }
}

.im-popconfirm-lefttop {
  .im-popconfirm-arrow {
    top: 12px;
  }
}
