/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

 @keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes fade-out {
  to {
    opacity: 0;
  }
}

@keyframes slide-from-right {
  from {
    transform: translateX(60px);
  }
}

@keyframes slide-up {
  from {
    transform: translateY(130px);
  }
}

@keyframes slide-to-left {
  to {
    transform: translateX(-30px);
  }
}

.slide-in {
  animation: 210ms cubic-bezier(0, 0, 0.2, 1) 90ms both fade-in,
    300ms cubic-bezier(0.4, 0, 0.2, 1) both slide-from-right;
}

/* Used for animating and displaying the + when hovering over a separator */
.hover-padding {
  padding: 0;
  opacity: 0;
  font-size: 0;
  transition: padding 0.2s ease 0.25s, opacity 0.2s ease 0.25s, font-size 0.2s ease 0.25s;

  & > a > i {
    font-size: 1rem;
    transition: font-size 0.2s ease 0.25s;
  }

  &:hover {
    padding: 1.5rem !important;
    opacity: 1;

    & > a > i {
      font-size: 2rem !important;
    }
  }
}

/* Text Colors */
.text-danger {
  color: #dc3545 !important;
}

/* Drag and Drop Styles */
.draggable {
  cursor: grab;
  transition: all 0.2s ease;
}

.draggable:active {
  cursor: grabbing;
}

.dragging {
  opacity: 0.5;
  transform: rotate(5deg);
  border: 3px solid #fbbf24 !important; /* Yellow border */
  box-shadow: 0 4px 8px rgba(251, 191, 36, 0.3);
  transition: all 0.2s ease;
  cursor: grabbing !important;
}


.droppable.drag-over {
  background-color: rgba(251, 191, 36, 0.1);
  border: 2px dashed #fbbf24;
  transition: all 0.2s ease;
}

/* Production Line Collapse Styles */
.production-line-header {
  transition: all 0.2s ease;
  user-select: none;
}

.production-line-header:hover {
  background-color: rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

.production-line-header:active {
  transform: translateY(0);
}

.production-line-content {
  transition: all 0.3s ease;
  min-height: 80px; /* Ensure minimum height for drop zone */
}

.production-line-content.collapsed {
  height: 100px !important;
  overflow: hidden;
  position: relative;
  min-height: 100px;
  padding-top: 25px;
  margin-top: 15px;
}

.production-line-content.collapsed::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 2px dashed #dee2e6;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
  font-size: 14px;
  font-weight: 500;
  z-index: 1;
  pointer-events: none;
}

.production-line-content.collapsed::before {
  content: attr(data-drop-text);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #6c757d;
  font-size: 16px;
  font-weight: 600;
  z-index: 2;
  pointer-events: none;
}

/* Ensure the drop zone is always accessible */
.production-line-content.collapsed.droppable {
  pointer-events: auto;
}

.production-line-content.collapsed.droppable::after,
.production-line-content.collapsed.droppable::before {
  pointer-events: none;
}

/* Collapsed drop zone highlighting */
.collapsed-drop-zone {
  background-color: rgba(251, 191, 36, 0.05) !important;
  border: 2px dashed #fbbf24 !important;
  transition: all 0.2s ease;
}

/* Hide the pseudo-elements when dragging over collapsed zones */
.collapsed-drop-zone::after,
.collapsed-drop-zone::before {
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* Show the dragged element preview in collapsed zones */
.collapsed-drop-zone .dragging {
  opacity: 0.8 !important;
  transform: rotate(3deg) scale(0.95) !important;
  border: 3px solid #fbbf24 !important;
  box-shadow: 0 6px 12px rgba(251, 191, 36, 0.4) !important;
  position: relative !important;
  z-index: 10 !important;
  margin: 10px auto !important;
  display: block !important;
  width: fit-content !important;
}

.production-line-content.expanded {
  height: auto;
  overflow: visible;
}

.production-line-icon {
  transition: all 0.3s ease;
  font-size: 0.875rem;
}