/*
 * 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.
 */

/* Workflow Component Selection Styles */
.workflow-component {
  transition: box-shadow 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.workflow-component.selected {
  box-shadow: 0 0 0 2px #3B82F6 !important;
  border-color: #3B82F6 !important;
  z-index: 100;
}

.workflow-component.dragging {
  opacity: 0.8;
  cursor: move !important;
}

/* Inline editing styles */
.component-title.editing,
.component-description.editing {
  background: white !important;
  box-shadow: 0 0 0 2px #3B82F6;
  user-select: text !important;
  -webkit-user-select: text !important;
  cursor: text !important;
}

.component-title:hover:not(.editing),
.component-description:hover:not(.editing) {
  background: rgba(59, 130, 246, 0.05);
  border-radius: 2px;
  cursor: text;
}

/* Visual hint for editable fields */
.workflow-component.selected .component-title:not(.editing),
.workflow-component.selected .component-description:not(.editing) {
  position: relative;
}

.workflow-component.selected .component-title:not(.editing)::after,
.workflow-component.selected .component-description:not(.editing)::after {
  content: "Double-click to edit";
  position: absolute;
  top: -20px;
  left: 0;
  font-size: 10px;
  color: #6b7280;
  background: white;
  padding: 2px 4px;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  z-index: 1000;
}

.workflow-component.selected .component-title:hover:not(.editing)::after,
.workflow-component.selected .component-description:hover:not(.editing)::after {
  opacity: 1;
}

/* Multi-selection styles */
.workflow-component.selected .resize-handle {
  background-color: #3B82F6;
  border-color: #2563EB;
}

/* Lasso selection box */
.lasso-selection {
  position: absolute;
  border: 1px solid #3B82F6;
  background-color: rgba(59, 130, 246, 0.1);
  pointer-events: none;
  z-index: 1000;
}

/* Canvas Notes Styles */
.canvas-note {
  position: absolute;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  min-width: 180px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  transition: box-shadow 0.2s, border-color 0.2s;
  cursor: move;
  user-select: none;
}

.canvas-note:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.canvas-note.selected {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.canvas-note.dragging {
  cursor: grabbing !important;
  opacity: 0.9;
  z-index: 1000;
}

.note-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  border-radius: 6px 6px 0 0;
}

.note-delete-btn {
  width: 20px;
  height: 20px;
  padding: 2px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #6b7280;
  opacity: 0.6;
  transition: opacity 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.note-delete-btn:hover {
  opacity: 1;
  color: #dc2626;
}

.note-content {
  flex: 1;
  padding: 8px;
  overflow: hidden;
}

.note-textarea {
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  resize: none;
  outline: none;
  font-size: 13px;
  line-height: 1.5;
  color: #374151;
  font-family: inherit;
}

.note-textarea::placeholder {
  color: #9ca3af;
  opacity: 0.7;
}

.note-resize-handle {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 16px;
  height: 16px;
  cursor: se-resize;
  background: linear-gradient(135deg, transparent 50%, #d1d5db 50%);
  border-radius: 0 0 6px 0;
}


/* Notes indicator styles (legacy - for component-attached notes) */
.note-indicator {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: white;
  border-radius: 4px;
  padding: 2px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  z-index: 20;
  transition: transform 0.2s ease;
}

.note-indicator:hover {
  transform: scale(1.1);
}

.note-indicator.has-notes {
  display: block !important;
}
