/** Groups */

.allocate-layout.has-groups .groups-empty {
  display: none;
}

.allocate-layout .allocate-groups-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.allocate-layout .allocate-groups-list .group {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 4px;
  background-color: #f8f8f8;
  padding: 0 10px;
  transition: all var(--common-animation-time);
}

/* Dragging... */

.allocate-layout .allocate-groups-list .group.dragging {
  background: var(--allocate-groups-bg-color1);
  background: repeating-linear-gradient(
    45deg,
    var(--allocate-groups-bg-color2),
    var(--allocate-groups-bg-color2) 10px,
    var(--allocate-groups-bg-color1) 10px,
    var(--allocate-groups-bg-color1) 20px
  );
  /* // Animated background
  animation: allocate-groups-background-animation var(--allocate-groups-animation-time) infinite;
  animation-timing-function: ease-in-out;
  */
}
.allocate-layout .allocate-groups-list .group.dragging > * {
  pointer-events: none;
  /* opacity: 0.5; */
}

.allocate-layout .allocate-groups-list .group-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--allocate-groups-expand-button-gap);
  margin: 5px 0;
}

.allocate-layout .allocate-groups-list .group-header .expand-button-wrapper {
  margin-top: 1px;
  font-size: 0.75em;
  padding-bottom: 2px;
}
.allocate-layout .allocate-groups-list .group-header .title-editor,
.allocate-layout .allocate-groups-list .group-header .title {
  flex: 1;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Duplicated name error */
.allocate-layout .allocate-groups-list .group.duplicated-name {
  background-color: rgba(187 0 0 / 10%);
}
.allocate-layout .allocate-groups-list .group.duplicated-name .title #group-name {
  color: var(--common-error-color);
  font-weight: bold;
}
.allocate-layout .allocate-groups-list .group-header.edit-group > .title-actions,
.allocate-layout .allocate-groups-list .group-header:not(.edit-group) .title-editor,
.allocate-layout .allocate-groups-list .group-header.edit-group .title {
  display: none;
}
.allocate-layout .allocate-groups-list .group-header.edit-group > .expand-button-wrapper {
  opacity: 0;
  pointer-events: none;
}
.allocate-layout .allocate-groups-list .group-header .title-editor {
  display: flex;
  align-items: center;
  gap: 2px;
}
.allocate-layout .allocate-groups-list .group-header input#title-editor-input {
  flex: 1;
  margin: 0;
  width: 100%;
  border-radius: 0;
  border: 0;
  background: none;
  padding: 0;
  height: auto;
}
.allocate-layout .allocate-groups-list .group-header .title #group-items-count-wrapper {
  opacity: 0.5;
}
.allocate-layout .allocate-groups-list .group-header .expand-button,
.allocate-layout .allocate-groups-list .group-header .expand-button-wrapper {
  width: var(--allocate-groups-expand-button-size);
  height: var(--allocate-groups-expand-button-size);
  display: flex;
  justify-content: center;
  align-items: center;
}
.allocate-layout .allocate-groups-list .group-header .expand-button,
.allocate-layout .allocate-groups-list .group-header .expand-button-wrapper {
  transition: all var(--common-animation-time);
  border-radius: 50%;
}
.allocate-layout .allocate-groups-list .group.empty .group-header .expand-button {
  color: #ccc;
  cursor: default;
  opacity: 0.25;
  pointer-events: none;
}
.allocate-layout .allocate-groups-list .group:not(.empty) .group-header .expand-button {
  cursor: pointer;
  color: #bbb;
  opacity: 0.75;
}
.allocate-layout .allocate-groups-list .group:not(.empty) .group-header {
  cursor: pointer;
  transition: all var(--common-animation-time);
}
.allocate-layout .allocate-groups-list .group:not(.empty) .group-header:hover .expand-button {
  background-color: var(--layout-theme-primary-color);
  color: rgba(255 255 255 / 75%);
  opacity: 0.75;
}
.allocate-layout .allocate-groups-list .group.expanded:not(.empty) .group-header .expand-button {
  transform: rotate(90deg);
}
.allocate-layout .allocate-groups-list .group.empty .group-content,
.allocate-layout .allocate-groups-list .group:not(.expanded) .group-content {
  display: none;
}
.allocate-layout .allocate-groups-list .group-content {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-bottom: 10px;
}

/* Group items */
.allocate-layout .allocate-groups-list .group-item {
  overflow: hidden;
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 10px;
  padding: 2px 10px;
  background-color: rgba(0 0 0 / 3%);
  border-radius: 3px;
  transition: all var(--common-animation-time);
}
.allocate-layout .allocate-groups-list .group-item:hover {
  background-color: var(--allocate-groups-bg-color2);
}
.allocate-layout .allocate-groups-list .group-item .title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.allocate-layout .allocate-groups-list .group-item .title #item-type {
  opacity: 0.5;
}
