/* Project tiles styling */
.project-tiles-container { 
  display: flex; 
  flex-direction: column; 
  gap: 8px; 
  margin: 0; 
  padding: 8px; 
  width: 100%;
  box-sizing: border-box;
}

.project-tile { 
  padding: 12px 16px; 
  border-radius: 8px; 
  cursor: pointer; 
  transition: all 0.2s ease; 
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); 
  position: relative;
  min-height: 44px;
  display: flex;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Private projects get dashed border */
.project-tile.private-project {
  border: 3px dashed rgba(255, 255, 255, 0.7);
  padding: 10px 14px; /* Compensate for thicker border */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.project-tile:hover { 
  transform: translateY(-1px); 
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); 
}

.project-tile.selected {
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5), 0 2px 6px rgba(0, 0, 0, 0.15);
  transform: translateX(12px);
  position: relative;
}

.project-tile.selected::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 40px;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.6), transparent);
  border-radius: 8px 0 0 8px;
  pointer-events: none;
}

.project-tile-name { 
  color: white; 
  font-weight: 600; 
  font-size: 14px; 
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  user-select: none;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Context menu styling */
.project-context-menu {
  position: fixed;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  min-width: 160px;
}

.context-menu-item {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.context-menu-item:hover {
  background: #f3f4f6;
}

.context-menu-item:first-child {
  border-radius: 6px 6px 0 0;
}

.context-menu-item:last-child {
  border-radius: 0 0 6px 6px;
}

/* Color picker modal */
.color-picker-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.color-picker {
  background: white;
  border-radius: 8px;
  padding: 20px;
  max-width: 300px;
  width: 90%;
}

.color-picker h3 {
  margin: 0 0 16px;
  text-align: center;
}

.colors-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.color-option {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s;
  border: 2px solid transparent;
}

.color-option:hover {
  transform: scale(1.1);
}

.color-option.selected {
  border-color: #374151;
  transform: scale(1.1);
}

/* Drag and drop styling */
.project-tile[draggable="true"] {
  cursor: move;
}

.project-tile.dragging {
  opacity: 0.5;
  transform: scale(0.95);
  z-index: 1000;
}

.project-tile.drag-over {
  border: 2px dashed #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

.project-tile.dragging .project-tile-name {
  pointer-events: none;
}

/* Animation for smooth reordering */
.project-tiles-container {
  transition: all 0.3s ease;
}

.project-tile {
  transition: all 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

/* Mobile full width fix */
@media (max-width: 768px) {
  .project-tiles-container {
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }
  
  .project-tile {
    width: 100% !important;
    margin: 0 !important;
  }
}