/*
   React Grid Layout Styles
   -----------------------------------------------------------------------------
   This is a mishmash of styles the package ships with and some custom ones
*/

.react-grid-layout {
  position: relative;
  transition: height 200ms ease;
}
.react-grid-item {
  z-index: $z--cell-default;
  transition: all 200ms ease;
  transition-property: left, top;
}
.react-grid-item.cssTransforms {
  transition-property: transform;
}
.react-grid-item.resizing {
  z-index: $z--cell-resizing;
  will-change: width, height;
}

.react-grid-item.react-draggable-dragging {
  transition: none;
  z-index: $z--cell-dragging;
  will-change: top, left;
}

.react-grid-item.react-grid-placeholder {
  @include gradient-diag-down($c-pool, $c-comet);
  border: 0 !important;
  opacity: 0.3;
  border-radius: $ix-radius !important;
  transition-duration: 100ms;
  z-index: $z--cell-default;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -o-user-select: none;
  user-select: none;
}

.react-resizable-handle {
  position: absolute;
  background-image: none;
  cursor: nwse-resize;
  border: 15px solid transparent;
  border-right-color: $g6-smoke;
  border-bottom-color: $g6-smoke;
  border-bottom-right-radius: $ix-radius;
  z-index: $z--cell-resizer;
  transition: border-color 0.25s ease, opacity 0.25s ease;
  width: 30px;
  height: 30px;
  bottom: 0;
  right: 0;
  opacity: 0;

  &:before,
  &:after {
    content: '';
    display: block;
    position: absolute;
    height: 2px;
    border-radius: 1px;
    background-color: $g0-obsidian;
    transition: background-color 0.25s ease;
    transform: translate(-50%, -50%) rotate(-45deg);
    border: 0;
  }

  &:before {
    width: 12px;
    top: 7px;
    left: 7px;
  }

  &:after {
    width: 20px;
    top: 4px;
    left: 4px;
  }

  &:hover {
    border-right-color: $c-comet;
    border-bottom-color: $c-comet;
  }
}

.cell:hover .react-resizable-handle {
  opacity: 1;
}

.react-grid-item.resizing .react-resizable-handle,
.react-grid-item.react-draggable-dragging .react-resizable-handle {
  opacity: 1;
  border-right-color: $c-comet;
  border-bottom-color: $c-comet;
}
