// 📍 RouteStopCard - Estilos Visuais Ricos
// Seguindo especificação da documentação

.route-stop-card {
  position: relative;
  background: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  margin-bottom: 12px;
  padding: 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  
  &:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    border-color: #007bff;
  }
  
  &.selected {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
    background: #f8f9ff;
  }
  
  &.dragging {
    opacity: 0.7;
    transform: rotate(2deg);
    z-index: 1000;
  }
}

// 📍 Cabeçalho do Card
.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f3f4;
}

.sequence-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #007bff;
  color: white;
  padding: 4px 8px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  min-width: 32px;
  justify-content: center;
  
  i {
    font-size: 10px;
  }
}

.stop-type {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #495057;
  
  i {
    font-size: 14px;
  }
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  margin-left: auto;
  
  &.status-pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
  }
  
  &.status-in_progress {
    background: #cce5ff;
    color: #004085;
    border: 1px solid #74c0fc;
  }
  
  &.status-completed {
    background: #d1edff;
    color: #155724;
    border: 1px solid #51cf66;
  }
  
  &.status-failed {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
  }
}

// 📍 Corpo do Card
.card-body {
  margin-bottom: 12px;
}

.address-info {
  margin-bottom: 8px;
  
  .address-title {
    font-size: 14px;
    font-weight: 600;
    color: #212529;
    margin: 0 0 2px 0;
    line-height: 1.3;
  }
  
  .address-details {
    font-size: 12px;
    color: #6c757d;
    margin: 0;
  }
}

.datetime-info {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 12px;
  color: #495057;
  
  i {
    font-size: 11px;
  }
}

.cargo-info {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
  
  .cargo-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #6c757d;
    background: #f8f9fa;
    padding: 3px 6px;
    border-radius: 8px;
    
    i {
      font-size: 10px;
      color: #007bff;
    }
  }
}

.fiscal-document {
  margin-bottom: 8px;
  
  .document-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
    
    &.document-validated {
      background: #d1edff;
      color: #155724;
      border: 1px solid #51cf66;
      
      .fa-check-circle {
        color: #28a745;
      }
    }
    
    &.document-error {
      background: #f8d7da;
      color: #721c24;
      border: 1px solid #f5c6cb;
      
      .fa-exclamation-triangle {
        color: #dc3545;
      }
    }
    
    &.document-pending {
      background: #fff3cd;
      color: #856404;
      border: 1px solid #ffeaa7;
    }
  }
}

.notes-info {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 11px;
  color: #6c757d;
  
  i {
    font-size: 10px;
    margin-top: 2px;
  }
  
  .notes-text {
    line-height: 1.3;
  }
}

// 🎯 Ações do Card
.card-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  padding-top: 8px;
  border-top: 1px solid #f1f3f4;
}

.btn-action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid #dee2e6;
  background: #ffffff;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 12px;
  
  &:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  &:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
  
  &.btn-edit {
    color: #007bff;
    
    &:hover:not(:disabled) {
      background: #e3f2fd;
      border-color: #007bff;
    }
  }
  
  &.btn-document {
    color: #28a745;
    
    &:hover:not(:disabled) {
      background: #e8f5e8;
      border-color: #28a745;
    }
  }
  
  &.btn-location {
    color: #6c757d;
    
    &:hover:not(:disabled) {
      background: #f8f9fa;
      border-color: #6c757d;
    }
  }
  
  &.btn-delete {
    color: #dc3545;
    
    &:hover:not(:disabled) {
      background: #fdf2f2;
      border-color: #dc3545;
    }
  }
}

// 🔄 Drag Handle
.drag-handle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  color: #adb5bd;
  cursor: grab;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
  
  &:hover {
    color: #6c757d;
    background: #f8f9fa;
  }
  
  &:active {
    cursor: grabbing;
  }
  
  i {
    font-size: 12px;
  }
}

// 📱 Responsividade
@media (max-width: 768px) {
  .route-stop-card {
    padding: 12px;
    margin-bottom: 8px;
  }
  
  .card-header {
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .cargo-info {
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .card-actions {
    gap: 4px;
  }
  
  .btn-action {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
}

// 🎨 Animações
@keyframes cardAppear {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.route-stop-card {
  animation: cardAppear 0.3s ease;
}

// 🔄 Estados de Drag & Drop
.drag-over {
  border-color: #007bff;
  background: #f8f9ff;
  
  &::after {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #007bff;
    border-radius: 1px;
  }
} 