@import "./kdfn"

/*
**  KDContextMenu STYLES
*/
.kdcontextmenu
  display                 inline-block
  size                    auto auto
  abs                     -1000px 0 0 -1000px
  overflow                visible
  z-index                 10000
  cursor                  default

  .context-list-wrapper
    padding               0
    overflow              visible

  .kdlistview-contextmenu.default
    margin                0
    padding               0
    size                  auto,auto
    overflow              visible
    bg                    color,rgba(255,255,255,.95)
    shadow                0 7px 15px rgba(0,0,0,.17)
    rounded               2px

    .kdlistview-contextmenu.default
      margin-top          -29px
      rounded             0 2px 2px 0
      left                100%
      z-index             1
      abs()

      &.left-aligned
        rounded           2px 0 0 2px

        .kdlistitemview-contextitem.default
          &:first-of-type
            rounded       2px 0 0 0
          &:last-of-type
            rounded       0 0 0 2px

  .kdlistitemview-contextitem.default
    font-size         .8em
    background-color  transparent
    border-bottom     none
    padding           8px 10px
    clear             both
    color             #444
    cursor            pointer
    size              auto,auto
    white-space       nowrap

    &.selected
      color           white
      text-shadow     0 -1px 0 rgba(0,0,0,0.22)
      bg              color, selectedBgColor
      &:hover
        bg            color, selectedBgColor

    &:hover
      background      transparent

    &.disabled
      opacity         .5

    &.has-sub-items
      span.arrow
        abs()
        right               2px
        top                 10px
        size                8px,8px
        border              4px solid transparent
        border-left-color   #31575f
        borderBox()

      &.selected
        span.arrow
          border-left-color white

      &:first-child
        rounded             2px 2px 0 0
      &:last-child
        rounded             0 0 2px 2px
      &:hover
        bg                  color, selectedBgColor

    &:first-of-type
      rounded               2px 2px 0 0
    &:last-of-type
      rounded               0 0 2px 2px

    &.separator
      height            0
      margin            1px 0
      padding           0
      border-bottom     1px solid #ddd
      &:hover
        border-bottom   1px solid #ddd
        bg              color,transparent!important
        bg              image,none!important

  > span.arrow
    z-index             9002
    size                0 0
    border              5px solid transparent
    abs()
    &.top
      border-bottom-color white
      bottom              100%
      margin-left         0
    &.right
      border-left-color   white
      left                100%
      margin-top          0
    &.bottom
      border-top-color    white
      top                 100%
      margin-left         0
    &.left
      right               100%
      border-right-color  white
      margin-top          0
