@use "variables/colors";
@use "variables/sizes";

.menu-item-container {
  min-height: 50px;
  position: relative;
  display: block;
  padding: 8px;
  margin: auto;

  border: 1px solid colors.$border-color;
}

/* Actions area on the right (edit & remove) */
.menu-actions {
  margin-left: auto; /* Push actions to far right */
}

.drop-item:has(.remove-icon:hover) {
  color: rgb(255, 0, 0);
  background-color: rgba(255, 0, 0, 0.1);
}

/* Drag handle (left) */
.drag-handle {
  cursor: move;
  color: colors.$accent;
  display: flex;
  align-items: center;
  margin-right: 12px;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.drag-handle:hover {
  opacity: 1;
}

/* Allow <app-menu-item> to grow */
app-menu-item {
  flex-grow: 1;
  display: flex;
  align-items: center;
}

/* Submenu indentation: only indent the visible content, not the actions */
.submenu-list > .menu-item-container,
.submenu .menu-item-container {
  padding-left: 32px;
}

.limit-width {
  max-width: 400px;

  @media (max-width: 600px) {
    max-width: 100%;
  }
}


.cdk-drag-preview {
  box-sizing: border-box;
  border-radius: 4px;
  box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2),
  0 8px 10px 1px rgba(0, 0, 0, 0.14),
  0 3px 14px 2px rgba(0, 0, 0, 0.12);
}

.cdk-drag-placeholder {
  opacity: 0;
}

.cdk-drag-animating {
  transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
}

.drop-list.cdk-drop-list-dragging .drop-item:not(.cdk-drag-placeholder) {
  transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
}

.cdk-drop-list-receiving {
  background-color: rgba(0, 0, 0, 0.03);
  border: 2px dashed #ccc;
}
