// 📋 RouteStopsListComponent - Estilos da Lista
// Layout lateral para exibição das paradas

.route-stops-list {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

// 📋 Cabeçalho da Lista
.list-header {
  padding: 16px;
  border-bottom: 1px solid #e9ecef;
  background: #f8f9fa;
  
  .header-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    
    h3 {
      margin: 0;
      font-size: 16px;
      font-weight: 600;
      color: #212529;
      display: flex;
      align-items: center;
      gap: 8px;
      
      i {
        color: #007bff;
      }
    }
    
    .stops-count {
      background: #007bff;
      color: white;
      padding: 4px 8px;
      border-radius: 12px;
      font-size: 11px;
      font-weight: 500;
    }
  }
}

// 🔄 Loading State
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  color: #6c757d;
  
  i {
    font-size: 24px;
    margin-bottom: 12px;
    color: #007bff;
  }
  
  span {
    font-size: 14px;
  }
}

// 📋 Container das Paradas
.stops-container {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  
  // Scrollbar customizada
  &::-webkit-scrollbar {
    width: 6px;
  }
  
  &::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
  }
  
  &::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
    
    &:hover {
      background: #a8a8a8;
    }
  }
}

// 📍 Empty State
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  
  i {
    margin-bottom: 16px;
    opacity: 0.5;
  }
  
  h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #495057;
  }
  
  p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
  }
}

// 📊 Summary da Lista
.list-summary {
  padding: 12px 16px;
  border-top: 1px solid #e9ecef;
  background: #f8f9fa;
  
  .summary-stats {
    display: flex;
    gap: 16px;
    justify-content: space-around;
    
    .stat-item {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 12px;
      color: #495057;
      
      i {
        font-size: 11px;
      }
    }
  }
}

// 🔄 Drag & Drop States
.route-stops-list {
  &.drag-over {
    background: #f8f9ff;
    border: 2px dashed #007bff;
  }
  
  // Estado ativo de drag
  &.dragging-active {
    .stops-container {
      background: #f8f9ff;
      
      // Indicador visual de área de drop
      &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 123, 255, 0.05);
        border: 2px dashed #007bff;
        border-radius: 8px;
        pointer-events: none;
        z-index: 1;
      }
    }
    
    // Cards não sendo arrastados ficam semi-transparentes
    app-route-stop-card:not(.dragging) {
      opacity: 0.6;
      transition: opacity 0.2s ease;
    }
  }
}

// 🎯 Highlight do Drop Target
:host ::ng-deep .drop-target-highlight {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3) !important;
  border-color: #007bff !important;
  background: #f8f9ff !important;
  
  // Indicador de posição de drop
  &::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: #007bff;
    border-radius: 2px;
    z-index: 10;
  }
  
  &::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: #007bff;
    border-radius: 2px;
    z-index: 10;
  }
}

// 📱 Responsividade
@media (max-width: 768px) {
  .route-stops-list {
    border-radius: 0;
  }
  
  .list-header {
    padding: 12px;
    
    .header-info h3 {
      font-size: 14px;
    }
  }
  
  .stops-container {
    padding: 12px;
  }
  
  .list-summary {
    padding: 8px 12px;
    
    .summary-stats {
      gap: 12px;
      
      .stat-item {
        font-size: 11px;
      }
    }
  }
  
  // Drag & Drop mobile
  .route-stops-list.dragging-active {
    .stops-container::before {
      border-width: 1px;
    }
  }
}

// 🎨 Animações de Drag & Drop
@keyframes dropIndicator {
  0% {
    opacity: 0;
    transform: scaleY(0);
  }
  100% {
    opacity: 1;
    transform: scaleY(1);
  }
}

.drop-target-highlight::before,
.drop-target-highlight::after {
  animation: dropIndicator 0.2s ease;
}

// 🔄 Transições suaves para reordenação
app-route-stop-card {
  transition: transform 0.3s ease, opacity 0.2s ease;
}

// 📍 Indicador de posição durante drag
.route-stops-list.dragging-active {
  .stops-container {
    position: relative;
    
    // Linha indicadora de posição
    .drop-indicator {
      position: absolute;
      left: 16px;
      right: 16px;
      height: 2px;
      background: #007bff;
      border-radius: 1px;
      opacity: 0;
      transition: opacity 0.2s ease;
      z-index: 5;
      
      &.active {
        opacity: 1;
      }
      
      &::before {
        content: '';
        position: absolute;
        left: -4px;
        top: -2px;
        width: 6px;
        height: 6px;
        background: #007bff;
        border-radius: 50%;
      }
      
      &::after {
        content: '';
        position: absolute;
        right: -4px;
        top: -2px;
        width: 6px;
        height: 6px;
        background: #007bff;
        border-radius: 50%;
      }
    }
  }
} 