/* vim: set ts=2 sw=2 sts=2 et: */

/**
 * List item group
 *
 * Copyright (c) 2011-present Qualiteam software Ltd. All rights reserved.
 * See https://www.x-cart.com/license-agreement.html for license details.
 */

.list-items-group {
  transition: min-height 0.25s ease-in-out;
  min-height: 0px;
}

.list-items-group__on-move {
  min-height: 50px;
}

/* List items and action buttons */

.list-item-action {
  padding: 3px 6px;
  background: #eee;
  font-size: 16px;
  color: #333;
}

.list-item-action:hover {
  color: #333;
  background: #dedede;
}

.list-item {
  position: relative;
  transition: height 0.4s ease, height 0.4s ease, opacity 0.3s ease;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  cursor: move; /* fallback: no `url()` support or images disabled */
  cursor: grab; /* W3C standards syntax, should come least */
}

.list-item:active {
  cursor: grabbing;
}

.list-item:hover .list-item-content {
  min-height: 50px;
}

.list-container.disabled .list-item {
  pointer-events: none;
  cursor: inherit;
}

.list-container.disabled .list-item:active {
  cursor: inherit;
}

.list-container.disabled .list-item-content > * {
  pointer-events: auto;
}

.list-item:not(.list-item__temporary) .list-item-action__unhide {
  display: none;
}

.list-item-actions {
  position: absolute;
  z-index: 10000;
  top: 10px;
  right: 10px;
}

.list-item-actions .tooltip-inner {
  white-space: nowrap;
}

.list-item:not(.list-item__temporary) .list-item-actions{
  display: none;
}

.list-container:not(.disabled) .list-item:hover .list-item-actions {
  display: block;
}

.list-item__hidden .list-item-content {
  overflow: hidden;
}

.list-item__hidden {
  overflow: hidden;
  opacity: 0;
  max-height: 0px;
}

.list-item__hiding {
          animation: list-item-hide 0.5s;
}

.list-item__showing {
  animation: list-item-hide 0.5s;
  animation-direction: reverse;
  animation-timing-function: ease;
}

.list-item__temporary .list-item-content {
  opacity: 0.3;
  outline: 1px solid rgba(0, 0, 0, 0.2);
}

.list-item__temporary .list-item-action__hide {
  display: none;
}

/* Drag-n-drop effects */

.list-container:not(.disabled) .list-item:not(.list-item__not-hoverable):hover:after,
.list-container:not(.disabled) .list-item:not(.list-item__not-hoverable):focus:after,
.sortable-chosen:after{
  content: '';
  display: block;
  position: absolute;
  z-index: 9999;
  top: -0px;
  bottom: -0px;
  left: -0px;
  right: -0px;
  border-radius: 3px;
  border: 1px solid rgba(60, 145, 206, 0.75);
}

.sortable-chosen.sortable-ghost {
  border: none;
  background: rgba(209, 228, 239, 0.15);
  outline: 1px dashed rgba(60, 145, 206, 0.5);
}

.sortable-chosen.sortable-ghost:after{
  border: none;
}

.sortable-ghost .list-item-content,
.sortable-ghost .list-item-actions {
  opacity: 0;
}

/* Hide/show animation */
@keyframes list-item-hide {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  30% {
    opacity: 0.3;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.9);
  }
}
